Improves attack logging of pulling / grabbing / throwing

This commit is contained in:
CitadelStationBot
2017-08-17 09:19:05 -05:00
parent 2b144561e1
commit 2a2e4b2af4
4 changed files with 10 additions and 2 deletions
+1
View File
@@ -171,6 +171,7 @@
if(thrown_thing)
visible_message("<span class='danger'>[src] has thrown [thrown_thing].</span>")
add_logs(src, thrown_thing, "has thrown")
newtonian_move(get_dir(target, src))
thrown_thing.throw_at(target, thrown_thing.throw_range, thrown_thing.throw_speed, src)
+2
View File
@@ -550,6 +550,7 @@
if(!restrained(ignore_grab = 1) && pulledby)
visible_message("<span class='danger'>[src] resists against [pulledby]'s grip!</span>")
resist_grab()
add_logs(pulledby, src, "resisted grab")
return
//unbuckling yourself
@@ -587,6 +588,7 @@
if(pulledby.grab_state)
if(prob(30/pulledby.grab_state))
visible_message("<span class='danger'>[src] has broken free of [pulledby]'s grip!</span>")
add_logs(pulledby, src, "broke grab")
pulledby.stop_pulling()
return 0
if(moving_resist && client) //we resisted by trying to move
+5 -2
View File
@@ -89,7 +89,7 @@
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].",I.armour_penetration)
apply_damage(I.throwforce, dtype, zone, armor)
if(I.thrownby)
add_logs(I.thrownby, src, "hit", I)
add_logs(I.thrownby, src, "threw and hit", I)
else
return 1
else
@@ -150,6 +150,7 @@
var/grab_upgrade_time = 30
visible_message("<span class='danger'>[user] starts to tighten [user.p_their()] grip on [src]!</span>", \
"<span class='userdanger'>[user] starts to tighten [user.p_their()] grip on you!</span>")
add_logs(user, src, "attempted to strangle", addition="grab")
if(!do_mob(user, src, grab_upgrade_time))
return 0
if(!user.pulling || user.pulling != src || user.grab_state != old_grab_state || user.a_intent != INTENT_GRAB)
@@ -157,18 +158,20 @@
user.grab_state++
switch(user.grab_state)
if(GRAB_AGGRESSIVE)
add_logs(user, src, "grabbed", addition="aggressively")
add_logs(user, src, "grabbed", addition="aggressive grab")
visible_message("<span class='danger'>[user] has grabbed [src] aggressively!</span>", \
"<span class='userdanger'>[user] has grabbed [src] aggressively!</span>")
drop_all_held_items()
stop_pulling()
if(GRAB_NECK)
add_logs(user, src, "grabbed", addition="neck grab")
visible_message("<span class='danger'>[user] has grabbed [src] by the neck!</span>",\
"<span class='userdanger'>[user] has grabbed you by the neck!</span>")
update_canmove() //we fall down
if(!buckled && !density)
Move(user.loc)
if(GRAB_KILL)
add_logs(user, src, "strangled", addition="grab")
visible_message("<span class='danger'>[user] is strangling [src]!</span>", \
"<span class='userdanger'>[user] is strangling you!</span>")
update_canmove() //we fall down
+2
View File
@@ -327,6 +327,7 @@
if(AM.pulledby)
if(!supress_message)
visible_message("<span class='danger'>[src] has pulled [AM] from [AM.pulledby]'s grip.</span>")
add_logs(AM, AM.pulledby, "pulled from", src)
AM.pulledby.stop_pulling() //an object can't be pulled by two mobs at once.
pulling = AM
@@ -337,6 +338,7 @@
if(ismob(AM))
var/mob/M = AM
add_logs(src, M, "grabbed", addition="passive grab")
if(!supress_message)
visible_message("<span class='warning'>[src] has grabbed [M] passively!</span>")
if(!iscarbon(src))