Springlock MODule now only activates when you have at least a single sealed piece (#89222)

## About The Pull Request

Springlocks no longer trigger when you only have a back piece deployed,
only damages bodyparts covered by deployed pieces, and prevents you from
retracting them when it's been set off

Closes #89218

## Changelog
🆑
fix: Springlock MODule now only activates when you have at least a
single sealed piece
fix: Springlock MODule no longer damages bodyparts not covered by your
MODsuit
/🆑
This commit is contained in:
SmArtKar
2025-01-29 17:56:55 +01:00
committed by GitHub
parent c35737fa29
commit cb1bf1431e
3 changed files with 28 additions and 6 deletions
+2 -1
View File
@@ -127,6 +127,8 @@
balloon_alert(user, "already retracted!")
playsound(src, 'sound/machines/scanner/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE)
return FALSE
if(SEND_SIGNAL(src, COMSIG_MOD_PART_RETRACTING, user, part_datum) & MOD_CANCEL_RETRACTION)
return FALSE
if(active && part_datum.sealed)
if(instant)
seal_part(part, is_sealed = FALSE)
@@ -141,7 +143,6 @@
if(!QDELING(wearer) && !wearer.equip_to_slot_if_possible(overslot, overslot.slot_flags, qdel_on_fail = FALSE, disable_warning = TRUE))
wearer.dropItemToGround(overslot, force = TRUE, silent = TRUE)
wearer.update_clothing(slot_flags)
SEND_SIGNAL(src, COMSIG_MOD_PART_RETRACTED, user, part_datum)
if(!user)
return TRUE
wearer.visible_message(span_notice("[wearer]'s [part.name] retract[part.p_s()] back into [src] with a mechanical hiss."),