From d79b910965596f9ba9138ebce6de6447992712b8 Mon Sep 17 00:00:00 2001 From: Ren Erthilo Date: Thu, 19 Apr 2012 21:42:03 +0100 Subject: [PATCH 1/2] Adds var logging for stripping items. Could be useful. --- code/modules/mob/living/carbon/human/human.dm | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index b5ccea29b98..ae9f4237584 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1703,6 +1703,8 @@ var/message = null switch(place) if("mask") + target.attack_log += text("\[[time_stamp()]\] Has 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(istype(target.wear_mask, /obj/item/clothing)&&!target.wear_mask:canremove) message = text("\red [] fails to take off \a [] from []'s body!", source, target.wear_mask, target) else @@ -1710,51 +1712,75 @@ /* if("headset") message = text("\red [] is trying to take off \a [] from []'s face!", source, target.w_radio, target) */ if("l_hand") + target.attack_log += text("\[[time_stamp()]\] Has had their left hand item removed by [source.name] ([source.ckey])") + source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) left hand item") message = text("\red [] is trying to take off \a [] from []'s left hand!", source, target.l_hand, target) if("r_hand") + target.attack_log += text("\[[time_stamp()]\] Has had their right hand item removed by [source.name] ([source.ckey])") + source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) right hand item") message = text("\red [] is trying to take off \a [] from []'s right hand!", source, target.r_hand, target) if("gloves") + target.attack_log += text("\[[time_stamp()]\] Has had their gloves removed by [source.name] ([source.ckey])") + source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) gloves") if(istype(target.gloves, /obj/item/clothing)&&!target.gloves:canremove) message = text("\red [] fails to take off \a [] from []'s body!", source, target.gloves, target) else message = text("\red [] is trying to take off the [] from []'s hands!", source, target.gloves, target) if("eyes") + target.attack_log += text("\[[time_stamp()]\] Has had their eyewear removed by [source.name] ([source.ckey])") + source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) eyewear") if(istype(target.glasses, /obj/item/clothing)&&!target.glasses:canremove) message = text("\red [] fails to take off \a [] from []'s body!", source, target.glasses, target) else message = text("\red [] is trying to take off the [] from []'s eyes!", source, target.glasses, target) if("l_ear") + target.attack_log += text("\[[time_stamp()]\] Has had their left ear item removed by [source.name] ([source.ckey])") + source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) left ear item") if(istype(target.l_ear, /obj/item/clothing)&&!target.l_ear:canremove) message = text("\red [] fails to take off \a [] from []'s body!", source, target.l_ear, target) else message = text("\red [] is trying to take off the [] from []'s left ear!", source, target.l_ear, target) if("r_ear") + target.attack_log += text("\[[time_stamp()]\] Has had their right ear item removed by [source.name] ([source.ckey])") + source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) right ear item") if(istype(target.r_ear, /obj/item/clothing)&&!target.r_ear:canremove) message = text("\red [] fails to take off \a [] from []'s body!", source, target.r_ear, target) else message = text("\red [] is trying to take off the [] from []'s right ear!", source, target.r_ear, target) if("head") + target.attack_log += text("\[[time_stamp()]\] Has had their hat removed by [source.name] ([source.ckey])") + source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) hat") if(istype(target.head, /obj/item/clothing)&&!target.head:canremove) message = text("\red [] fails to take off \a [] from []'s body!", source, target.head, target) else message = text("\red [] is trying to take off the [] from []'s head!", source, target.head, target) if("shoes") + target.attack_log += text("\[[time_stamp()]\] Has had their shoes removed by [source.name] ([source.ckey])") + source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) shoes") if(istype(target.shoes, /obj/item/clothing)&&!target.shoes:canremove) message = text("\red [] fails to take off \a [] from []'s body!", source, target.shoes, target) else message = text("\red [] is trying to take off the [] from []'s feet!", source, target.shoes, target) if("belt") + target.attack_log += text("\[[time_stamp()]\] Has had their belt item removed by [source.name] ([source.ckey])") + source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) belt item") message = text("\red [] is trying to take off the [] from []'s belt!", source, target.belt, target) if("suit") + target.attack_log += text("\[[time_stamp()]\] Has had their suit removed by [source.name] ([source.ckey])") + source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) suit") if(istype(target.wear_suit, /obj/item/clothing)&&!target.wear_suit:canremove) message = text("\red [] fails to take off \a [] from []'s body!", source, target.wear_suit, target) else message = text("\red [] is trying to take off \a [] from []'s body!", source, target.wear_suit, target) if("back") + target.attack_log += text("\[[time_stamp()]\] Has had their back item removed by [source.name] ([source.ckey])") + source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) back item") message = text("\red [] is trying to take off \a [] from []'s back!", source, target.back, target) if("handcuff") message = text("\red [] is trying to unhandcuff []!", source, target) if("uniform") + target.attack_log += text("\[[time_stamp()]\] Has had their uniform removed by [source.name] ([source.ckey])") + source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) uniform") if(istype(target.w_uniform, /obj/item/clothing)&&!target.w_uniform:canremove) message = text("\red [] fails to take off \a [] from []'s body!", source, target.w_uniform, target) else @@ -1764,6 +1790,8 @@ if("h_store") message = text("\red [] is trying to empty []'s hat!", source, target) 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") for(var/obj/item/weapon/mousetrap/MT in list(target.l_store, target.r_store)) if(MT.armed) for(var/mob/O in viewers(target, null)) @@ -1786,8 +1814,12 @@ return message = text("\red [] is trying perform CPR on []!", source, target) if("id") + target.attack_log += text("\[[time_stamp()]\] Has had their ID removed by [source.name] ([source.ckey])") + source.attack_log += text("\[[time_stamp()]\] Attempted to remove [target.name]'s ([target.ckey]) ID") message = text("\red [] is trying to take off [] from []'s uniform!", source, target.wear_id, target) 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") if (target.internal) message = text("\red [] is trying to remove []'s internals", source, target) else From 2a3369e99acb97e87db6eda3b91a2ac2e0ff3391 Mon Sep 17 00:00:00 2001 From: Ren Erthilo Date: Thu, 19 Apr 2012 23:01:06 +0100 Subject: [PATCH 2/2] Adds detomax and grenade logging. --- baystation12.dme | 2 -- code/game/objects/devices/PDA/PDA.dm | 4 ++++ code/game/objects/items/weapons/grenades.dm | 3 +++ code/modules/chemical/Chemistry-Tools.dm | 12 +++++++++++- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/baystation12.dme b/baystation12.dme index fd245c3b782..b029869cf22 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -157,10 +157,8 @@ #define FILE_DIR "code/WorkInProgress" #define FILE_DIR "code/WorkInProgress/Apples" #define FILE_DIR "code/WorkInProgress/Cael_Aislinn" -#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Jumper" #define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Rust" #define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Tajara" -#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/tajara_sprites" #define FILE_DIR "code/WorkInProgress/Chinsky" #define FILE_DIR "code/WorkInProgress/mapload" #define FILE_DIR "code/WorkInProgress/Mini" diff --git a/code/game/objects/devices/PDA/PDA.dm b/code/game/objects/devices/PDA/PDA.dm index 01210b543cc..26139627de7 100755 --- a/code/game/objects/devices/PDA/PDA.dm +++ b/code/game/objects/devices/PDA/PDA.dm @@ -620,6 +620,10 @@ var/obj/item/device/pda/P = locate(href_list["target"]) if(!isnull(P)) if (!P.toff && cartridge:shock_charges > 0) + log_admin("ATTACK: [U] ([U.ckey]) triggered a Detomatix Cartridge.") + message_admins("ATTACK: [U] ([U.ckey]) triggered a Detomatix Cartridge.") + log_attack("[U.name] ([U.ckey]) triggered a Detomatix Cartridge.") + cartridge:shock_charges-- var/difficulty = 0 diff --git a/code/game/objects/items/weapons/grenades.dm b/code/game/objects/items/weapons/grenades.dm index 52957a480b1..96e5480a8b0 100644 --- a/code/game/objects/items/weapons/grenades.dm +++ b/code/game/objects/items/weapons/grenades.dm @@ -293,6 +293,9 @@ FLASHBANG if(!active) //world << "cluster attack self" user << "\red You prime the clusterbang! [det_time/10] seconds!" + log_attack("[user.name] ([user.ckey]) primed a [src].") + log_admin("ATTACK: [user] ([user.ckey]) primed a [src].") + message_admins("ATTACK: [user] ([user.ckey]) primed a [src].") src.active = 1 src.icon_state = "clusterbang1" playsound(src.loc, 'armbomb.ogg', 75, 1, -3) diff --git a/code/modules/chemical/Chemistry-Tools.dm b/code/modules/chemical/Chemistry-Tools.dm index 022c2a0af13..d742c765e2a 100644 --- a/code/modules/chemical/Chemistry-Tools.dm +++ b/code/modules/chemical/Chemistry-Tools.dm @@ -26,7 +26,7 @@ var/obj/item/weapon/circuitboard/circuit = null var/list/allowed_containers = list("/obj/item/weapon/reagent_containers/glass/beaker", "/obj/item/weapon/reagent_containers/glass/dispenser", "/obj/item/weapon/reagent_containers/glass/bottle") var/affected_area = 3 - + var/mob/attacher = "Unknown" attackby(var/obj/item/weapon/W, var/mob/user) if(path || !active) @@ -65,6 +65,10 @@ W.loc = src user << "\blue You attach the [W] to the grenade controls!" W.master = src + bombers += "[key_name(user)] attached a [W] to a grenade casing." + message_admins("[key_name_admin(user)] attached a [W] to a grenade casing.") + log_game("[key_name_admin(user)] attached a [W] to a grenade casing.") + attacher = key_name(user) else if(istype(W, /obj/item/weapon/screwdriver)) if(beaker_one && beaker_two && attached_device) @@ -266,6 +270,12 @@ beaker_two.reagents.maximum_volume += beaker_one.reagents.maximum_volume // make sure everything can mix beaker_one.reagents.update_total() beaker_one.reagents.trans_to(beaker_two, beaker_one.reagents.total_volume) + var/turf/bombturf = get_turf(src) + var/bombarea = bombturf.loc.name + var/log_str = "Grenade detonated in [bombarea] with device attacher: [attacher]. Last touched by: [src.fingerprintslast]" + bombers += log_str + message_admins(log_str) + log_game(log_str) if(beaker_one.reagents.total_volume) //The possible reactions didnt use up all reagents. var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread() steam.set_up(10, 0, get_turf(src))