Skip to content

Commit

Permalink
Fixes nanite comm remotes (tgstation#54511)
Browse files Browse the repository at this point in the history
  • Loading branch information
XDTM authored Oct 31, 2020
1 parent 583af81 commit c9f9f2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions code/modules/research/nanites/nanite_programs/suppression.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@

/datum/nanite_program/comm/proc/receive_comm_signal(signal_comm_code, comm_message, comm_source)
var/datum/nanite_extra_setting/comm_code = extra_settings[NES_COMM_CODE]
if(!activated || !comm_code)
if(!activated || !comm_code.get_value())
return
if(signal_comm_code == comm_code)
if(signal_comm_code == comm_code.get_value())
host_mob.investigate_log("'s [name] nanite program was messaged by [comm_source] with comm code [signal_comm_code] and message '[comm_message]'.", INVESTIGATE_NANITES)
trigger(comm_message)
trigger(FALSE, comm_message)

/datum/nanite_program/comm/speech
name = "Forced Speech"
Expand Down
10 changes: 5 additions & 5 deletions code/modules/research/nanites/nanite_remote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -181,21 +181,21 @@
return
if(REMOTE_MODE_SELF)
to_chat(user, "<span class='notice'>You activate [src], signaling the nanites in your bloodstream.</span>")
signal_mob(user, code, comm_message)
signal_mob(user, code, key_name(user))
if(REMOTE_MODE_TARGET)
if(isliving(target) && (get_dist(target, get_turf(src)) <= 7))
to_chat(user, "<span class='notice'>You activate [src], signaling the nanites inside [target].</span>")
signal_mob(target, code, comm_message, key_name(user))
signal_mob(target, code, key_name(user))
if(REMOTE_MODE_AOE)
to_chat(user, "<span class='notice'>You activate [src], signaling the nanites inside every host around you.</span>")
for(var/mob/living/L in view(user, 7))
signal_mob(L, code, comm_message, key_name(user))
signal_mob(L, code, key_name(user))
if(REMOTE_MODE_RELAY)
to_chat(user, "<span class='notice'>You activate [src], signaling all connected relay nanites.</span>")
signal_relay(code, relay_code, comm_message, key_name(user))
signal_relay(code, relay_code, key_name(user))

/obj/item/nanite_remote/comm/signal_mob(mob/living/M, code, source)
SEND_SIGNAL(M, COMSIG_NANITE_COMM_SIGNAL, code, comm_message)
SEND_SIGNAL(M, COMSIG_NANITE_COMM_SIGNAL, code, comm_message, source)

/obj/item/nanite_remote/comm/signal_relay(code, relay_code, source)
for(var/X in SSnanites.nanite_relays)
Expand Down

0 comments on commit c9f9f2e

Please sign in to comment.