forked from Fluffy-Frontier/FluffySTG
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removes the attack_slime proc, and other slime refactors (Fluffy-Fron…
…tier#264) * Removes the attack_slime proc, and other slime refactors (#80487) ## About The Pull Request - **Removed attack_slime**. Most of the attack_slime content has been moved to a proc that signs up for COMSIG_LIVING_UNARMED_ATTACK. Its ugly, but will make converting slimes to a basic mob easier. They now use attack_animal for now, which might cause some unexpected interactions. Hopefully when they are converted to basic mobs, these can be cleared up properly. - This caused some issues with cyborgs, who used to get only half damage dealt to them. As refactoring this would have been too much of a difficult task without much real gain, after much pondering, I have decided that since slimes can always flash cyborgs with each of their strikes, maybe cyborgs should only fear slimes that have electric charges in them. In addition, slimes electric charges decrease now after they successfully zap an cyborg, making them more consistent with the zaps that affect carbons. AIs are still fully immune to slimes. - The slime.dm and slime.life files were extremely bloated, and unorganized. I have created two new files, defense.dm and ai.dm. I have moved the various attack_by/attack_hand/etc procs to defense.dm. Ai.dm now contains every single proc the slime's "AI" uses; this should help getting a clearer picture of the current functionality, which should aid with basic mob conversion and decision tree creation. The remaining files have been slightly organized, with overrides in front, and new procs at the back. - Created a proc for swapping out Adult and Baby states of a slime. Previously, attack_slime was in many cases ignoring fields like melee_damage_lower and melee_damage_upper, replacing it with magic numbers based on the slime's lifestate. Now these values are hard set by these procs. This has caused slimes to be more consistent, though baby slimes might do a bit less damage on the low end. I am tempted to turn these in datums in the future, or as part of this PR. - Removed baby slime's chance to accidentally attack a window/grille by bumping into it, they had 0 object damage anyways, unlike adult slimes, so there was no reason not to early return. - The proc of `handle_feeding` assumed adjustBruteLoss and adjustToxLoss return positive values when damage has been done, when in reality, it returns the total health change along with its direction. This meant slimes would fell off simple or basic mobs after a single bite. This has been fixed. - Also updated the warning before the slime type defines, as they were out of date. - I have removed the bespoke spacewalk override for slimes, which should allow them to drift, should gravity go out. - The nutrition stats are assigned only once, when the slime grows up, instead of compared to being an adult every life tick ## Why It's Good For The Game Less duplicated code. This refactor should help in the basic mob conversion process. Cyborgs have an easier time wrangling slimes, who could previously kill them in three hits, if charged. They are mostly encased in metal, they should feel fine when not hit with electric attacks. Lets slimes feast on delicious corgis. * Removes the attack_slime proc, and other slime refactors --------- Co-authored-by: Profakos <[email protected]> Co-authored-by: NovaBot <[email protected]> Co-authored-by: SomeRandomOwl <[email protected]>
- Loading branch information
Showing
29 changed files
with
900 additions
and
988 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.