diff --git a/code/modules/research/nanites/nanite_chamber.dm b/code/modules/research/nanites/nanite_chamber.dm index 1fc2633989d..6e07752b142 100644 --- a/code/modules/research/nanites/nanite_chamber.dm +++ b/code/modules/research/nanites/nanite_chamber.dm @@ -228,4 +228,6 @@ /obj/machinery/nanite_chamber/MouseDrop_T(mob/target, mob/user) if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser()) return - close_machine(target) + if(close_machine(target)) + log_combat(user, target, "inserted", null, "into [src].") + add_fingerprint(user) diff --git a/code/modules/research/nanites/nanite_chamber_computer.dm b/code/modules/research/nanites/nanite_chamber_computer.dm index 31441788b87..295b53ed79b 100644 --- a/code/modules/research/nanites/nanite_chamber_computer.dm +++ b/code/modules/research/nanites/nanite_chamber_computer.dm @@ -121,14 +121,14 @@ if(!isnull(threshold)) chamber.set_safety(CLAMP(round(threshold, 1),0,500)) playsound(src, "terminal_type", 25, 0) - investigate_log("[key_name(chamber.occupant)]'s nanites' safety threshold was set to [threshold] by [key_name(usr)].", INVESTIGATE_NANITES) + chamber.occupant.investigate_log("'s nanites' safety threshold was set to [threshold] by [key_name(usr)] via [src] at [AREACOORD(src)].", INVESTIGATE_NANITES) . = TRUE if("set_cloud") var/cloud_id = input("Set cloud ID (1-100, 0 to disable):", name, null) as null|num if(!isnull(cloud_id)) chamber.set_cloud(CLAMP(round(cloud_id, 1),0,100)) playsound(src, "terminal_type", 25, 0) - investigate_log("[key_name(chamber.occupant)]'s nanites' cloud id was set to [cloud_id] by [key_name(usr)].", INVESTIGATE_NANITES) + chamber.occupant.investigate_log("'s nanites' cloud id was set to [cloud_id] by [key_name(usr)] via [src] at [AREACOORD(src)].", INVESTIGATE_NANITES) . = TRUE if("connect_chamber") find_chamber() @@ -136,14 +136,15 @@ if("nanite_injection") playsound(src, 'sound/machines/terminal_prompt.ogg', 25, 0) chamber.inject_nanites() - investigate_log("[key_name(chamber.occupant)] was injected with nanites by [key_name(usr)] using a nanite chamber.", INVESTIGATE_NANITES) + log_combat(usr, occupant, "injected", null, "with nanites via [src]") + chamber.occupant.investigate_log("was injected with nanites by [key_name(usr)] via [src] at [AREACOORD(src)].", INVESTIGATE_NANITES) . = TRUE if("add_program") if(!disk || !chamber || !chamber.occupant) return playsound(src, 'sound/machines/terminal_prompt.ogg', 25, 0) chamber.install_program(disk.program) - investigate_log("Program of type [disk.program.type] was installed into [key_name(chamber.occupant)]'s nanites with a nanite chamber by [key_name(usr)].", INVESTIGATE_NANITES) + chamber.occupant.investigate_log("had program of type [disk.program.type] installed by [key_name(usr)] via [src] at [AREACOORD(src)].", INVESTIGATE_NANITES) . = TRUE if("remove_program") if(!chamber || !chamber.occupant) @@ -154,5 +155,5 @@ if(LAZYLEN(nanite_programs)) var/datum/nanite_program/P = nanite_programs[text2num(params["program_id"])] chamber.uninstall_program(P) - investigate_log("Program of type [P.type] was uninstalled from [key_name(chamber.occupant)]'s nanites with a nanite chamber by [key_name(usr)].", INVESTIGATE_NANITES) - . = TRUE \ No newline at end of file + chamber.occupant.investigate_log("had program of type [P.type] uninstalled by [key_name(usr)] via [src] at [AREACOORD(src)].", INVESTIGATE_NANITES) + . = TRUE diff --git a/code/modules/research/nanites/nanite_programs.dm b/code/modules/research/nanites/nanite_programs.dm index 61d970d3cb1..d669d04fb09 100644 --- a/code/modules/research/nanites/nanite_programs.dm +++ b/code/modules/research/nanites/nanite_programs.dm @@ -231,15 +231,15 @@ /datum/nanite_program/proc/receive_signal(code, source) if(activation_code && code == activation_code && !activated) activate() - host_mob.investigate_log("[host_mob]'s [name] nanite program was activated by [source] with code [code].", INVESTIGATE_NANITES) + host_mob.investigate_log("'s [name] nanite program was activated by [source] with code [code].", INVESTIGATE_NANITES) else if(deactivation_code && code == deactivation_code && activated) deactivate() - host_mob.investigate_log("[host_mob]'s [name] nanite program was deactivated by [source] with code [code].", INVESTIGATE_NANITES) + host_mob.investigate_log("'s [name] nanite program was deactivated by [source] with code [code].", INVESTIGATE_NANITES) if(can_trigger && trigger_code && code == trigger_code) trigger() - host_mob.investigate_log("[host_mob]'s [name] nanite program was triggered by [source] with code [code].", INVESTIGATE_NANITES) + host_mob.investigate_log("'s [name] nanite program was triggered by [source] with code [code].", INVESTIGATE_NANITES) if(kill_code && code == kill_code) - host_mob.investigate_log("[host_mob]'s [name] nanite program was deleted by [source] with code [code].", INVESTIGATE_NANITES) + host_mob.investigate_log("'s [name] nanite program was deleted by [source] with code [code].", INVESTIGATE_NANITES) qdel(src) /datum/nanite_program/proc/get_timer_type_text() diff --git a/code/modules/research/nanites/nanite_programs/utility.dm b/code/modules/research/nanites/nanite_programs/utility.dm index 9f88f4a23fc..c6d25b5cabc 100644 --- a/code/modules/research/nanites/nanite_programs/utility.dm +++ b/code/modules/research/nanites/nanite_programs/utility.dm @@ -243,7 +243,7 @@ //this will potentially take over existing nanites! infectee.AddComponent(/datum/component/nanites, 10) SEND_SIGNAL(infectee, COMSIG_NANITE_SYNC, nanites) - infectee.investigate_log("[key_name(infectee)] was infected by spreading nanites by [key_name(host_mob)]", INVESTIGATE_NANITES) + infectee.investigate_log("was infected by spreading nanites by [key_name(host_mob)] at [AREACOORD(infectee)].", INVESTIGATE_NANITES) /datum/nanite_program/mitosis name = "Mitosis" diff --git a/code/modules/research/nanites/public_chamber.dm b/code/modules/research/nanites/public_chamber.dm index 9f0a14c6573..f55b3136893 100644 --- a/code/modules/research/nanites/public_chamber.dm +++ b/code/modules/research/nanites/public_chamber.dm @@ -32,7 +32,7 @@ busy_icon_state = working_icon update_icon() -/obj/machinery/public_nanite_chamber/proc/inject_nanites() +/obj/machinery/public_nanite_chamber/proc/inject_nanites(mob/living/attacker) if(stat & (NOPOWER|BROKEN)) return if((stat & MAINT) || panel_open) @@ -47,14 +47,17 @@ set_busy(TRUE, "[initial(icon_state)]_raising") addtimer(CALLBACK(src, .proc/set_busy, TRUE, "[initial(icon_state)]_active"),20) addtimer(CALLBACK(src, .proc/set_busy, TRUE, "[initial(icon_state)]_falling"),60) - addtimer(CALLBACK(src, .proc/complete_injection, locked_state),80) + addtimer(CALLBACK(src, .proc/complete_injection, locked_state, attacker),80) -/obj/machinery/public_nanite_chamber/proc/complete_injection(locked_state) +/obj/machinery/public_nanite_chamber/proc/complete_injection(locked_state, mob/living/attacker) //TODO MACHINE DING locked = locked_state set_busy(FALSE) if(!occupant) return + if(attacker) + occupant.investigate_log("was injected with nanites by [key_name(attacker)] using [src] at [AREACOORD(src)].", INVESTIGATE_NANITES) + log_combat(attacker, occupant, "injected", null, "with nanites via [src]") occupant.AddComponent(/datum/component/nanites, 75, cloud_id) /obj/machinery/public_nanite_chamber/update_icon() @@ -94,7 +97,7 @@ return if(state_open) - close_machine() + close_machine(null, user) return else if(locked) @@ -122,7 +125,7 @@ "You successfully break out of [src]!") open_machine() -/obj/machinery/public_nanite_chamber/close_machine(mob/living/carbon/user) +/obj/machinery/public_nanite_chamber/close_machine(mob/living/carbon/user, mob/living/attacker) if(!state_open) return FALSE @@ -130,15 +133,15 @@ . = TRUE - addtimer(CALLBACK(src, .proc/try_inject_nanites), 30) //If someone is shoved in give them a chance to get out before the injection starts + addtimer(CALLBACK(src, .proc/try_inject_nanites, attacker), 30) //If someone is shoved in give them a chance to get out before the injection starts -/obj/machinery/public_nanite_chamber/proc/try_inject_nanites() +/obj/machinery/public_nanite_chamber/proc/try_inject_nanites(mob/living/attacker) if(occupant) var/mob/living/L = occupant if(SEND_SIGNAL(L, COMSIG_HAS_NANITES)) return if((MOB_ORGANIC in L.mob_biotypes) || (MOB_UNDEAD in L.mob_biotypes)) - inject_nanites() + inject_nanites(attacker) /obj/machinery/public_nanite_chamber/open_machine() if(state_open) @@ -175,4 +178,6 @@ /obj/machinery/public_nanite_chamber/MouseDrop_T(mob/target, mob/user) if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser()) return - close_machine(target) + if(close_machine(target, user)) + log_combat(user, target, "inserted", null, "into [src].") + add_fingerprint(user)