Attack logging (finally)

there might be some things I missed, and feel free to change the messages if you want
This commit is contained in:
Miniature
2012-03-08 15:16:54 +10:30
parent 25fc27849b
commit cf53a0cc7a
23 changed files with 70 additions and 1 deletions

View File

@@ -16,6 +16,8 @@
return ..()
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their soul captured with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to capture the soul of [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) captured the soul of [M] ([M.ckey]).")
message_admins("ATTACK: [user] ([user.ckey]) captured the soul of [M] ([M.ckey]).")
transfer_soul("VICTIM", M, user)
return

View File

@@ -456,6 +456,8 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
attack(mob/living/M as mob, mob/living/user as mob)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had the [name] used on him by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used [name] on [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) used the [name] on [M] ([M.ckey]).")
message_admins("ATTACK: [user] ([user.ckey]) used the [name] on [M] ([M.ckey]).")
if(istype(M,/mob/dead))
M.invisibility = 0

View File

@@ -15,6 +15,8 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been carded with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to card [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) carded [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) carded [M] ([M.ckey]) with [src].")
transfer_ai("AICORE", "AICARD", M, user)
return

View File

@@ -25,6 +25,8 @@
attack(mob/living/M as mob, mob/user as mob)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been flashed (attempt) with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to flash [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) flashed [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) flashed [M] ([M.ckey]) with [src].")
if(!clown_check(user)) return
if(broken)
user.show_message("\red The [src.name] is broken", 2)

View File

@@ -94,6 +94,8 @@
// M << "\red You feel a tiny prick!"
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stabbed with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to stab [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) stabbed [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) stabbed [M] ([M.ckey]) with [src].")
..()
return

View File

@@ -50,6 +50,7 @@
if(!M.handcuffed)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been handcuffed (attempt) by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to handcuff [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) handcuffed [M] ([M.ckey]).")
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = user
O.target = M
@@ -172,6 +173,8 @@
// M << "\red You feel a tiny prick!" //Removed to make tritor pens stealthier
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stabbed with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to stab [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) used [src] on [M] ([M.ckey]).")
message_admins("ATTACK: [user] ([user.ckey]) used [src] on [M] ([M.ckey]).")
return
/obj/item/weapon/pen/sleepypen
@@ -500,4 +503,4 @@
if(exposed_temperature >= 373.15)
for(var/mob/M in viewers(5, src))
M << "\red \the [src] burns up."
del(src)
del(src)

View File

@@ -261,6 +261,8 @@ mob/proc/flash_weak_pain()
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
//spawn(1800) // this wont work right
// M.lastattacker = null
@@ -396,6 +398,8 @@ mob/proc/flash_weak_pain()
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
src.add_fingerprint(user)
//if((user.mutations & CLUMSY) && prob(50))

View File

@@ -10,6 +10,8 @@
attack(mob/M as mob, mob/living/silicon/robot/user as mob)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
user.cell.charge -= 30
M.Weaken(5)

View File

@@ -22,6 +22,8 @@
if (ismob(target))
target:attack_log += "\[[time_stamp()]\]<font color='orange'> Had the [name] planted on them by [user.real_name] ([user.ckey])</font>"
user.visible_message("\red [user.name] finished planting an explosive on [target.name]!")
log_admin("ATTACK: [user] ([user.ckey]) planted [src] on [target] ([target:ckey]).")
message_admins("ATTACK: [user] ([user.ckey]) planted [src] on [target] ([target:ckey]).")
target.overlays += image('assemblies.dmi', "plastic-explosive2")
user << "Bomb has been planted. Timer counting down from [timer]."
spawn(timer*10)

View File

@@ -117,6 +117,8 @@ Deathnettle
M << "\red You are stunned by the powerful acid of the Deathnettle!"
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Had the [src.name] used on them by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] on [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
M.eye_blurry += force/7
if(prob(20))

View File

@@ -52,6 +52,8 @@
O.show_message("\red [user] implants themself with [src.name]!", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'> Implanted with [src.name] ([src.imp.name]) by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] ([src.imp.name]) to implant [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) implanted [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) implanted [M] ([M.ckey]) with [src].")
src.imp.loc = M
src.imp.imp_in = M
src.imp.implanted = 1

View File

@@ -97,6 +97,8 @@ KNIFE
return
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
if (M.stat < 2 && M.health < 50 && prob(90))
var/mob/H = M
@@ -171,6 +173,8 @@ KNIFE
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
if(prob(15))
M.Weaken(3)

View File

@@ -430,6 +430,8 @@ NOTEBOOK
target:loc = present
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been wrapped with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to wrap [target.name] ([target.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) wrapped up [target] ([target.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) wrapped up [target] ([target.ckey]) with [src].")
else
user << "/blue You need more paper."

View File

@@ -1046,6 +1046,8 @@ CIRCULAR SAW
user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
log_admin("ATTACK: [user] ([user.ckey]) debrained [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) debrained [M] ([M.ckey]) with [src].")
var/obj/item/brain/B = new(M.loc)
B.transfer_identity(M)
@@ -1266,6 +1268,7 @@ CIRCULAR SAW
return
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to inject [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) injected [M] ([M.ckey]) with [src].")
if (user)
for(var/mob/O in viewers(M, null))

View File

@@ -129,6 +129,8 @@ STUN BATON
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey]) (INTENT: [uppertext(user.a_intent)])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey]) (INTENT: [uppertext(user.a_intent)])</font>")
log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
if(isrobot(M))
..()
@@ -200,6 +202,8 @@ STUN BATON
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
if (user.a_intent == "hurt")
if(!..()) return

View File

@@ -25,6 +25,8 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
var/t = user:zone_sel.selecting
if (t == "head")

View File

@@ -25,6 +25,8 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "\red You don't have the dexterity to do this!"

View File

@@ -20,6 +20,8 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
if (M.stat < 2 && M.health < 50 && prob(90))
var/mob/H = M

View File

@@ -1247,6 +1247,8 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to inject [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) injected [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) injected [M] ([M.ckey]) with [src].")
src.reagents.reaction(M, INGEST)
if(M.reagents)
var/trans = reagents.trans_to(M, amount_per_transfer_from_this)
@@ -1372,6 +1374,8 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]</font>")
log_admin("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
for(var/mob/O in viewers(world.view, user))
O.show_message("\red [user] feeds [M] [src].", 1)
@@ -1432,6 +1436,8 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]</font>")
log_admin("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
for(var/mob/O in viewers(world.view, user))
O.show_message("\red [user] feeds [M] [src].", 1)
@@ -1594,6 +1600,8 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]</font>")
log_admin("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
if(reagents.total_volume)
@@ -1712,6 +1720,8 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]</font>")
log_admin("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
if(reagents.total_volume)
@@ -2371,6 +2381,8 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [src.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]</font>")
log_admin("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
if(reagents.total_volume)

View File

@@ -17,6 +17,8 @@
visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Stungloved [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stungloved by [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [src] ([src.ckey]) stungloved [M] ([M.ckey]).")
message_admins("ATTACK: [src] ([src.ckey]) stungloved [M] ([M.ckey]).")
var/armorblock = run_armor_check(M.zone_sel.selecting, "energy")
apply_effects(5,5,0,0,5,0,0,armorblock)
return 1
@@ -72,6 +74,8 @@
if("hurt")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Punched [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been punched by [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [src] ([src.ckey]) punched [M] ([M.ckey]).")
message_admins("ATTACK: [src] ([src.ckey]) punched [M] ([M.ckey]).")
var/attack_verb
switch(M.mutantrace)
@@ -105,6 +109,7 @@
if("disarm")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been disarmed by [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [src] ([src.ckey]) disarmed [M] ([M.ckey]).")
if(w_uniform)
w_uniform.add_fingerprint(M)

View File

@@ -176,6 +176,8 @@
O.show_message(text("\red [] has tightened his grip on []'s neck!", assailant, affecting), 1)
affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])</font>")
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>")
log_admin("ATTACK: [assailant] ([assailant.ckey]) strangled [affecting] ([affecting.ckey]).")
message_admins("ATTACK: [assailant] ([assailant.ckey]) strangled [affecting] ([affecting.ckey]).")
assailant.next_move = world.time + 10
affecting.losebreath += 1
hud1.icon_state = "disarm/kill1"

View File

@@ -157,6 +157,8 @@ obj/item/weapon/organ/head/attackby(obj/item/weapon/W as obj, mob/user as mob)
user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [brainmob.name] ([brainmob.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
brainmob.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
log_admin("ATTACK: [brainmob] ([brainmob.ckey]) debrained [user] ([user.ckey]).")
message_admins("ATTACK: [brainmob] ([brainmob.ckey]) debrained [user] ([user.ckey]).")
var/obj/item/brain/B = new(loc)
B.transfer_identity(brainmob)

View File

@@ -76,8 +76,12 @@
if(istype(firer, /mob))
M.attack_log += text("\[[]\] <b>[]/[]</b> shot <b>[]/[]</b> with a <b>[]</b>", time_stamp(), firer, firer.ckey, M, M.ckey, src)
firer.attack_log += text("\[[]\] <b>[]/[]</b> shot <b>[]/[]</b> with a <b>[]</b>", time_stamp(), firer, firer.ckey, M, M.ckey, src)
log_admin("ATTACK: [firer] ([firer.ckey]) shot [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [firer] ([firer.ckey]) shot [M] ([M.ckey]) with [src].")
else
M.attack_log += text("\[[]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[]/[]</b> with a <b>[]</b>", time_stamp(), M, M.ckey, src)
log_admin("ATTACK: UNKNOWN (no longer exists) shot [M] ([M.ckey]) with [src].")
message_admins("ATTACK: UNKNOWN (no longer exists) shot [M] ([M.ckey]) with [src].")
spawn(0)
if(A)