From 626d2754d56fd750bce76335a06f12cee3b2327d Mon Sep 17 00:00:00 2001 From: GDN <96800819+GDNgit@users.noreply.github.com> Date: Wed, 8 Mar 2023 13:15:16 -0600 Subject: [PATCH] objective items being destroyed are now logged (#20485) * objective items being destroyed is now logged * signal time * oop * Update code/modules/projectiles/guns/energy/laser.dm Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> * Update code/game/objects/items/documents.dm Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> * mira review --------- Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> --- code/game/objects/items.dm | 5 +++++ code/game/objects/items/blueprints.dm | 1 + code/game/objects/items/documents.dm | 4 ++++ code/game/objects/items/weapons/defib.dm | 1 + code/game/objects/items/weapons/melee/melee_misc.dm | 1 + code/game/objects/items/weapons/tanks/jetpack.dm | 4 ++++ code/game/objects/items/weapons/teleportation.dm | 4 ++++ code/modules/clothing/shoes/magboots.dm | 4 ++++ code/modules/clothing/suits/armor.dm | 2 ++ code/modules/clothing/under/accessories/accessory.dm | 4 ++++ code/modules/martial_arts/krav_maga.dm | 4 ++++ code/modules/projectiles/guns/energy/laser.dm | 4 ++++ code/modules/projectiles/guns/energy/nuclear.dm | 4 ++++ code/modules/reagents/reagent_containers/hypospray.dm | 4 ++++ 14 files changed, 46 insertions(+) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 5a62bd7dc79..f74f2dd65f6 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -177,6 +177,11 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons master = null return ..() +/obj/item/proc/alert_admins_on_destroy() + SIGNAL_HANDLER + message_admins("[src] has been destroyed at [ADMIN_COORDJMP(src)].") + log_game("[src] has been destroyed at ([x],[y],[z]) in the location [loc].") + /obj/item/proc/check_allowed_items(atom/target, not_inside, target_self) if(((src in target) && !target_self) || (!isturf(target.loc) && !isturf(target) && not_inside)) return FALSE diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index a51e3ef7c9b..0a91b9be764 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -345,3 +345,4 @@ /obj/item/areaeditor/blueprints/ce/Initialize(mapload) . = ..() ADD_TRAIT(src, TRAIT_SHOW_WIRE_INFO, ROUNDSTART_TRAIT) + RegisterSignal(src, COMSIG_PARENT_QDELETING, PROC_REF(alert_admins_on_destroy)) diff --git a/code/game/objects/items/documents.dm b/code/game/objects/items/documents.dm index 91ba15b519a..dd2c351da2f 100644 --- a/code/game/objects/items/documents.dm +++ b/code/game/objects/items/documents.dm @@ -11,6 +11,10 @@ pressure_resistance = 2 resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF +/obj/item/documents/Initialize(mapload) + . = ..() + RegisterSignal(src, COMSIG_PARENT_QDELETING, PROC_REF(alert_admins_on_destroy)) + /obj/item/documents/nanotrasen desc = "\"Top Secret\" Nanotrasen documents printed on special copy-protected paper. It is filled with complex diagrams and lists of names, dates and coordinates." icon_state = "docs_verified" diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index aa44584eae5..411d2f4cbe4 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -259,6 +259,7 @@ . = ..() cell = new /obj/item/stock_parts/cell/bluespace/charging(src) update_icon(UPDATE_OVERLAYS) + RegisterSignal(src, COMSIG_PARENT_QDELETING, PROC_REF(alert_admins_on_destroy)) /obj/item/defibrillator/compact/advanced/emp_act(severity) if(world.time > next_emp_message) diff --git a/code/game/objects/items/weapons/melee/melee_misc.dm b/code/game/objects/items/weapons/melee/melee_misc.dm index 3ca35667c1a..faf33d07813 100644 --- a/code/game/objects/items/weapons/melee/melee_misc.dm +++ b/code/game/objects/items/weapons/melee/melee_misc.dm @@ -40,6 +40,7 @@ /obj/item/melee/rapier/Initialize(mapload) . = ..() AddComponent(/datum/component/parry, _stamina_constant = 2, _stamina_coefficient = 0.5, _parryable_attack_types = NON_PROJECTILE_ATTACKS) + RegisterSignal(src, COMSIG_PARENT_QDELETING, PROC_REF(alert_admins_on_destroy)) /obj/item/melee/icepick name = "ice pick" diff --git a/code/game/objects/items/weapons/tanks/jetpack.dm b/code/game/objects/items/weapons/tanks/jetpack.dm index f2c7621406d..58bac5a2188 100644 --- a/code/game/objects/items/weapons/tanks/jetpack.dm +++ b/code/game/objects/items/weapons/tanks/jetpack.dm @@ -133,6 +133,10 @@ w_class = WEIGHT_CLASS_NORMAL resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF //steal objective items are hard to destroy. +/obj/item/tank/jetpack/oxygen/captain/Initialize(mapload) + . = ..() + RegisterSignal(src, COMSIG_PARENT_QDELETING, PROC_REF(alert_admins_on_destroy)) + /obj/item/tank/jetpack/oxygen/security name = "security jetpack (oxygen)" desc = "A tank of compressed oxygen for use as propulsion in zero-gravity areas by security forces." diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index b339cf2f755..6173b3c30c2 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -109,6 +109,10 @@ Frequency: resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF var/active_portals = 0 +/obj/item/hand_tele/Initialize(mapload) + . = ..() + RegisterSignal(src, COMSIG_PARENT_QDELETING, PROC_REF(alert_admins_on_destroy)) + /obj/item/hand_tele/attack_self(mob/user) var/turf/current_location = get_turf(user)//What turf is the user on? if(!current_location||!is_teleport_allowed(current_location.z))//If turf was not found or they're somewhere teleproof diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index f319aa13f50..b7d5d66d296 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -61,6 +61,10 @@ origin_tech = null resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF +/obj/item/clothing/shoes/magboots/advance/Initialize(mapload) + . = ..() + RegisterSignal(src, COMSIG_PARENT_QDELETING, PROC_REF(alert_admins_on_destroy)) + /obj/item/clothing/shoes/magboots/syndie name = "blood-red magboots" desc = "Reverse-engineered magnetic boots that have a heavy magnetic pull. Property of Gorlex Marauders." diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 54c82c8a154..d7adae07f3e 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -364,6 +364,7 @@ /obj/item/clothing/suit/armor/reactive/Initialize(mapload, ...) . = ..() cell = new(src) + RegisterSignal(src, COMSIG_PARENT_QDELETING, PROC_REF(alert_admins_on_destroy)) /obj/item/clothing/suit/armor/reactive/Destroy() QDEL_NULL(cell) @@ -579,6 +580,7 @@ . = ..() var/spawnpath = pick(subtypesof(/obj/item/clothing/suit/armor/reactive) - /obj/item/clothing/suit/armor/reactive/random) new spawnpath(loc) + UnregisterSignal(src, COMSIG_PARENT_QDELETING) return INITIALIZE_HINT_QDEL //All of the armor below is mostly unused diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index 4aa699928f1..170eea4efb7 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -209,6 +209,10 @@ desc = "A golden medal awarded exclusively to those promoted to the rank of captain. It signifies the codified responsibilities of a captain to Nanotrasen, and their undisputable authority over their crew." resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF +/obj/item/clothing/accessory/medal/gold/captain/Initialize(mapload) + . = ..() + RegisterSignal(src, COMSIG_PARENT_QDELETING, PROC_REF(alert_admins_on_destroy)) + /obj/item/clothing/accessory/medal/gold/heroism name = "medal of exceptional heroism" desc = "An extremely rare golden medal awarded only by CentComm. To receive such a medal is the highest honor and as such, very few exist." diff --git a/code/modules/martial_arts/krav_maga.dm b/code/modules/martial_arts/krav_maga.dm index 6bf53221df3..0a094dc2297 100644 --- a/code/modules/martial_arts/krav_maga.dm +++ b/code/modules/martial_arts/krav_maga.dm @@ -152,6 +152,10 @@ icon_state = "fightgloves" item_state = "fightgloves" +/obj/item/clothing/gloves/color/black/krav_maga/sec/Initialize(mapload) + . = ..() + RegisterSignal(src, COMSIG_PARENT_QDELETING, PROC_REF(alert_admins_on_destroy)) + /obj/item/clothing/gloves/color/black/krav_maga/combat // for nukies name = "combat gloves plus" desc = "These combat gloves have been upgraded with nanochips that teach the wearer Krav Maga." diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index 88ae07e10f0..adaf58e8a7c 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -36,6 +36,10 @@ selfcharge = TRUE resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF +/obj/item/gun/energy/laser/captain/Initialize(mapload, ...) + . = ..() + RegisterSignal(src, COMSIG_PARENT_QDELETING, PROC_REF(alert_admins_on_destroy)) + /obj/item/gun/energy/laser/captain/detailed_examine() return "This is an energy weapon. Most energy weapons can fire through windows harmlessly. Unlike most weapons, this weapon recharges itself." diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index cfe847cf944..00038774afa 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -62,6 +62,10 @@ shaded_charge = FALSE can_holster = TRUE +/obj/item/gun/energy/gun/hos/Initialize(mapload, ...) + . = ..() + RegisterSignal(src, COMSIG_PARENT_QDELETING, PROC_REF(alert_admins_on_destroy)) + /obj/item/gun/energy/gun/blueshield name = "advanced energy revolver" desc = "An advanced energy revolver with the capacity to shoot both disablers and lasers." diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 1d44b6a9dca..911a4a02aaf 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -84,6 +84,10 @@ list_reagents = list("omnizine" = 30) resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF +/obj/item/reagent_containers/hypospray/CMO/Initialize(mapload) + . = ..() + RegisterSignal(src, COMSIG_PARENT_QDELETING, PROC_REF(alert_admins_on_destroy)) + /obj/item/reagent_containers/hypospray/combat name = "combat stimulant injector" desc = "A modified air-needle autoinjector, used by support operatives to quickly heal injuries in combat."