[MIRROR] Logs pockets, updates some shitty stripping verbage (#1730)

* Logs pockets, updates some shitty stripping verbage (#55027)

Two things at hand here.
A: Pockets were not logged at all. I hate god.
B: I'm using log_message here because it gives me the freedom to be more grammatically correct. Please attack my spelling and offer suggestions of other mob strip panel things to log in the comments
B.5: I updated stripping to use log_message for the same reasons.

* Logs pockets, updates some shitty stripping verbage

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-11-19 23:57:27 +00:00
committed by GitHub
co-authored by LemonInTheDark
parent 5527cf02d7
commit 07c6038fc3
2 changed files with 18 additions and 3 deletions
@@ -226,8 +226,12 @@
if(HAS_TRAIT(pocket_item, TRAIT_NODROP))
to_chat(usr, "<span class='warning'>You try to empty [src]'s [pocket_side] pocket, it seems to be stuck!</span>")
to_chat(usr, "<span class='notice'>You try to empty [src]'s [pocket_side] pocket.</span>")
log_message("[key_name(src)] is having their [pocket_id == ITEM_SLOT_RPOCKET ? "right" : "left"] pocket emptied of [pocket_item] by [key_name(usr)]", LOG_ATTACK, color="red")
usr.log_message("[key_name(src)] is having their [pocket_id == ITEM_SLOT_RPOCKET ? "right" : "left"] pocket emptied of [pocket_item] by [key_name(usr)]", LOG_ATTACK, color="red", log_globally=FALSE)
else if(place_item && place_item.mob_can_equip(src, usr, pocket_id, 1) && !(place_item.item_flags & ABSTRACT))
to_chat(usr, "<span class='notice'>You try to place [place_item] into [src]'s [pocket_side] pocket.</span>")
log_message("[key_name(src)] is having their [pocket_id == ITEM_SLOT_RPOCKET ? "right" : "left"] pocket filled with [place_item] by [key_name(usr)]", LOG_ATTACK, color="red")
usr.log_message("[key_name(src)] is having their [pocket_id == ITEM_SLOT_RPOCKET ? "right" : "left"] pocket filled with [place_item] by [key_name(usr)]", LOG_ATTACK, color="red", log_globally=FALSE)
delay_denominator = 4
else
return
@@ -236,11 +240,15 @@
if(pocket_item)
if(pocket_item == (pocket_id == ITEM_SLOT_RPOCKET ? r_store : l_store)) //item still in the pocket we search
dropItemToGround(pocket_item)
log_message("[key_name(src)] had their [pocket_id == ITEM_SLOT_RPOCKET ? "right" : "left"] pocket emptied of [pocket_item] by [key_name(usr)]", LOG_ATTACK, color="red")
usr.log_message("[key_name(src)] had their [pocket_id == ITEM_SLOT_RPOCKET ? "right" : "left"] pocket emptied of [pocket_item] by [key_name(usr)]", LOG_ATTACK, color="red", log_globally=FALSE)
else
if(place_item)
if(place_item.mob_can_equip(src, usr, pocket_id, FALSE, TRUE))
usr.temporarilyRemoveItemFromInventory(place_item, TRUE)
equip_to_slot(place_item, pocket_id, TRUE)
log_message("[key_name(src)] had their [pocket_id == ITEM_SLOT_RPOCKET ? "right" : "left"] pocket filled with [pocket_item] by [key_name(usr)]", LOG_ATTACK, color="red")
usr.log_message("[key_name(src)] had their [pocket_id == ITEM_SLOT_RPOCKET ? "right" : "left"] pocket filled with [pocket_item] by [key_name(usr)]", LOG_ATTACK, color="red", log_globally=FALSE)
//do nothing otherwise
//updating inv screen after handled by living/Topic()
else
+10 -3
View File
@@ -983,7 +983,8 @@
who.visible_message("<span class='warning'>[src] tries to remove [who]'s [what.name].</span>", \
"<span class='userdanger'>[src] tries to remove your [what.name].</span>", null, null, src)
to_chat(src, "<span class='danger'>You try to remove [who]'s [what.name]...</span>")
log_combat(src, who, "started stripping [what] off")
who.log_message("[key_name(who)] is being stripped of [what] by [key_name(src)]", LOG_ATTACK, color="red")
log_message("[key_name(who)] is being stripped of [what] by [key_name(src)]", LOG_ATTACK, color="red", log_globally=FALSE)
what.add_fingerprint(src)
if(do_mob(src, who, what.strip_delay))
if(what && Adjacent(who))
@@ -991,10 +992,12 @@
var/list/L = where
if(what == who.get_item_for_held_index(L[2]))
if(what.doStrip(src, who))
log_combat(src, who, "stripped [what] off")
who.log_message("[key_name(who)] has been stripped of [what] by [key_name(src)]", LOG_ATTACK, color="red")
log_message("[key_name(who)] has been stripped of [what] by [key_name(src)]", LOG_ATTACK, color="red", log_globally=FALSE)
if(what == who.get_item_by_slot(where))
if(what.doStrip(src, who))
log_combat(src, who, "stripped [what] off")
who.log_message("[key_name(who)] has been stripped of [what] by [key_name(src)]", LOG_ATTACK, color="red")
log_message("[key_name(who)] has been stripped of [what] by [key_name(src)]", LOG_ATTACK, color="red", log_globally=FALSE)
if(Adjacent(who)) //update inventory window
who.show_inv(src)
@@ -1032,6 +1035,8 @@
who.visible_message("<span class='notice'>[src] tries to put [what] on [who].</span>", \
"<span class='notice'>[src] tries to put [what] on you.</span>", null, null, src)
to_chat(src, "<span class='notice'>You try to put [what] on [who]...</span>")
who.log_message("[key_name(who)] is having [what] put on them by [key_name(src)]", LOG_ATTACK, color="red")
log_message("[key_name(who)] is having [what] put on them by [key_name(src)]", LOG_ATTACK, color="red", log_globally=FALSE)
if(do_mob(src, who, what.equip_delay_other))
if(what && Adjacent(who) && what.mob_can_equip(who, src, final_where, TRUE, TRUE))
if(temporarilyRemoveItemFromInventory(what))
@@ -1040,6 +1045,8 @@
what.forceMove(get_turf(who))
else
who.equip_to_slot(what, where, TRUE)
who.log_message("[key_name(who)] had [what] put on them by [key_name(src)]", LOG_ATTACK, color="red")
log_message("[key_name(who)] had [what] put on them by [key_name(src)]", LOG_ATTACK, color="red", log_globally=FALSE)
if(Adjacent(who)) //update inventory window
who.show_inv(src)