forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Adds datum cards #8
Merged
EOBGames
merged 2 commits into
EOBGames:blueeyedwhitejumpsuit
from
LemonInTheDark:datum-cards
May 2, 2020
Merged
Adds datum cards #8
EOBGames
merged 2 commits into
EOBGames:blueeyedwhitejumpsuit
from
LemonInTheDark:datum-cards
May 2, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EOBGames
added a commit
that referenced
this pull request
Jun 2, 2020
tgstation#51252) * here goes nothing no really this is basically nothing * dme is less dumb * aaaaa string files * Card backend (#3) * Adds card backend and hotloading This is a combination of 2 commits. OH SHIT THE SM IS ON FIRE WE DONE LADS * Woop * Best we'll get * fixed file system, courtesy of potato * updated tools (thanks potato), now up to 40 cards * Adds rarity (#4) * Adds rarity * just to be sure * Adds it to cards * Didn't read templates WHAT A NERD AMAROIGHT * Commets * Woop you'd think I'd know my own system * There we go * Fuck you EOF (#5) * Makes rarity not suck (#6) * Fuck you EOF * Makes rarity not suck * Auto stash before merge of "blueeyedwhitejumpsuit" and "origin/blueeyedwhitejumpsuit" * Makes rarity work as expected, thanks dogman (#7) * smolcards * Adds datum cards (#8) * Datum cards * Some docs and a little bit of cleanup * fuck * problems be had * Fuck (#9) * fucko bungo RELASE ME FROM THIS HELL GIT * datum FUCKING AHHHHHHHHHHH * packs and games * boomer mood (#10) * Card debugging (#11) * Adds debug vars * that's a bit better * shit * unfucks rarity * scales sorted * That should do it * Parity * fun fact * series 1 json * and so it is done * Don't need this, I'm dumb. MacRo-Op???@?#?@??!#?!@ * BRAINDAMAGE * resin redux, smaller cards * shut up shut up shut up IT'S ASSUMED TYPE OK? *it's not all that bad* * double rarity TABLELS, fixed the silly linter * flippers and rarities * guaranteed rarity, rarity tables * fuck it let's ask * resinfront * 2560 core set * fixes flippers * template icon, extra variable juice * ADDS SPEED (#12) * FUCK FUCK FUCK SHIT I BROKE IT AGAIN * Kills my dreams in the NAME OF SPEED * and some cleanup * Minor changes, some qol (#13) * couple small changes, moved the datum procs around to make things cleaner, made some comments autodocced * Let's be more clear, * and a woooop * Removing ids, carpel tunnel edittion (#14) * Subsystem * Carpel tunnel completed * woop * curator is no longer equipment * I'm not dumb you're dumb (#15) * minor rarity tweak ladies and gents, it's finished Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
EOBGames
pushed a commit
that referenced
this pull request
Sep 23, 2023
…nent (tgstation#77539) ## About The Pull Request Hey there, I've personally fallen for this stupid thing twice (in tgstation#77503 and tgstation#75627 (d357516)), so I decided to spend a few hours to crack out a unit test to ensure that I (and no one else) falls for this stupid thing again. Let me know if there's a smarter way to code something like this, but I couldn't figure out a better way to accomodate the current framework and be as agnostic to certain oddities as possible. ## Why It's Good For The Game Catches stuff like this: ```txt [2023-08-11 21:10:04.019] FAILURE #1: The mob Garden Gnome does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45 - FAILURE #2: The mob the morph does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45 - FAILURE #3: The mob the guard spiderling (946) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45 - FAILURE #4: The mob the ambush spiderling (255) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45 - FAILURE #5: The mob the scout spiderling (375) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45 - FAILURE #6: The mob the flesh spiderling (337) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45 - FAILURE #7: The mob the hunter spiderling (869) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45 - FAILURE #8: The mob the nurse spiderling (629) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45 - FAILURE #9: The mob the tangle spiderling (19) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45 - FAILURE #10: The mob the broodmother spiderling (855) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45 - FAILURE #11: The mob the viper spiderling (519) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45 - FAILURE #12: The mob the tarantula spiderling (963) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45 - FAILURE #13: The mob the spiderling (100) does not have ANY instances of TRAIT_SUBTREE_REQUIRED_ELEMENT, but has a planning subtree (/datum/ai_planning_subtree/target_retaliate/to_flee) that requires it! at code/modules/unit_tests/ensure_subtree_element.dm:45 ``` (ignore the part about gnomes and morphs, this was an earlier version of the unit test. everything else was relevant and is fixed) ## Changelog :cl: fix: Growing spiders will now retaliate against you like they were always meant to. /:cl:
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Yello inept :)
I've datumized cards, cleaned up some things that should be erroring, and fixed some legacy issues I think you were running into. Load-times are a bit longer, but lookup and filter should be faster. and now memory should be more static.
To elaborate on the datum stuff, instead of storing the raw strings globally, we store the result of fully extracting the text from those strings. This means that loading will take a little longer,
but now accessing default variables should be simple.
If there's a value you want to modify during runtime, make a copy of it on the card object and load it during init. Don't do this unless you need to tho, cause it will just up the memory consumption again.