diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index d684c524397..b5fab892896 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -74,13 +74,15 @@ Proc for attack log creation, because really why not 1 argument is the actor 2 argument is the target of action 3 is the description of action(like punched, throwed, or any other verb) -4 is the tool with which the action was made(usually item) -5 is additional information, anything that needs to be added +4 should it make adminlog note or not +5 is the tool with which the action was made(usually item) 5 and 6 are very similar(5 have "by " before it, that it) and are separated just to keep things in a bit more in order +6 is additional information, anything that needs to be added */ -proc/add_logs(mob/user, mob/target, what_done, var/object=null, var/addition=null) - if(ismob(user)) - user.attack_log += text("\[[time_stamp()]\] Has [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]") - if(ismob(target)) - target.attack_log += text("\[[time_stamp()]\] Has been [what_done] by [user.name][ismob(user) ? "([user.ckey])" : ""][object ? " with [object]" : " "][addition]") - log_attack("[user.name][ismob(user) ? "([user.ckey])" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]") \ No newline at end of file +proc/add_logs(mob/user, mob/target, what_done, var/admin=1, var/object=null, var/addition=null) + if(user && ismob(user)) + user.attack_log += text("\[[time_stamp()]\] Has [what_done] [target ? "[target.name][target.ckey ? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]") + if(target && ismob(target)) + target.attack_log += text("\[[time_stamp()]\] Has been [what_done] by [user ? "[user.name][user.ckey ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]") + if(admin) + log_attack("[user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"] [what_done] [target ? "[target.name][(ismob(target) && target.ckey)? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]") \ No newline at end of file diff --git a/code/datums/wires/airlock.dm b/code/datums/wires/airlock.dm index bfb29aaa342..f8863b0569b 100644 --- a/code/datums/wires/airlock.dm +++ b/code/datums/wires/airlock.dm @@ -97,7 +97,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048 //Cutting this wire electrifies the door, so that the next person to touch the door without insulated gloves gets electrocuted. if(A.secondsElectrified != -1) A.shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])") - usr.attack_log += text("\[[time_stamp()]\] Electrified the [A.name] at [A.x] [A.y] [A.z]") + add_logs(usr, A, "electrified", admin=0, addition="at [A.x],[A.y],[A.z]") A.secondsElectrified = -1 else if(A.secondsElectrified == -1) @@ -163,7 +163,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048 //one wire for electrifying the door. Sending a pulse through this electrifies the door for 30 seconds. if(A.secondsElectrified==0) A.shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])") - usr.attack_log += text("\[[time_stamp()]\] Electrified the [A.name] at [A.x] [A.y] [A.z]") + add_logs(usr, A, "electrified", admin=0, addition="at [A.x],[A.y],[A.z]") A.secondsElectrified = 30 spawn(10) if(A) diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 12df5237a1f..31b7ea0c884 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -460,12 +460,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", // usr << browse(null, "window=tank") attack(mob/living/M as mob, mob/living/user as mob) - M.attack_log += text("\[[time_stamp()]\] Has had the [name] used on him by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used [name] on [M.name] ([M.ckey])") - - log_attack("[user.name] ([user.ckey]) used [name] on [M.name] ([M.ckey])") - - + add_logs(user, M, "smacked", object=src) if(istype(M,/mob/dead)) M.invisibility = 0 user.visible_message( \ diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm index c91452b7992..5db247ee458 100644 --- a/code/game/gamemodes/wizard/soulstone.dm +++ b/code/game/gamemodes/wizard/soulstone.dm @@ -18,11 +18,7 @@ return ..() if(istype(M, /mob/living/carbon/human/dummy)) return..() - M.attack_log += text("\[[time_stamp()]\] Has had their soul captured with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to capture the soul of [M.name] ([M.ckey])") - - log_attack("[user.name] ([user.ckey]) used the [src.name] to capture the soul of [M.name] ([M.ckey])") - + add_logs(user, M, "captured [M.name]'s soul", object=src) transfer_soul("VICTIM", M, user) return diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm index 8ef8c76f62c..1d752a03258 100644 --- a/code/game/machinery/bots/bots.dm +++ b/code/game/machinery/bots/bots.dm @@ -64,7 +64,7 @@ if(M.melee_damage_upper == 0) return src.health -= M.melee_damage_upper src.visible_message("\red [M] has [M.attacktext] [src]!") - M.attack_log += text("\[[time_stamp()]\] attacked [src.name]") + add_logs(M, src, "attacked", admin=0) if(prob(10)) new /obj/effect/decal/cleanable/oil(src.loc) healthcheck() diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 28bd134663f..65565f86b73 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -764,7 +764,7 @@ About the new airlock wires panel: usr << text("The door is already electrified. You can't re-electrify it while it's already electrified.
\n") else shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])") - usr.attack_log += text("\[[time_stamp()]\] Electrified the [name] at [x] [y] [z]") + add_logs(usr, src, "electrified", admin=0, addition="at [x],[y],[z]") src.secondsElectrified = 30 spawn(10) while (src.secondsElectrified>0) @@ -783,7 +783,7 @@ About the new airlock wires panel: usr << text("The door is already electrified. You can't re-electrify it while it's already electrified.
\n") else shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])") - usr.attack_log += text("\[[time_stamp()]\] Electrified the [name] at [x] [y] [z]") + add_logs(usr, src, "electrified", admin=0, addition="at [x],[y],[z]") src.secondsElectrified = -1 if (8) // Not in order >.> diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index 0e6306bc13a..da354f5261e 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -153,9 +153,7 @@ src.occupant.reagents.trans_to (newmeat, round (sourcetotalreagents / totalslabs, 1)) // Transfer all the reagents from the allmeat[i] = newmeat - src.occupant.attack_log += "\[[time_stamp()]\] Was gibbed by [user]/[user.ckey]" //One shall not simply gib a mob unnoticed! - user.attack_log += "\[[time_stamp()]\] Gibbed [src.occupant]/[src.occupant.ckey]" - log_attack("\[[time_stamp()]\] [user]/[user.ckey] gibbed [src.occupant]/[src.occupant.ckey]") + add_logs(user, occupant, "gibbed") src.occupant.death(1) src.occupant.ghostize() del(src.occupant) diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm index 39da02b0e1d..0ebb0332c89 100644 --- a/code/game/machinery/turrets.dm +++ b/code/game/machinery/turrets.dm @@ -408,7 +408,7 @@ if(M.melee_damage_upper == 0) return if(!(stat & BROKEN)) visible_message("\red [M] [M.attacktext] [src]!") - M.attack_log += text("\[[time_stamp()]\] attacked [src.name]") + add_logs(M, src, "attacked", admin=0) //src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") src.health -= M.melee_damage_upper if (src.health <= 0) diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm index 47a9dceb58f..8bc32a61042 100644 --- a/code/game/mecha/combat/combat.dm +++ b/code/game/mecha/combat/combat.dm @@ -79,9 +79,7 @@ M.updatehealth() src.occupant_message("You hit [target].") src.visible_message("[src.name] hits [target].") - occupant.attack_log += "\[[time_stamp()]\] Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])" - M.attack_log += "\[[time_stamp()]\] Attacked by [occupant.name] ([occupant.ckey]) with [name] (INTENT: [uppertext(occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])" - log_attack("[occupant.name] ([occupant.ckey]) attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(occupant.a_intent)]) (DAMTYE: [uppertext(src.damtype)])" ) + add_logs(occupant, M, "attacked", object=src, addition="(INTENT: [uppertext(occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])") else step_away(M,src) src.occupant_message("You push [target] out of the way.") diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 596286850fc..26b63577644 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -195,9 +195,7 @@ if(to_inject && occupant.reagents.get_reagent_amount(R.id) + to_inject <= inject_amount*2) occupant_message("Injecting [occupant] with [to_inject] units of [R.name].") log_message("Injecting [occupant] with [to_inject] units of [R.name].") - occupant.attack_log += "\[[time_stamp()]\] Has been injected with [name] ([R] - [to_inject] units) by [chassis.occupant.name] ([chassis.occupant.ckey])" - chassis.occupant.attack_log += "\[[time_stamp()]\] Used the [name] ([R] - [to_inject] units) to inject [occupant.name] ([occupant.ckey])" - log_attack("[chassis.occupant.name] ([chassis.occupant.ckey]) used the [name] ([R] - [to_inject] units) to inject [occupant.name] ([occupant.ckey])") + add_logs(chassis.occupant, occupant, "injected", object="[name] ([R] - [to_inject] units)") SG.reagents.trans_id_to(occupant,R.id,to_inject) update_equip_info() return @@ -468,8 +466,6 @@ S.icon_state = "syringeproj" playsound(chassis, 'sound/items/syringeproj.ogg', 50, 1) log_message("Launched [S] from [src], targeting [target].") - var/O = "[chassis.occupant]" - var/C = "[chassis.occupant.ckey]" var/mob/originaloccupant = chassis.occupant spawn(-1) src = null //if src is deleted, still process the syringe @@ -492,10 +488,7 @@ S.reagents.trans_to(M, S.reagents.total_volume) M.take_organ_damage(2) S.visible_message(" [M] was hit by the syringe!") - M.attack_log += "\[[time_stamp()]\] [O]/[C] shot [M]/[M.ckey] with a syringegun ([R])" - if(originaloccupant) - originaloccupant.attack_log += "\[[time_stamp()]\] [originaloccupant]/[originaloccupant.ckey] shot [M]/[M.ckey] with a syringegun ([R])" - log_attack("[O] ([C]) shot [M] ([M.ckey]) with a syringegun ([R])") + add_logs(originaloccupant, M, "shot", object="syringegun") break else if(S.loc == trg) S.icon_state = initial(S.icon_state) diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index 2e473dfbc92..45af1887d34 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -54,9 +54,7 @@ M.updatehealth() occupant_message("\red You squeeze [target] with [src.name]. Something cracks.") chassis.visible_message("\red [chassis] squeezes [target].") - chassis.occupant.attack_log += "\[[time_stamp()]\] Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])" - M.attack_log += "\[[time_stamp()]\] Attacked by [chassis.occupant.name] ([chassis.occupant.ckey]) with [name] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])" - log_attack("[chassis.occupant.name] ([chassis.occupant.ckey]) attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(src.damtype)])" ) + add_logs(chassis.occupant, M, "attacked", object="[name]", addition="(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])") else step_away(M,chassis) occupant_message("You push [target] out of the way.") @@ -115,9 +113,7 @@ log_message("Drilled through [target]") if(ismob(target)) var/mob/M = target - chassis.occupant.attack_log += "\[[time_stamp()]\] Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])" - M.attack_log += "\[[time_stamp()]\] Attacked by [chassis.occupant.name] ([chassis.occupant.ckey]) with [name] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])" - log_attack("[chassis.occupant.name] ([chassis.occupant.ckey]) attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(src.damtype)])" ) + add_logs(chassis.occupant, M, "attacked", object="[name]", addition="(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])") target.ex_act(2) return 1 @@ -177,9 +173,7 @@ log_message("Drilled through [target]") if(ismob(target)) var/mob/M = target - chassis.occupant.attack_log += "\[[time_stamp()]\] Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])" - M.attack_log += "\[[time_stamp()]\] Attacked by [chassis.occupant.name] ([chassis.occupant.ckey]) with [name] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])" - log_attack("[chassis.occupant.name] ([chassis.occupant.ckey]) attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(src.damtype)])" ) + add_logs(chassis.occupant, M, "attacked", object="[name]", addition="(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])") target.ex_act(2) return 1 diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 9e925a7c83c..7f11042aff4 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -84,13 +84,7 @@ src.life -= 10 if(ismob(A)) var/mob/M = A - if(istype(firer, /mob)) - M.attack_log += "\[[time_stamp()]\] [firer]/[firer.ckey] shot [M]/[M.ckey] with a [src]" - firer.attack_log += "\[[time_stamp()]\] [firer]/[firer.ckey] shot [M]/[M.ckey] with a [src]" - log_attack("[firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src]") - else - M.attack_log += "\[[time_stamp()]\] UNKNOWN SUBJECT (No longer exists) shot [M]/[M.ckey] with a [src]" - log_attack("UNKNOWN shot [M] ([M.ckey]) with a [src]") + add_logs(firer, M, "shot", object="[src]") if(life <= 0) del(src) return diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 384b5731552..770d34972c6 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -458,13 +458,13 @@ src.take_damage(damage) src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) visible_message("\red [user] [user.attacktext] [src]!") - user.attack_log += text("\[[time_stamp()]\] attacked [src.name]") + add_logs(user, src, "attacked", admin=0) else src.log_append_to_last("Armor saved.") playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1) src.occupant_message("\blue The [user]'s attack is stopped by the armor.") visible_message("\blue The [user] rebounds off [src.name]'s armor!") - user.attack_log += text("\[[time_stamp()]\] attacked [src.name]") + add_logs(user, src, "attacked", admin=0) return /obj/mecha/attack_tk() diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index cbc47d65df8..0d161121de8 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -195,7 +195,7 @@ rejections += I.type // therefore full bags are still a little spammy failure = 1 continue - + success = 1 S.handle_item_insertion(I, 1) //The 1 stops the "You put the [src] into [S]" insertion message from being displayed. if(success && !failure) @@ -488,10 +488,7 @@ user << "\red You cannot locate any eyes on this creature!" return - user.attack_log += "\[[time_stamp()]\] Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" - M.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" - - log_attack(" [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + add_logs(user, M, "attacked", object="[src.name]", addition="(INTENT: [uppertext(user.a_intent)])") src.add_fingerprint(user) //if((CLUMSY in user.mutations) && prob(50)) diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 9da2de88f06..abc5d6b2fdd 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -14,11 +14,7 @@ if(!istype(M, /mob/living/silicon/ai))//If target is not an AI. return ..() - M.attack_log += text("\[[time_stamp()]\] Has been carded with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to card [M.name] ([M.ckey])") - - log_attack("[user.name] ([user.ckey]) used the [src.name] to card [M.name] ([M.ckey])") - + add_logs(user, M, "carded", object="[src.name]") transfer_ai("AICORE", "AICARD", M, user) return diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 6fe599cdc4c..5fa3f153db6 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -40,11 +40,8 @@ /obj/item/device/flash/attack(mob/living/M, mob/user) if(!user || !M) return //sanity - M.attack_log += text("\[[time_stamp()]\] Has been flashed (attempt) with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to flash [M.name] ([M.ckey])") - - log_attack("[user.name] ([user.ckey]) Used the [src.name] to flash [M.name] ([M.ckey])") + add_logs(user, M, "flashed", object="[src.name]") if(!clown_check(user)) return if(broken) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 732541f6d3d..9bb8d49df9e 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -235,9 +235,7 @@ "[user] blinks \the [src] at \the [A].") if(ismob(A)) var/mob/M = A - M.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] attacked [M]/[M.ckey] with an EMP-light" - user.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] attacked [M]/[M.ckey] with an EMP-light" - log_attack("[user] ([user.ckey]) attacked [M] ([M.ckey]) with an EMP-light") + add_logs(user, M, "attacked", object="EMP-light") emp_charges -= 1 else user << "The [src] is out of charges!" diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index bb327ce0160..061feddbdce 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -73,9 +73,7 @@ //20% chance to actually hit the eyes if(prob(20)) - C.attack_log += text("\[[time_stamp()]\] Has had a laser pointer shone in their eyes by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Shone a laser pointer in the eyes of [C.name] ([C.ckey])") - log_attack("[user.name] ([user.ckey]) Shone a laser pointer in the eyes of [C.name] ([C.ckey])") + add_logs(user, C, "shone in the eyes", object="laser pointer") //eye target check outmsg = "You blind [C] by shining [src] in their eyes." @@ -127,10 +125,7 @@ S.Weaken(rand(5,10)) S << "Your sensors were overloaded by a laser!" outmsg = "You overload [S] by shining [src] at their sensors." - - S.attack_log += text("\[[time_stamp()]\] Has had a laser pointer shone in their eyes by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Shone a laser pointer in the eyes of [S.name] ([S.ckey])") - log_attack("[user.name] ([user.ckey]) Shone a laser pointer in the eyes of [S.name] ([S.ckey])") + add_logs(user, S, "shone in the sensors", object="laser pointer") else outmsg = "You fail to overload [S] by shining [src] at their sensors." @@ -140,9 +135,7 @@ if(prob(20)) C.emp_act(1) outmsg = "You hit the lens of [C] with [src], temporarily disabling the camera!" - - log_admin("\[[time_stamp()]\] [user.name] ([user.ckey]) EMPd a camera with a laser pointer") - user.attack_log += text("\[[time_stamp()]\] [user.name] ([user.ckey]) EMPd a camera with a laser pointer") + add_logs(user, C, "EMPed", object="laser pointer") else outmsg = "You missed the lens of [C] with [src]." diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index 9cb58f01c7e..62eb994bfd4 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -36,7 +36,7 @@ effective or pretty fucking useless. user << "\red The mind batterer has been burnt out!" return - user.attack_log += text("\[[time_stamp()]\] Used [src] to knock down people in the area.") + add_logs(user, null, "knocked down people in the area", admin=0, object="[src]") for(var/mob/living/carbon/human/M in orange(10, user)) spawn() diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index cb3f99fa4c3..bb3bac188bd 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -10,10 +10,6 @@ icon_state = "shock" attack(mob/M as mob, mob/living/silicon/robot/user as mob) - M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") - - log_attack(" [user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey])") user.cell.charge -= 30 diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index c0a891ff786..55b4b82d0c0 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -44,10 +44,7 @@ if(!ishuman(user)) user << "You don't have the dexterity to do this!" return - - target.attack_log += "\[[time_stamp()]\] [user.name] ([user.ckey]) attempted to inject with [name]" - user.attack_log += "\[[time_stamp()]\] Used the [name] to attempt to inject [target.name] ([target.ckey])" - log_attack("[user.name] ([user.ckey]) used the [name] to attempt to inject [target.name] ([target.ckey])") + add_logs(user, target, "attempted to inject", object="[name]") if(target != user) target.visible_message("[user] is trying to inject [target] with [src]!", "[user] is trying to inject [target] with [src]!") @@ -58,9 +55,7 @@ else user << "You inject yourself with [src]." - target.attack_log += "\[[time_stamp()]\] Has been injected with [name] by [user.name] ([user.ckey])" - user.attack_log += "\[[time_stamp()]\] Used the [name] to inject [target.name] ([target.ckey])" - log_attack("[user.name] ([user.ckey]) used the [name] to inject [target.name] ([target.ckey])") + add_logs(user, target, "injected", object="[name]") user.drop_item() inject(target, user) //Now we actually do the heavy lifting. diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index bc10c25778e..5531dda9ca1 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -60,8 +60,7 @@ return user << "Planting explosives..." if(ismob(target)) - user.attack_log += "\[[time_stamp()]\] [user.real_name] tried planting [name] on [target:real_name] ([target:ckey])" - log_attack(" [user.real_name] ([user.ckey]) tried planting [name] on [target:real_name] ([target:ckey])") + add_logs(user, target, "tried to plant explosives on", object="[name]") user.visible_message("\red [user.name] is trying to plant some kind of explosive on [target.name]!") @@ -71,7 +70,7 @@ loc = null if (ismob(target)) - target:attack_log += "\[[time_stamp()]\] Had the [name] planted on them by [user.real_name] ([user.ckey])" + add_logs(user, target, "planted [name] on") user.visible_message("\red [user.name] finished planting an explosive on [target.name]!") target.overlays += image('icons/obj/assemblies.dmi', "plastic-explosive2") diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 82bb759e4dc..bb3761a00e9 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -53,10 +53,7 @@ else feedback_add_details("handcuffs","H") - C.attack_log += text("\[[time_stamp()]\] Has been handcuffed (attempt) by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Attempted to handcuff [C.name] ([C.ckey])") - log_attack("[user.name] ([user.ckey]) Attempted to handcuff [C.name] ([C.ckey])") - + add_logs(user, C, "handcuffed") /obj/item/weapon/handcuffs/cable name = "cable restraints" diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index c625b4c087d..8aba8b023fa 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -26,10 +26,7 @@ if(T && (M == user || do_after(user, 50))) if(user && M && (get_turf(M) == T) && src && imp) M.visible_message("[M] has been implanted by [user].") - M.attack_log += text("\[[time_stamp()]\] Implanted with [name] ([imp.name]) by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [name] ([imp.name]) to implant [M.name] ([M.ckey])") - log_attack("[user.name] ([user.ckey]) implanted [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)])") - + add_logs(user, M, "implanted", object="[name]") user << "You implanted the implant into [M]." if(imp.implanted(M)) imp.loc = M diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index 53bec2de81f..0e976b8038c 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -165,10 +165,8 @@ user.take_organ_damage(10) user.Paralyse(2) return - M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") - log_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey])") + add_logs(user, M, "attacked", object="[src.name]") var/t = user:zone_sel.selecting if (t == "head") @@ -249,11 +247,7 @@ if (istype(location, /turf/simulated)) location.add_blood(H) ///Plik plik, the sound of blood - M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") - - log_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey])") - + add_logs(user, M, "attacked", object="[src.name]") if(prob(15)) M.Weaken(3) diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index a5b8b6dcf55..379e1f319a5 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -39,10 +39,7 @@ else user.take_organ_damage(2 * force) return - - M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") - log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + add_logs(user, M, "attacked", object="[src.name]") if(user.a_intent == "harm") if(!..()) return diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm index 944c33382af..b9d760bdf11 100644 --- a/code/game/objects/items/weapons/storage/bible.dm +++ b/code/game/objects/items/weapons/storage/bible.dm @@ -38,11 +38,7 @@ if(user.mind && (user.mind.assigned_role == "Chaplain")) chaplain = 1 - - M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") - - log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + add_logs(user, M, "attacked", object="[src.name]") if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") user << "\red You don't have the dexterity to do this!" diff --git a/code/game/objects/items/weapons/storage/briefcase.dm b/code/game/objects/items/weapons/storage/briefcase.dm index f5dcc2135f0..23b73d51474 100644 --- a/code/game/objects/items/weapons/storage/briefcase.dm +++ b/code/game/objects/items/weapons/storage/briefcase.dm @@ -29,11 +29,7 @@ user.Paralyse(2) return - - M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") - - log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + add_logs(user, M, "attacked", object="[src.name]") if (M.stat < 2 && M.health < 50 && prob(90)) var/mob/H = M diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 65eefe00a51..6e5ee52781b 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -137,9 +137,7 @@ var/mob/living/carbon/human/H = L H.forcesay(hit_appends) - user.attack_log += "\[[time_stamp()]\] Stunned [L.name] ([L.ckey]) with [name]" - L.attack_log += "\[[time_stamp()]\] Stunned by [user.name] ([user.ckey]) with [name]" - log_attack("[user.name] ([user.ckey]) stunned [L.name] ([L.ckey]) with [name]" ) + add_logs(user, L, "stunned") /obj/item/weapon/melee/baton/emp_act(severity) if(bcell) diff --git a/code/modules/hydroponics/hydroitemcode.dm b/code/modules/hydroponics/hydroitemcode.dm index 5923ee8af38..8d2093dd126 100644 --- a/code/modules/hydroponics/hydroitemcode.dm +++ b/code/modules/hydroponics/hydroitemcode.dm @@ -70,10 +70,7 @@ if(!..()) return if(istype(M, /mob/living)) M << "\red You are stunned by the powerful acid of the Deathnettle!" - M.attack_log += text("\[[time_stamp()]\] Had the [src.name] used on them by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] on [M.name] ([M.ckey])") - - log_attack(" [user.name] ([user.ckey]) used the [src.name] on [M.name] ([M.ckey])") + add_logs(user, M, "attacked", object="[src.name]") playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 69537b98bbf..f7ca9723844 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -143,8 +143,7 @@ O.show_message("\red [M] [M.attacktext] [src]!", 1) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) adjustBruteLoss(damage) - M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") + add_logs(M, src, "attacked", admin=0) updatehealth() diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 871f9a7712a..d9e5925f20e 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -365,8 +365,7 @@ var/start_T_descriptor = "tile at [start_T.x], [start_T.y], [start_T.z] in area [get_area(start_T)]" var/end_T_descriptor = "tile at [end_T.x], [end_T.y], [end_T.z] in area [get_area(end_T)]" - M.attack_log += text("\[[time_stamp()]\] Has been thrown by [usr.name] ([usr.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]") - usr.attack_log += text("\[[time_stamp()]\] Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]") + add_logs(usr, M, "thrown", admin=0, addition="from [start_T_descriptor] with the target [end_T_descriptor]") if(!item) return //Grab processing has a chance of returning null diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 0125ca4ff44..65d636566f6 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -237,8 +237,7 @@ playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("\red [M] [M.attacktext] [src]!", 1) - M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") + add_logs(M, src, "attacked", admin=0) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg") var/obj/item/organ/limb/affecting = get_organ(ran_zone(dam_zone)) diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index 62c6efc75df..7e967fbf1f9 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -318,8 +318,7 @@ playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("\red [M] [M.attacktext] [src]!", 1) - M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") + add_logs(M, src, "attacked", admin=0) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) adjustBruteLoss(damage) updatehealth() diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index d85711f414d..a37cc7af9a5 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -254,8 +254,7 @@ playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("\red [M] [M.attacktext] [src]!", 1) - M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") + add_logs(M, src, "attacked", admin=0) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) adjustBruteLoss(damage) updatehealth() diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 7daac632502..b43fddb1a83 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -71,9 +71,7 @@ var/client/assailant = directory[ckey(O.fingerprintslast)] if(assailant && assailant.mob && istype(assailant.mob,/mob)) var/mob/M = assailant.mob - src.attack_log += text("\[[time_stamp()]\] Has been hit with [O], last touched by [M.name] ([assailant.ckey])") - M.attack_log += text("\[[time_stamp()]\] Hit [src.name] ([src.ckey]) with [O]") - log_attack("[src.name] ([src.ckey]) was hit by [O], last touched by [M.name] ([assailant.ckey])") + add_logs(M, src, "hit", object="[O]") //Mobs on Fire /mob/living/proc/IgniteMob() diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 746eeb0b287..eb6292fa4a5 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -438,8 +438,7 @@ var/list/ai_list = list() playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("\red [M] [M.attacktext] [src]!", 1) - M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") + add_logs(M, src, "attacked", admin=0) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) adjustBruteLoss(damage) updatehealth() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index d304938bd40..79d8a321b66 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -719,8 +719,7 @@ playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("\red [M] [M.attacktext] [src]!", 1) - M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") + add_logs(M, src, "attacked", admin=0) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) adjustBruteLoss(damage) updatehealth() diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index af9d801b5a0..47078644b3a 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -99,8 +99,7 @@ playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("\The [M] [M.attacktext] \the [src]!", 1) - M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") + add_logs(M, src, "attacked", admin=0) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) adjustBruteLoss(damage) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 64d25530f96..9f12a4b03bd 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -246,8 +246,7 @@ playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("\red \The [M] [M.attacktext] [src]!", 1) - M.attack_log += text("\[[time_stamp()]\] attacked [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] was attacked by [M.name] ([M.ckey])") + add_logs(M, src, "attacked", admin=0) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) adjustBruteLoss(damage) diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 5ce7ec26399..9107fcd7577 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -134,9 +134,7 @@ icon_state = "grabbed+1" if(!affecting.buckled) affecting.loc = assailant.loc - affecting.attack_log += "\[[time_stamp()]\] Has had their neck grabbed by [assailant.name] ([assailant.ckey])" - assailant.attack_log += "\[[time_stamp()]\] Grabbed the neck of [affecting.name] ([affecting.ckey])" - log_attack("[assailant.name] ([assailant.ckey]) grabbed the neck of [affecting.name] ([affecting.ckey])") + add_logs(assailant, affecting, "neck-grabbed") hud.icon_state = "disarm/kill" hud.name = "disarm/kill" else @@ -155,9 +153,7 @@ return state = GRAB_KILL assailant.visible_message("[assailant] has tightened \his grip on [affecting]'s neck!") - affecting.attack_log += "\[[time_stamp()]\] Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])" - assailant.attack_log += "\[[time_stamp()]\] Strangled (kill intent) [affecting.name] ([affecting.ckey])" - log_attack("[assailant.name] ([assailant.ckey]) Strangled (kill intent) [affecting.name] ([affecting.ckey])") + add_logs(assailant, affecting, "strangled") assailant.next_move = world.time + 10 affecting.losebreath += 1 diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 2ab3c71d57a..ec082b6d205 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -49,10 +49,7 @@ user << "You stab [M] with the pen." M << "\red You feel a tiny prick!" - M.attack_log += text("\[[time_stamp()]\] Has been stabbed with [name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [name] to stab [M.name] ([M.ckey])") - log_attack("[user.name] ([user.ckey]) Used the [name] to stab [M.name] ([M.ckey])") - + add_logs(user, M, "stabbed", object="[name]") /* * Sleepy Pens diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 0c642252bc4..7bf4f1f059f 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -85,14 +85,7 @@ else M.visible_message("[M] is hit by [src] in the [parse_zone(def_zone)]!", \ "[M] is hit by [src] in the [parse_zone(def_zone)]!") //X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter - - if(istype(firer, /mob)) - M.attack_log += "\[[time_stamp()]\] [firer]/[firer.ckey] shot [M]/[M.ckey] with a [src]" - firer.attack_log += "\[[time_stamp()]\] [firer]/[firer.ckey] shot [M]/[M.ckey] with a [src]" - log_attack("[firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src]") - else - M.attack_log += "\[[time_stamp()]\] UNKNOWN SUBJECT (No longer exists) shot [M]/[M.ckey] with a [src]" - log_attack("UNKNOWN shot [M] ([M.ckey]) with a [src]") + add_logs(firer, M, "shot", object="[src]") spawn(0) if(A) diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index 465b51d966a..84c7982c123 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -63,9 +63,7 @@ for(var/datum/reagent/A in src.reagents.reagent_list) R += A.id + " (" R += num2text(A.volume) + ")," - user.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] squirted [M]/[M.ckey] with ([R])" - M.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] squirted [M]/[M.ckey] with ([R])" - log_attack("\[[time_stamp()]\] [user]/[user.ckey] squirted [M]/[M.ckey] with ([R])") + add_logs(user, M, "squirted", object="[R]") trans = src.reagents.trans_to(target, amount_per_transfer_from_this) user << "You transfer [trans] unit\s of the solution." diff --git a/code/modules/reagents/reagent_containers/food/condiment.dm b/code/modules/reagents/reagent_containers/food/condiment.dm index 06fd2b45319..cb072c3f6ae 100644 --- a/code/modules/reagents/reagent_containers/food/condiment.dm +++ b/code/modules/reagents/reagent_containers/food/condiment.dm @@ -42,12 +42,7 @@ if(!do_mob(user, M)) return for(var/mob/O in viewers(world.view, user)) O.show_message("\red [user] feeds [M] [src].", 1) - - M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") - user.attack_log += text("\[[time_stamp()]\] Fed [src.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") - - - log_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + add_logs(user, M, "fed", object="[reagentlist(src)]") if(reagents.total_volume) reagents.reaction(M, INGEST) diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index 8929907d7d9..c4fe671ebec 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -42,13 +42,7 @@ if(!do_mob(user, M)) return for(var/mob/O in viewers(world.view, user)) O.show_message("\red [user] feeds [M] [src].", 1) - - M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") - user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") - - log_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") - - + add_logs(user, M, "fed", object="[reagentlist(src)]") if(reagents.total_volume) reagents.reaction(M, INGEST) spawn(5) @@ -327,7 +321,7 @@ icon_state = "lemon-lime" New() ..() - name = "Lemon-Lime" + name = "Lemon-Lime" reagents.add_reagent("lemon_lime", 30) src.pixel_x = rand(-10.0, 10) src.pixel_y = rand(-10.0, 10) @@ -381,4 +375,4 @@ ..() reagents.add_reagent("dr_gibb", 30) src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) + src.pixel_y = rand(-10.0, 10) diff --git a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm index 3216877d305..cadaecc6918 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm @@ -97,9 +97,7 @@ else O.show_message(text("\red [target] has attacked himself with a bottle of [src.name]!"), 1) //Attack logs - user.attack_log += text("\[[time_stamp()]\] Has attacked [target.name] ([target.ckey]) with a bottle!") - target.attack_log += text("\[[time_stamp()]\] Has been smashed with a bottle by [user.name] ([user.ckey])") - log_attack("[user.name] ([user.ckey]) attacked [target.name] with a bottle. ([target.ckey])") + add_logs(user, target, "attacked", object="bottle") //The reagents in the bottle splash all over the target, thanks for the idea Nodrak if(src.reagents) diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index a837fab76fe..e6a36f1cf5e 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -71,12 +71,7 @@ return 0 if(!do_mob(user, M)) return - - M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") - user.attack_log += text("\[[time_stamp()]\] Fed [src.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") - - log_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") - + add_logs(user, M, "fed", object="[reagentlist(src)]") M.visible_message("[user] forces [M] to eat [src].", \ "[user] feeds [M] to eat [src].") @@ -2427,4 +2422,4 @@ ..() reagents.add_reagent("nutriment", 2) reagents.add_reagent("sugar", 5) - bitesize = 2 + bitesize = 2 diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 392f5e7444d..4a86e0a7ba4 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -55,9 +55,7 @@ for(var/datum/reagent/A in reagents.reagent_list) R += A.id + " (" R += num2text(A.volume) + ")," - user.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] splashed [M]/[M.ckey] with ([R])" - M.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] splashed [M]/[M.ckey] with ([R])" - log_attack("\[[time_stamp()]\] [user]/[user.ckey] splashed [M]/[M.ckey] with ([R])") + add_logs(user, M, "splashed", object="[R]") reagents.reaction(target, TOUCH) spawn(5) reagents.clear_reagents() return diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index d9024c461d3..d4046ae4e23 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -40,10 +40,7 @@ var/contained = english_list(injected) - log_attack("[user.name] ([user.ckey]) injected [M.name] ([M.ckey]) with [src.name], which had [contained] (INTENT: [uppertext(user.a_intent)])") - M.attack_log += text("\[[time_stamp()]\] Has been injected ([contained]) with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to inject [M.name] ([M.ckey]) with [contained]") - + add_logs(user, M, "injected", object="[src.name]", addition="([contained])") /obj/item/weapon/reagent_containers/hypospray/combat name = "combat stimulant injector" diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index f83fa490191..7a4ae30f964 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -41,12 +41,7 @@ M.visible_message("[user] forces [M] to swallow [src].", \ "[user] forces [M] to swallow [src].") - - M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") - user.attack_log += text("\[[time_stamp()]\] Fed [src.name] to [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") - - - log_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + add_logs(user, M, "fed", object="[reagentlist(src)]") if(reagents.total_volume) reagents.reaction(M, INGEST) diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index be3311fa5b8..f7c107f682f 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -141,10 +141,7 @@ rinject += R.name var/contained = english_list(rinject) var/mob/M = target - log_attack("[user.name] ([user.ckey]) injected [M.name] ([M.ckey]) with [src.name], which had [contained] (INTENT: [uppertext(user.a_intent)])") - M.attack_log += text("\[[time_stamp()]\] Has been injected ([contained]) with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to inject [M.name] ([M.ckey]) with [contained]") - + add_logs(user, M, "injected", object="[src.name]", addition="which had [contained]") reagents.reaction(target, INGEST) if(ismob(target) && target == user) //Attack log entries are produced here due to failure to produce elsewhere. Remove them here if you have doubles from normal syringes. diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 5fcf44a777f..39b581abdb7 100644 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -117,7 +117,6 @@ user.attack_log += text("\[[time_stamp()]\] Has used [name] on \ref[target]") - if(istype(target, /obj/item) && !(istype(target, /obj/item/weapon/storage) && !istype(target,/obj/item/weapon/storage/box))) var/obj/item/O = target if(amount > 1) diff --git a/code/modules/surgery/brain_removal.dm b/code/modules/surgery/brain_removal.dm index a04864fb6ba..41c3b4ee68c 100644 --- a/code/modules/surgery/brain_removal.dm +++ b/code/modules/surgery/brain_removal.dm @@ -28,9 +28,7 @@ var/mob/living/carbon/human/H = target H.update_hair(0) H.apply_damage(25,"brute","head") - user.attack_log += "\[[time_stamp()]\] Debrained [target.name] ([target.ckey]) INTENT: [uppertext(user.a_intent)])" - target.attack_log += "\[[time_stamp()]\] Debrained by [user.name] ([user.ckey]) (INTENT: [uppertext(user.a_intent)])" - log_attack("[user.name] ([user.ckey]) debrained [target.name] ([target.ckey]) (INTENT: [uppertext(user.a_intent)])") + add_logs(user, target, "debrained", addition="INTENT: [uppertext(user.a_intent)]") else user.visible_message("[user] can't find a brain in [target]!") return 1 diff --git a/code/modules/surgery/helpers.dm b/code/modules/surgery/helpers.dm index 23866878825..01b164c3ce5 100644 --- a/code/modules/surgery/helpers.dm +++ b/code/modules/surgery/helpers.dm @@ -38,9 +38,7 @@ M.surgeries += procedure user.visible_message("[user] drapes [I] over [M]'s [parse_zone(procedure.location)] to prepare for \an [procedure.name].") - user.attack_log += "\[[time_stamp()]\]Initiated a [procedure.name] on [M.name] ([M.ckey])" - M.attack_log += "\[[time_stamp()]\][user.name] ([user.ckey]) initiated a [procedure.name]" - log_attack("[user.name] ([user.ckey]) initiated a [procedure.name] on [M.name] ([M.ckey])") + add_logs(user, M, "operated", addition="Operation type: [procedure.name]") return 1 else user << "You need to expose [M]'s [procedure.location] first." diff --git a/code/modules/surgery/limb augmentation.dm b/code/modules/surgery/limb augmentation.dm index 79ee6030520..80a308dad21 100644 --- a/code/modules/surgery/limb augmentation.dm +++ b/code/modules/surgery/limb augmentation.dm @@ -70,9 +70,7 @@ del(tool) H.update_damage_overlays(0) H.update_augments() //Gives them the Cyber limb overlay - user.attack_log += "\[[time_stamp()]\] Augmented [target.name]'s [parse_zone(user.zone_sel.selecting)] ([target.ckey]) INTENT: [uppertext(user.a_intent)])" - target.attack_log += "\[[time_stamp()]\] Augmented by [user.name] ([user.ckey]) (INTENT: [uppertext(user.a_intent)])" - log_attack("[user.name] ([user.ckey]) augmented [target.name] ([target.ckey]) (INTENT: [uppertext(user.a_intent)])") + add_logs(user, target, "augmented", addition="by giving him new [parse_zone(user.zone_sel.selecting)] INTENT: [uppertext(user.a_intent)]") else user.visible_message("[user] [target] has no organic [parse_zone(user.zone_sel.selecting)] there!") return 1