This commit is contained in:
Seris02
2020-01-19 15:50:48 +08:00
parent fdf3871cb7
commit f54417f99e
5 changed files with 21 additions and 29 deletions
+6 -8
View File
@@ -104,7 +104,7 @@
var/update_overlay = -1
var/icon_update_needed = FALSE
var/obj/machinery/computer/apc_control/remote_control = null
var/mob/living/carbon/hijacker = 0
var/mob/living/carbon/hijacker
var/hijackerlast = FALSE
/obj/machinery/power/apc/unlocked
@@ -402,14 +402,14 @@
update_overlay |= APC_UPOVERLAY_ENVIRON2
var/results = 0
if(last_update_state == update_state && last_update_overlay == update_overlay && (hijacker == 0 ? 0 : 1) == hijackerlast)
if(last_update_state == update_state && last_update_overlay == update_overlay && (hijacker ? hijackerlast : !hijackerlast)
return 0
if(last_update_state != update_state)
results += 1
if(last_update_overlay != update_overlay || (hijacker == 0 ? 0 : 1) != hijackerlast)
if(last_update_overlay != update_overlay || (hijacker ? !hijackerlast : hijackerlast)
results += 2
if (hijacker ? TRUE : FALSE != hijackerlast)
hijackerlast = hijacker == 0 ? 0 : 1
if (hijacker ? !hijackerlast : hijackerlast)
hijackerlast = hijacker ? TRUE : FALSE
return results
// Used in process so it doesn't update the icon too much
@@ -948,9 +948,7 @@
/obj/machinery/power/apc/proc/can_use(mob/user, loud = 0) //used by attack_hand() and Topic()
if(IsAdminGhost(user))
return TRUE
if (user == hijacker || hasSiliconAccessInArea(user,area))
return TRUE
if (!aidisabled && issilicon(user))
if (user == hijacker || (hasSiliconAccessInArea(user,area) && !aidisabled))
return TRUE
if(user.has_unlimited_silicon_privilege)
var/mob/living/silicon/ai/AI = user
+1 -1
View File
@@ -103,7 +103,7 @@
return UI_CLOSE
var/dist = get_dist(src_object, src)
if(dist <= 1) // Open and interact if 1-0 tiles away.
if(dist <= 1 || hasSiliconAccessInArea(src,get_area(src_object))) // Open and interact if 1-0 tiles away.
return UI_INTERACTIVE
else if(dist <= 2) // View only if 2-3 tiles away.
return UI_UPDATE
-4
View File
@@ -14,8 +14,6 @@ GLOBAL_DATUM_INIT(default_state, /datum/ui_state/default, new)
/mob/living/default_can_use_topic(src_object)
. = shared_ui_interaction(src_object)
if (hasSiliconAccessInArea(src,get_area(src_object)))
return UI_INTERACTIVE
if(. > UI_CLOSE && loc)
. = min(., loc.contents_ui_distance(src_object, src)) // Check the distance...
if(. == UI_INTERACTIVE) // Non-human living mobs can only look, not touch.
@@ -23,8 +21,6 @@ GLOBAL_DATUM_INIT(default_state, /datum/ui_state/default, new)
/mob/living/carbon/human/default_can_use_topic(src_object)
. = shared_ui_interaction(src_object)
if (hasSiliconAccessInArea(src,get_area(src_object)))
return UI_INTERACTIVE
if(. > UI_CLOSE)
. = min(., shared_living_ui_distance(src_object)) // Check the distance...