space-station-14
space-station-14 copied to clipboard
Space Ninjas auto-toggle internals after spawning
About the PR
Space ninja masks automatically toggle internals on at roundstart (technically, when they are first equipped. Thus, space ninja masks spawned with F5 will do this the first time they are worn)
Technical details
When an entitiy with BreathToolComponent.AutomaticActivation = true
is equipped, it ~~schedules the werarer's internals to be toggled on the next tick. (The delay is to ensure that the ninja's gear finished spawning and thus there is an air tank to work with)~~ immediately toggles the wearer's internals.
Currently, this field is then set to false, so this only happens the first time when such a mask is equipped.
To ensure that this can actually work at spawn (where the mask slot item is normally spawned before the suitstorage item), a new passable parameter in InventorySystem.TryGetSlots reorders the output so the Mask slot will be listed last. This parameter is only used in the spawning system, so other systems requesting the inventory slots and relying in them to be in a certain order (such as item smartequip) are not impacted
Media
- [X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase
Changelog :cl: Errant
- tweak: Space Ninjas now automatically turn their internals on when they spawn.