Fixes geiger counters on engiborgs (#35423)

* a commit

* Update geiger_counter.dm
This commit is contained in:
vuonojenmustaturska
2018-02-08 19:21:06 +02:00
committed by Jordan Brown
parent 6b90cc824a
commit 1c8e450f15
4 changed files with 19 additions and 5 deletions

View File

@@ -95,7 +95,7 @@
if(!istype(proc_or_callback, /datum/callback)) //if it wasnt a callback before, it is now if(!istype(proc_or_callback, /datum/callback)) //if it wasnt a callback before, it is now
proc_or_callback = CALLBACK(src, proc_or_callback) proc_or_callback = CALLBACK(src, proc_or_callback)
procs[sig_type] = proc_or_callback procs[sig_type] = proc_or_callback
enabled = TRUE enabled = TRUE
/datum/component/proc/InheritComponent(datum/component/C, i_am_original) /datum/component/proc/InheritComponent(datum/component/C, i_am_original)
@@ -180,7 +180,7 @@
var/datum/component/old_comp var/datum/component/old_comp
var/datum/component/new_comp var/datum/component/new_comp
if(ispath(nt)) if(ispath(nt))
if(nt == /datum/component) if(nt == /datum/component)
CRASH("[nt] attempted instantiation!") CRASH("[nt] attempted instantiation!")

View File

@@ -370,7 +370,7 @@
SendSignal(COMSIG_ATOM_EMAG_ACT) SendSignal(COMSIG_ATOM_EMAG_ACT)
/atom/proc/rad_act(strength) /atom/proc/rad_act(strength)
SendSignal(COMSIG_ATOM_RAD_ACT) SendSignal(COMSIG_ATOM_RAD_ACT, strength)
/atom/proc/narsie_act() /atom/proc/narsie_act()
SendSignal(COMSIG_ATOM_NARSIE_ACT) SendSignal(COMSIG_ATOM_NARSIE_ACT)
@@ -569,4 +569,4 @@
return return
/atom/proc/GenerateTag() /atom/proc/GenerateTag()
return return

View File

@@ -201,6 +201,20 @@
to_chat(user, "<span class='warning'>You override [src]'s radiation storing protocols. It will now generate small doses of radiation, and stored rads are now projected into creatures you scan.</span>") to_chat(user, "<span class='warning'>You override [src]'s radiation storing protocols. It will now generate small doses of radiation, and stored rads are now projected into creatures you scan.</span>")
obj_flags |= EMAGGED obj_flags |= EMAGGED
/obj/item/device/geiger_counter/cyborg
var/datum/component/mobhook
/obj/item/device/geiger_counter/cyborg/equipped(mob/user)
. = ..()
if (mobhook && mobhook.parent != user)
QDEL_NULL(mobhook)
if (!mobhook)
mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_ATOM_RAD_ACT), CALLBACK(src, /atom.proc/rad_act))
/obj/item/device/geiger_counter/cyborg/dropped()
. = ..()
QDEL_NULL(mobhook)
#undef RAD_LEVEL_NORMAL #undef RAD_LEVEL_NORMAL
#undef RAD_LEVEL_MODERATE #undef RAD_LEVEL_MODERATE
#undef RAD_LEVEL_HIGH #undef RAD_LEVEL_HIGH

View File

@@ -297,7 +297,7 @@
/obj/item/device/multitool/cyborg, /obj/item/device/multitool/cyborg,
/obj/item/device/t_scanner, /obj/item/device/t_scanner,
/obj/item/device/analyzer, /obj/item/device/analyzer,
/obj/item/device/geiger_counter, /obj/item/device/geiger_counter/cyborg,
/obj/item/device/assembly/signaler/cyborg, /obj/item/device/assembly/signaler/cyborg,
/obj/item/areaeditor/blueprints/cyborg, /obj/item/areaeditor/blueprints/cyborg,
/obj/item/device/electroadaptive_pseudocircuit, /obj/item/device/electroadaptive_pseudocircuit,