diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm
index f9bc6ee4ff..545fa41c03 100644
--- a/code/modules/mob/living/carbon/human/inventory.dm
+++ b/code/modules/mob/living/carbon/human/inventory.dm
@@ -417,8 +417,55 @@
for(var/mob/O in viewers(target, null))
O.show_message("\red [source] is trying to put \a [item] on [target]", 1)
else
- var/message=null
+
+ var/target_part = null
+ var/obj/item/target_item = null
+ var/message = null
+
switch(place)
+ if("mask")
+ target_part = "head"
+ target_item = target.wear_mask
+ if("l_hand")
+ target_part = "left hand"
+ target_item = target.l_hand
+ if("r_hand")
+ target_part = "right hand"
+ target_item = target.r_hand
+ if("gloves")
+ target_part = "hands"
+ target_item = target.gloves
+ if("eyes")
+ target_part = "eyes"
+ target_item = target.glasses
+ if("l_ear")
+ target_part = "left ear"
+ target_item = target.l_ear
+ if("r_ear")
+ target_part = "right ear"
+ target_item = target.r_ear
+ if("head")
+ target_part = "head"
+ target_item = target.head
+ if("shoes")
+ target_part = "feet"
+ target_item = target.shoes
+ if("belt")
+ target_part = "waist"
+ target_item = target.belt
+ if("suit")
+ target_part = "body"
+ target_item = target.wear_suit
+ if("back")
+ target_part = "back"
+ target_item = target.back
+ if("s_store")
+ target_part = "suit"
+ target_item = target.s_store
+ if("id")
+ target_part = "uniform"
+ target_item = target.wear_id
+
if("syringe")
message = "\red [source] is trying to inject [target]!"
if("pill")
@@ -427,86 +474,17 @@
message = "\red [source] is trying to force [target] to swallow a gulp of [item]!"
if("dnainjector")
message = "\red [source] is trying to inject [target] with the [item]!"
- if("mask")
- target.attack_log += text("\[[time_stamp()]\] Had their mask removed by [source.name] ([source.ckey])")
- source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) mask")
- if(target.wear_mask && !target.wear_mask.canremove)
- message = "\red [source] fails to take off \a [target.wear_mask] from [target]'s head!"
+ if("uniform")
+ target.attack_log += text("\[[time_stamp()]\] Has had their uniform ([target.w_uniform]) removed by [source.name] ([source.ckey])")
+ source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) uniform ([target.w_uniform])")
+ if(target.w_uniform && !target.w_uniform.canremove)
+ message = "\red [source] fails to take off \a [target.w_uniform] from [target]'s body!"
return
else
- message = "\red [source] is trying to take off \a [target.wear_mask] from [target]'s head!"
- if("l_hand")
- target.attack_log += text("\[[time_stamp()]\] Has had their left hand item ([target.l_hand]) removed by [source.name] ([source.ckey])")
- source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) left hand item ([target.l_hand])")
- message = "\red [source] is trying to take off \a [target.l_hand] from [target]'s left hand!"
- if("r_hand")
- target.attack_log += text("\[[time_stamp()]\] Has had their right hand item ([target.r_hand]) removed by [source.name] ([source.ckey])")
- source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) right hand item ([target.r_hand])")
- message = "\red [source] is trying to take off \a [target.r_hand] from [target]'s right hand!"
- if("gloves")
- target.attack_log += text("\[[time_stamp()]\] Has had their gloves ([target.gloves]) removed by [source.name] ([source.ckey])")
- source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) gloves ([target.gloves])")
- if(target.gloves && !target.gloves.canremove)
- message = "\red [source] fails to take off \a [target.gloves] from [target]'s hands!"
- return
- else
- message = "\red [source] is trying to take off the [target.gloves] from [target]'s hands!"
- if("eyes")
- target.attack_log += text("\[[time_stamp()]\] Has had their eyewear ([target.glasses]) removed by [source.name] ([source.ckey])")
- source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) eyewear ([target.glasses])")
- if(target.glasses && !target.glasses.canremove)
- message = "\red [source] fails to take off \a [target.glasses] from [target]'s eyes!"
- return
- else
- message = "\red [source] is trying to take off the [target.glasses] from [target]'s eyes!"
- if("l_ear")
- target.attack_log += text("\[[time_stamp()]\] Has had their left ear item ([target.l_ear]) removed by [source.name] ([source.ckey])")
- source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) left ear item ([target.l_ear])")
- if(target.l_ear && !target.l_ear.canremove)
- message = "\red [source] fails to take off \a [target.l_ear] from [target]'s left ear!"
- return
- else
- message = "\red [source] is trying to take off the [target.l_ear] from [target]'s left ear!"
- if("r_ear")
- target.attack_log += text("\[[time_stamp()]\] Has had their right ear item ([target.r_ear]) removed by [source.name] ([source.ckey])")
- source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) right ear item ([target.r_ear])")
- if(target.r_ear && !target.r_ear.canremove)
- message = "\red [source] fails to take off \a [target.r_ear] from [target]'s right ear!"
- return
- else
- message = "\red [source] is trying to take off the [target.r_ear] from [target]'s right ear!"
- if("head")
- target.attack_log += text("\[[time_stamp()]\] Has had their hat ([target.head]) removed by [source.name] ([source.ckey])")
- source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) hat ([target.head])")
- if(target.head && !target.head.canremove)
- message = "\red [source] fails to take off \a [target.head] from [target]'s head!"
- return
- else
- message = "\red [source] is trying to take off the [target.head] from [target]'s head!"
- if("shoes")
- target.attack_log += text("\[[time_stamp()]\] Has had their shoes ([target.shoes]) removed by [source.name] ([source.ckey])")
- source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) shoes ([target.shoes])")
- if(target.shoes && !target.shoes.canremove)
- message = "\red [source] fails to take off \a [target.shoes] from [target]'s feet!"
- return
- else
- message = "\red [source] is trying to take off the [target.shoes] from [target]'s feet!"
- if("belt")
- target.attack_log += text("\[[time_stamp()]\] Has had their belt item ([target.belt]) removed by [source.name] ([source.ckey])")
- source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) belt item ([target.belt])")
- message = "\red [source] is trying to take off the [target.belt] from [target]'s belt!"
- if("suit")
- target.attack_log += text("\[[time_stamp()]\] Has had their suit ([target.wear_suit]) removed by [source.name] ([source.ckey])")
- source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) suit ([target.wear_suit])")
- if(target.wear_suit && !target.wear_suit.canremove)
- message = "\red [source] fails to take off \a [target.wear_suit] from [target]'s body!"
- return
- else
- message = "\red [source] is trying to take off \a [target.wear_suit] from [target]'s body!"
- if("back")
- target.attack_log += text("\[[time_stamp()]\] Has had their back item ([target.back]) removed by [source.name] ([source.ckey])")
- source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) back item ([target.back])")
- message = "\red [source] is trying to take off \a [target.back] from [target]'s back!"
+ message = "\red [source] is trying to take off \a [target.w_uniform] from [target]'s body!"
+ for(var/obj/item/I in list(target.l_store, target.r_store))
+ if(I.on_found(source))
+ return
if("handcuff")
target.attack_log += text("\[[time_stamp()]\] Was unhandcuffed by [source.name] ([source.ckey])")
source.attack_log += text("\[[time_stamp()]\] Attempted to unhandcuff [target.name]'s ([target.ckey])")
@@ -515,17 +493,6 @@
target.attack_log += text("\[[time_stamp()]\] Was unlegcuffed by [source.name] ([source.ckey])")
source.attack_log += text("\[[time_stamp()]\] Attempted to unlegcuff [target.name]'s ([target.ckey])")
message = "\red [source] is trying to unlegcuff [target]!"
- if("uniform")
- target.attack_log += text("\[[time_stamp()]\] Has had their uniform ([target.w_uniform]) removed by [source.name] ([source.ckey])")
- source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) uniform ([target.w_uniform])")
- for(var/obj/item/I in list(target.l_store, target.r_store))
- if(I.on_found(source))
- return
- if(target.w_uniform && !target.w_uniform.canremove)
- message = "\red [source] fails to take off \a [target.w_uniform] from [target]'s body!"
- return
- else
- message = "\red [source] is trying to take off \a [target.w_uniform] from [target]'s body!"
if("tie")
var/obj/item/clothing/under/suit = target.w_uniform
target.attack_log += text("\[[time_stamp()]\] Has had their accessory ([suit.hastie]) removed by [source.name] ([source.ckey])")
@@ -537,10 +504,6 @@
return
else
message = "\red [source] is trying to take off \a [suit.hastie] from [target]'s suit!"
- if("s_store")
- target.attack_log += text("\[[time_stamp()]\] Has had their suit storage item ([target.s_store]) removed by [source.name] ([source.ckey])")
- source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) suit storage item ([target.s_store])")
- message = "\red [source] is trying to take off \a [target.s_store] from [target]'s suit!"
if("pockets")
target.attack_log += text("\[[time_stamp()]\] Has had their pockets emptied by [source.name] ([source.ckey])")
source.attack_log += text("\[[time_stamp()]\] Attempted to empty [target.name]'s ([target.ckey]) pockets")
@@ -553,10 +516,6 @@
del(src)
target.cpr_time = 0
message = "\red [source] is trying perform CPR on [target]!"
- if("id")
- target.attack_log += text("\[[time_stamp()]\] Has had their ID ([target.wear_id]) removed by [source.name] ([source.ckey])")
- source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) ID ([target.wear_id])")
- message = "\red [source] is trying to take off [target.wear_id] from [target]'s uniform!"
if("internal")
target.attack_log += text("\[[time_stamp()]\] Has had their internals toggled by [source.name] ([source.ckey])")
source.attack_log += text("\[[time_stamp()]\] Attempted to toggle [target.name]'s ([target.ckey]) internals")
@@ -575,8 +534,18 @@
return
message = "\red [source] is trying to set [target]'s suit sensors!"
- for(var/mob/M in viewers(target, null))
- M.show_message(message, 1)
+ if(target_item)
+ target.attack_log += text("\[[time_stamp()]\] Had their [target_item] removed by [source.name] ([source.ckey])")
+ source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) [target_item]")
+
+ if(target_item.canremove)
+ message = "[source] is trying to take off \a [target_item] from [target]'s [target_part]!"
+ else
+ source.visible_message("[source] fails to take off \a [target_item] from [target]'s [target_part]!")
+ return
+
+ source.visible_message(message)
+
spawn( HUMAN_STRIP_DELAY )
done()
return