Merge pull request #14239 from Hatterhat/golem-gps-pass2

well that's what i get for trusting my own code - makes golem GPSes start off, but actually this time
This commit is contained in:
Lin
2021-02-17 17:29:03 -06:00
committed by GitHub
2 changed files with 6 additions and 4 deletions

View File

@@ -26,15 +26,16 @@ GLOBAL_LIST_EMPTY(GPS_list)
if(. == COMPONENT_INCOMPATIBLE || !isitem(parent))
return COMPONENT_INCOMPATIBLE
var/atom/A = parent
A.add_overlay("working")
if(starton)
A.add_overlay("working")
else
tracking = FALSE
A.name = "[initial(A.name)] ([gpstag])"
RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, .proc/interact)
if(!emp_proof)
RegisterSignal(parent, COMSIG_ATOM_EMP_ACT, .proc/on_emp_act)
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/on_examine)
RegisterSignal(parent, COMSIG_CLICK_ALT, .proc/on_AltClick)
if(!starton)
tracking = FALSE
///Called on COMSIG_ITEM_ATTACK_SELF
/datum/component/gps/item/proc/interact(datum/source, mob/user)

View File

@@ -8,11 +8,12 @@
slot_flags = ITEM_SLOT_BELT
obj_flags = UNIQUE_RENAME
var/gpstag = "COM0"
var/emp_proof = FALSE
var/starton = TRUE
/obj/item/gps/Initialize()
. = ..()
AddComponent(/datum/component/gps/item, gpstag, starton)
AddComponent(/datum/component/gps/item, gpstag, emp_proof, starton)
/obj/item/gps/science
icon_state = "gps-s"