Add check for antags in msg_admin_attack

This commit first adds a new helper proc labeled isAntag(), as well as
adding a check for antags for every instance of msg_admin_attack().

Goals of this commit:
 - Make admin ATTACK: logs indicate if attacker is an antagonist.

Note; High probability of merge conflicts, 47 files changed.
This commit is contained in:
Tigercat2000
2015-04-12 08:41:53 -07:00
parent dfaad7168d
commit 29c59bd51b
47 changed files with 76 additions and 69 deletions
@@ -136,12 +136,12 @@
if(propelled || (pulling && (pulling.a_intent == "harm")))
var/mob/living/occupant = buckled_mob
unbuckle()
if (pulling && (pulling.a_intent == "hurt"))
occupant.throw_at(A, 3, 3, pulling)
else if (propelled)
occupant.throw_at(A, 3, propelled)
occupant.apply_effect(6, STUN, 0)
occupant.apply_effect(6, WEAKEN, 0)
occupant.apply_effect(6, STUTTER, 0)
@@ -157,7 +157,7 @@
pulling.attack_log += "\[[time_stamp()]\]<font color='red'> Crashed [occupant.name]'s ([occupant.ckey]) [name] into \a [A]</font>"
occupant.attack_log += "\[[time_stamp()]\]<font color='orange'> Thrusted into \a [A] by [pulling.name] ([pulling.ckey]) with \the [name]</font>"
msg_admin_attack("[pulling.name] ([pulling.ckey]) has thrusted [occupant.name]'s ([occupant.ckey]) [name] into \a [A] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[pulling.x];Y=[pulling.y];Z=[pulling.z]'>JMP</a>)")
msg_admin_attack("[pulling.name] ([pulling.ckey])[isAntag(pulling) ? "(ANTAG)" : ""] has thrusted [occupant.name]'s ([occupant.ckey]) [name] into \a [A] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[pulling.x];Y=[pulling.y];Z=[pulling.z]'>JMP</a>)")
else
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
+7 -7
View File
@@ -135,7 +135,7 @@ var/global/wcColored
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
if(M)
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] deanchored by [M.real_name] ([formatPlayerPanel(M,M.ckey)])!")
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] deanchored by [M.real_name][isAntag(M) ? "(ANTAG)" : ""] ([formatPlayerPanel(M,M.ckey)])!")
log_admin("Window with pdiff [pdiff] at [loc] deanchored by [M.real_name] ([M.ckey])!")
else
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] deanchored by [AM]!")
@@ -144,7 +144,7 @@ var/global/wcColored
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
if(M)
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] destroyed by [M.real_name] ([formatPlayerPanel(M,M.ckey)])!")
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] destroyed by [M.real_name][isAntag(M) ? "(ANTAG)" : ""] ([formatPlayerPanel(M,M.ckey)])!")
log_admin("Window with pdiff [pdiff] at [loc] destroyed by [M.real_name] ([M.ckey])!")
else
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] destroyed by [AM]!")
@@ -158,7 +158,7 @@ var/global/wcColored
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window destroyed by hulk [user.real_name] ([formatPlayerPanel(user,user.ckey)]) with pdiff [pdiff] at [formatJumpTo(loc)]!")
msg_admin_attack("Window destroyed by hulk [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) with pdiff [pdiff] at [formatJumpTo(loc)]!")
log_admin("Window destroyed by hulk [user.real_name] ([user.ckey]) with pdiff [pdiff] at [loc]!")
destroy()
else if (usr.a_intent == "harm")
@@ -187,7 +187,7 @@ var/global/wcColored
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window destroyed by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) with pdiff [pdiff] at [formatJumpTo(loc)]!")
msg_admin_attack("Window destroyed by [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) with pdiff [pdiff] at [formatJumpTo(loc)]!")
destroy()
else //for nicer text~
user.visible_message("<span class='danger'>[user] smashes into [src]!</span>")
@@ -258,7 +258,7 @@ var/global/wcColored
if(!anchored)
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
log_admin("Window with pdiff [pdiff] deanchored by [user.real_name] ([user.ckey]) at [loc]!")
else if(!reinf)
anchored = !anchored
@@ -268,7 +268,7 @@ var/global/wcColored
if(!anchored)
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
log_admin("Window with pdiff [pdiff] deanchored by [user.real_name] ([user.ckey]) at [loc]!")
else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <= 1)
state = 1 - state
@@ -310,7 +310,7 @@ var/global/wcColored
step(src, get_dir(user, src))
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
log_admin("Window with pdiff [pdiff] deanchored by [user.real_name] ([user.ckey]) at [loc]!")
else
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)