Merge pull request #4291 from VOREStation/upstream-merge-5613

[MIRROR] Custom RIG Framework
This commit is contained in:
Spades
2018-10-01 09:30:24 -04:00
committed by GitHub
7 changed files with 90 additions and 4 deletions
+7 -4
View File
@@ -26,6 +26,8 @@
unacidable = 1
preserve_item = 1
var/suit_state //The string used for the suit's icon_state.
var/interface_path = "hardsuit.tmpl"
var/ai_interface_path = "hardsuit.tmpl"
var/interface_title = "Hardsuit Controller"
@@ -111,6 +113,7 @@
/obj/item/weapon/rig/New()
..()
suit_state = icon_state
item_state = icon_state
wires = new(src)
@@ -155,7 +158,7 @@
piece.canremove = 0
piece.name = "[suit_type] [initial(piece.name)]"
piece.desc = "It seems to be part of a [src.name]."
piece.icon_state = "[initial(icon_state)]"
piece.icon_state = "[suit_state]"
piece.min_cold_protection_temperature = min_cold_protection_temperature
piece.max_heat_protection_temperature = max_heat_protection_temperature
if(piece.siemens_coefficient > siemens_coefficient) //So that insulated gloves keep their insulation.
@@ -207,7 +210,7 @@
canremove = 1
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(!piece) continue
piece.icon_state = "[initial(icon_state)]"
piece.icon_state = "[suit_state]"
if(airtight)
piece.item_flags &= ~(STOPPRESSUREDAMAGE|AIRTIGHT)
update_icon(1)
@@ -272,7 +275,7 @@
if(seal_delay && !instant && !do_after(M,seal_delay,needhand=0))
failed_to_seal = 1
piece.icon_state = "[initial(icon_state)][!seal_target ? "_sealed" : ""]"
piece.icon_state = "[suit_state][!seal_target ? "_sealed" : ""]"
switch(msg_type)
if("boots")
M << "<font color='blue'>\The [piece] [!seal_target ? "seal around your feet" : "relax their grip on your legs"].</font>"
@@ -310,7 +313,7 @@
qdel(booting_R)
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(!piece) continue
piece.icon_state = "[initial(icon_state)][!seal_target ? "" : "_sealed"]"
piece.icon_state = "[suit_state][!seal_target ? "" : "_sealed"]"
canremove = !seal_target
if(airtight)
update_component_sealed()