Refactoring hardsuit click checking.

This commit is contained in:
Zuhayr
2015-08-23 02:13:03 +09:30
parent a00ac82221
commit 90e51b87e3
7 changed files with 72 additions and 52 deletions
+9 -6
View File
@@ -181,8 +181,8 @@
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(!piece) continue
piece.icon_state = "[initial(icon_state)]"
if(airtight)
piece.item_flags &= ~(STOPPRESSUREDAMAGE|AIRTIGHT)
if(airtight)
piece.item_flags &= ~(STOPPRESSUREDAMAGE|AIRTIGHT)
update_icon(1)
/obj/item/weapon/rig/proc/toggle_seals(var/mob/living/carbon/human/M,var/instant)
@@ -270,9 +270,9 @@
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(!piece) continue
piece.icon_state = "[initial(icon_state)][!seal_target ? "" : "_sealed"]"
canremove = !seal_target
canremove = !seal_target
if(airtight)
update_component_sealed()
update_component_sealed()
update_icon(1)
return 0
@@ -291,9 +291,9 @@
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(canremove)
piece.item_flags &= ~(STOPPRESSUREDAMAGE|AIRTIGHT)
else
else
piece.item_flags |= (STOPPRESSUREDAMAGE|AIRTIGHT)
update_icon(1)
update_icon(1)
/obj/item/weapon/rig/process()
@@ -894,6 +894,9 @@
/obj/item/weapon/rig/get_rig()
return src
/mob/living/carbon/human/get_rig()
return back
#undef ONLY_DEPLOY
#undef ONLY_RETRACT
#undef SEAL_DELAY
+1 -1
View File
@@ -126,7 +126,7 @@
/obj/machinery/portable_atmospherics/hydroponics/AltClick()
if(mechanical && !usr.stat && !usr.lying && Adjacent(usr))
close_lid(usr)
return
return 1
return ..()
/obj/machinery/portable_atmospherics/hydroponics/attack_ghost(var/mob/dead/observer/user)
+1 -1
View File
@@ -81,7 +81,7 @@ var/list/ai_verbs_default = list(
var/datum/ai_icon/selected_sprite // The selected icon set
var/custom_sprite = 0 // Whether the selected icon is custom
var/carded
/mob/living/silicon/ai/proc/add_ai_verbs()
src.verbs |= ai_verbs_default