Fixes #8954 - splits 'attack log' preference, spam-be-gone (#8992)

* Fixes #8954

* projectile reagetns

* removes all attack logs on keyless simple_animals even by keyed mobs

* deletes 'potentially'

* Tiger request

* more comprehensive solution

* check for mob

* istype

* brevity

* Split attack logs preference

* toggle

* deletes old CHAT_ATTACKLOGS

* explains what levels do when toggling them

* clarification

* Tigercat requests
This commit is contained in:
Kyep
2018-06-13 16:55:21 -07:00
committed by tigercat2000
parent 8c43e80657
commit 412341439a
39 changed files with 118 additions and 65 deletions
@@ -35,7 +35,7 @@ In all, this is a lot like the monkey code. /N
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
"<span class='userdanger'>[M.name] bites [src]!</span>")
adjustBruteLoss(damage)
add_attack_logs(M, src, "Alien attack", FALSE)
add_attack_logs(M, src, "Alien attack", ATKLOG_ALL)
updatehealth()
else
to_chat(M, "<span class='warning'>[name] is too injured for that.</span>")
+2 -2
View File
@@ -201,7 +201,7 @@
swap_hand()
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
add_attack_logs(M, src, "Shaked", admin_notify = FALSE)
add_attack_logs(M, src, "Shaked", ATKLOG_ALL)
if(health >= config.health_threshold_crit)
if(src == M && ishuman(src))
var/mob/living/carbon/human/H = src
@@ -1015,7 +1015,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
return 1
/mob/living/carbon/proc/forceFedAttackLog(var/obj/item/reagent_containers/food/toEat, mob/user)
add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagentlist(toEat)]")
add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagentlist(toEat)]", ATKLOG_FEW)
if(!iscarbon(user))
LAssailant = null
else
@@ -651,12 +651,12 @@
unEquip(pocket_item)
if(thief_mode)
usr.put_in_hands(pocket_item)
add_attack_logs(usr, src, "Stripped of [pocket_item]", isLivingSSD(src))
add_attack_logs(usr, src, "Stripped of [pocket_item]", isLivingSSD(src) ? null : ATKLOG_ALL)
else
if(place_item)
usr.unEquip(place_item)
equip_to_slot_if_possible(place_item, pocket_id, 0, 1)
add_attack_logs(usr, src, "Equipped with [pocket_item]", isLivingSSD(src))
add_attack_logs(usr, src, "Equipped with [pocket_item]", isLivingSSD(src) ? null : ATKLOG_ALL)
// Update strip window
if(usr.machine == src && in_range(src, usr))
@@ -665,7 +665,7 @@
// Display a warning if the user mocks up if they don't have pickpocket gloves.
if(!thief_mode)
to_chat(src, "<span class='warning'>You feel your [pocket_side] pocket being fumbled with!</span>")
add_attack_logs(usr, src, "Attempted strip of [pocket_item]", isLivingSSD(src))
add_attack_logs(usr, src, "Attempted strip of [pocket_item]", isLivingSSD(src) ? null : ATKLOG_ALL)
if(href_list["set_sensor"])
if(istype(w_uniform, /obj/item/clothing/under))
@@ -680,7 +680,7 @@
"<span class='danger'>You have dislodged everything from [src]'s headpocket!</span>")
var/obj/item/organ/internal/headpocket/C = get_int_organ(/obj/item/organ/internal/headpocket)
C.empty_contents()
add_attack_logs(usr, src, "Stripped of headpocket items", isLivingSSD(src))
add_attack_logs(usr, src, "Stripped of headpocket items", isLivingSSD(src) ? null : ATKLOG_ALL)
if(href_list["strip_accessory"])
if(istype(w_uniform, /obj/item/clothing/under))
@@ -1762,7 +1762,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
to_chat(H, "<span class='notice'>You feel a breath of fresh air enter your lungs. It feels good.</span>")
to_chat(src, "<span class='alert'>Repeat at least every 7 seconds.")
add_attack_logs(src, H, "CPRed", FALSE)
add_attack_logs(src, H, "CPRed", ATKLOG_ALL)
return 1
else
to_chat(src, "<span class='danger'>You need to stay still while performing CPR!</span>")
@@ -357,7 +357,7 @@
var/datum/unarmed_attack/attack = user.species.unarmed
user.do_attack_animation(target, attack.animation_type)
add_attack_logs(user, target, "Melee attacked with fists", admin_notify = target.ckey ? TRUE : FALSE)
add_attack_logs(user, target, "Melee attacked with fists", target.ckey ? null : ATKLOG_ALL)
if(!iscarbon(user))
target.LAssailant = null
@@ -392,7 +392,7 @@
if(attacker_style && attacker_style.disarm_act(user, target))
return 1
else
add_attack_logs(user, target, "Disarmed", admin_notify = FALSE)
add_attack_logs(user, target, "Disarmed", ATKLOG_ALL)
user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
if(target.w_uniform)
target.w_uniform.add_fingerprint(user)
@@ -402,7 +402,7 @@
target.apply_effect(2, WEAKEN, target.run_armor_check(affecting, "melee"))
playsound(target.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
target.visible_message("<span class='danger'>[user] has pushed [target]!</span>")
add_attack_logs(user, target, "Pushed over", admin_notify = FALSE)
add_attack_logs(user, target, "Pushed over", ATKLOG_ALL)
if(!iscarbon(user))
target.LAssailant = null
else
+2 -3
View File
@@ -818,7 +818,7 @@
who.unEquip(what)
if(silent)
put_in_hands(what)
add_attack_logs(src, who, "Stripped of [what]", isLivingSSD(who))
add_attack_logs(src, who, "Stripped of [what]")
// The src mob is trying to place an item on someone
// Override if a certain mob should be behave differently when placing items (can't, for example)
@@ -837,8 +837,7 @@
if(what && Adjacent(who))
unEquip(what)
who.equip_to_slot_if_possible(what, where, 0, 1)
add_attack_logs(src, who, "Equipped [what]", isLivingSSD(who))
add_attack_logs(src, who, "Equipped [what]")
/mob/living/singularity_act()
var/gain = 20
+2 -2
View File
@@ -129,7 +129,7 @@
add_attack_logs(M.occupant, src, "Mecha-meleed with [M]")
else
step_away(src,M)
add_attack_logs(M.occupant, src, "Mecha-pushed with [M]", FALSE)
add_attack_logs(M.occupant, src, "Mecha-pushed with [M]", ATKLOG_ALL)
M.occupant_message("<span class='warning'>You push [src] out of the way.</span>")
visible_message("<span class='warning'>[M] pushes [src] out of the way.</span>")
return
@@ -240,7 +240,7 @@
to_chat(user, "<span class='notice'>You already grabbed [src].</span>")
return
add_attack_logs(user, src, "Grabbed passively", admin_notify = FALSE)
add_attack_logs(user, src, "Grabbed passively", ATKLOG_ALL)
var/obj/item/grab/G = new /obj/item/grab(user, src)
if(buckled)
@@ -276,7 +276,7 @@
return
apply_damage(M.melee_damage_upper, BRUTE)
visible_message("<span class='danger'>[M] has [M.attacktext] [src]!</span>")
add_attack_logs(M, src, "Animal attacked", FALSE)
add_attack_logs(M, src, "Animal attacked", ATKLOG_ALL)
if(prob(10))
new /obj/effect/decal/cleanable/blood/oil(loc)
+2 -2
View File
@@ -263,7 +263,7 @@
state = GRAB_AGGRESSIVE
icon_state = "grabbed1"
hud.icon_state = "reinforce1"
add_attack_logs(assailant, affecting, "Aggressively grabbed", admin_notify = FALSE)
add_attack_logs(assailant, affecting, "Aggressively grabbed", ATKLOG_ALL)
else if(state < GRAB_NECK)
if(isslime(affecting))
to_chat(assailant, "<span class='notice'>You squeeze [affecting], but nothing interesting happens.</span>")
@@ -273,7 +273,7 @@
state = GRAB_NECK
icon_state = "grabbed+1"
assailant.setDir(get_dir(assailant, affecting))
add_attack_logs(assailant, affecting, "Neck grabbed", admin_notify = FALSE)
add_attack_logs(assailant, affecting, "Neck grabbed", ATKLOG_ALL)
if(!iscarbon(assailant))
affecting.LAssailant = null
else