Fixes suit_state of the protean rig when you unassimilate a rig. (#8392)

This commit is contained in:
The Sharkening
2024-05-13 23:16:30 +02:00
committed by GitHub
parent 36b88fb10b
commit 7862a5f337
@@ -508,21 +508,26 @@
gloves.sprite_sheets_obj = R.gloves.sprite_sheets.Copy()
gloves.icon = R.gloves.icon
gloves.icon_state = R.gloves.icon_state
gloves.default_worn_icon = R.gloves.default_worn_icon
if(R.helmet)
helmet.sprite_sheets = R.helmet.sprite_sheets.Copy()
helmet.sprite_sheets_obj = R.helmet.sprite_sheets.Copy()
helmet.icon = R.helmet.icon
helmet.icon_state = R.helmet.icon_state
helmet.default_worn_icon = R.helmet.default_worn_icon
if(R.boots)
boots.sprite_sheets = R.boots.sprite_sheets.Copy()
boots.sprite_sheets_obj = R.boots.sprite_sheets.Copy()
boots.icon = R.boots.icon
boots.icon_state = R.boots.icon_state
boots.default_worn_icon = R.boots.default_worn_icon
if(R.chest)
chest.sprite_sheets = R.chest.sprite_sheets.Copy()
chest.sprite_sheets_obj = R.chest.sprite_sheets.Copy()
chest.icon = R.chest.icon
chest.icon_state = R.chest.icon_state
chest.default_worn_icon = R.chest.default_worn_icon
suit_state = R.suit_state
name = R.name
icon = R.icon
@@ -544,6 +549,7 @@
piece.max_heat_protection_temperature = initial(piece.max_heat_protection_temperature)
piece.icon_state = src.icon_state
piece.icon = initial(piece.icon)
piece.default_worn_icon = initial(piece.default_worn_icon)
//Byond at this time does not support initial() on lists
//So we have to create a new rig, just so we can copy the lists we're after
@@ -558,10 +564,10 @@
chest.sprite_sheets = tempRig.chest.sprite_sheets.Copy()
chest.sprite_sheets_obj = tempRig.chest.sprite_sheets.Copy()
slowdown = initial(slowdown)
name = tempRig.name
icon = tempRig.icon // Reset the icon back to its original
icon_state = tempRig.icon_state
suit_state = icon_state
name = "nanosuit control cluster"
icon = 'icons/obj/rig_modules_ch.dmi' // Reset the icon back to its original
icon_state = "nanomachine_rig"
offline_slowdown = initial(offline_slowdown)
usr.put_in_hands(assimilated_rig)
assimilated_rig = null