Fixes Modsuits Self-QDEL from an Assert Failure when removing while retracted. (#17377)

* modsuit asset fail fix

* skyrat edit

* Update code/modules/mod/mod_control.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update code/modules/mod/mod_control.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
This commit is contained in:
nevimer
2022-12-16 13:06:39 -05:00
committed by GitHub
parent b57e15c6f4
commit 88812247e1

View File

@@ -279,6 +279,16 @@
balloon_alert(wearer, "retract parts first!")
playsound(src, 'sound/machines/scanbuzz.ogg', 25, FALSE, SILENCED_SOUND_EXTRARANGE)
return
// SKYRAT EDIT ADDITION START - Can't remove your MODsuit from your back when it's still active (as it can cause runtimes and even the MODsuit control unit to delete itself)
if(active)
if(!wearer.incapacitated())
balloon_alert(wearer, "deactivate first!")
playsound(src, 'sound/machines/scanbuzz.ogg', 25, FALSE, SILENCED_SOUND_EXTRARANGE)
return
// SKYRAT ADDITION END
if(!wearer.incapacitated())
var/atom/movable/screen/inventory/hand/ui_hand = over_object
if(wearer.putItemFromInventoryInHandIfPossible(src, ui_hand.held_index))