Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xeno strains unit test #5725

Merged
merged 4 commits into from
Feb 19, 2024
Merged

Conversation

SabreML
Copy link
Member

@SabreML SabreML commented Feb 15, 2024

About the pull request

Adds a unit test for xeno strains.
I could have included this in #5542, but I thought it would be better in its own PR in order to keep the checks and everything separate.

The removed sprites for the Trapper, Charger, Gardener, and Watcher strains are (as far as I'm able to tell) completely identical to that of the base caste, and are only there in order to make the old system work properly.

Currently, this includes the following tests:

  • Checking that the caste_type variable on each /mob/living/carbon/xenomorph subtype has a corresponding entry in GLOB.xeno_datum_list. (Not really strain related but I figured no harm in including it)
  • Checking that each /datum/xeno_strain subtype has its own name and description.
  • Making sure that each strain's actions_to_add and actions_to_remove lists are added and removed from the xeno properly. (Taking into account any which are re-added.)
  • Making sure that the strain's behavior_delegate_type is successfully added to the xeno.
  • If the strain doesn't have an icon_state_prefix, going through the xeno's icon file and double checking that there aren't strain sprites in there (That is, sprites beginning with the strain's name). If there are any, then icon_state_prefix should probably be set to use them.
  • If the strain does have an icon_state_prefix, making sure that the xeno's sprite actually got changed to the strain version.

Explain why it's good for the game

More unit tests! (woo)

Testing Photographs and Procedure

Screenshots & Videos

Put screenshots and videos here with an empty line between the screenshots and the <details> tags.

Changelog

🆑
code: Added a unit test for xeno strains.
/:cl:

@github-actions github-actions bot added Sprites Remove the soul from the game. Code Improvement Make the code longer labels Feb 15, 2024
This reverts commit e905a21.
@SabreML
Copy link
Member Author

SabreML commented Feb 15, 2024

damn, there had to be something

@SabreML SabreML marked this pull request as draft February 15, 2024 15:34
Not actually caused by the PR, just discovered by it. (hooray I guess?)

Basically when the tacmap action was removed by a strain (with a new one added later), the `COMSIG_HIVE_NEW_QUEEN` signal on it never got unregistered and it sorta got left floating in nullspace until a new queen comes along to cause a runtime.
There should really be a unit test for this problem, but that's out of scope for now.

(Although I did pre-emptively fix /datum/action/minimap in case it ever has the same problem)
@SabreML SabreML marked this pull request as ready for review February 15, 2024 16:54
@Zonespace27 Zonespace27 added the Unit Tests Keep the game broken, forcefully. label Feb 16, 2024
@harryob harryob added this pull request to the merge queue Feb 19, 2024
Merged via the queue into cmss13-devs:master with commit 53ebed1 Feb 19, 2024
27 checks passed
cm13-github added a commit that referenced this pull request Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Improvement Make the code longer Sprites Remove the soul from the game. Unit Tests Keep the game broken, forcefully.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants