From b4c4ad391ba88e2a2e54ec6a37ac7dbd4e21a9ab Mon Sep 17 00:00:00 2001 From: cuberound <122645057+cuberound@users.noreply.github.com> Date: Tue, 30 Jul 2024 22:34:41 +0200 Subject: [PATCH] Drone devices removal (#6724) # About the pull request removes unused shit # Explain why it's good for the game cleaner code # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: del:/obj/item/device/gripper and /obj/item/device/matter_decompiler removed /:cl: --------- Co-authored-by: vincibrv --- .../objects/items/devices/drone_devices.dm | 241 ------------------ code/game/objects/prop.dm | 12 + colonialmarines.dme | 1 - maps/map_files/CORSAT/Corsat.dmm | 2 +- .../FOP_v2_Cellblocks/Prison_Station_FOP.dmm | 2 +- .../Sorokyne_Strata/Sorokyne_Strata.dmm | 2 +- 6 files changed, 15 insertions(+), 245 deletions(-) delete mode 100644 code/game/objects/items/devices/drone_devices.dm diff --git a/code/game/objects/items/devices/drone_devices.dm b/code/game/objects/items/devices/drone_devices.dm deleted file mode 100644 index 0e22b64bf67f..000000000000 --- a/code/game/objects/items/devices/drone_devices.dm +++ /dev/null @@ -1,241 +0,0 @@ - - -//Simple borg hand. -//Limited use. -/obj/item/device/gripper - name = "magnetic gripper" - desc = "A simple grasping tool for synthetic assets." - icon_state = "gripper" - - //Has a list of items that it can hold. - var/list/can_hold = list( - /obj/item/cell, - /obj/item/circuitboard, - /obj/item/stock_parts, - /obj/item/frame, - /obj/item/tank, - /obj/item/stock_parts/smes_coil - ) - - //Item currently being held. - var/obj/item/wrapped = null - -/obj/item/device/gripper/paperwork - name = "paperwork gripper" - desc = "A simple grasping tool for clerical work." - - can_hold = list( - /obj/item/clipboard, - /obj/item/paper, - /obj/item/paper_bundle, - /obj/item/card/id, - ) - -/obj/item/device/gripper/attack_self(mob/user as mob) - ..() - - if(wrapped) - wrapped.attack_self(user) - -/obj/item/device/gripper/verb/drop_item() - - set name = "Drop Item" - set desc = "Release an item from your magnetic gripper." - set category = "Drone" - set src in usr - if(!wrapped) - //There's some weirdness with items being lost inside the arm. Trying to fix all cases. ~Z - for(var/obj/item/thing in src.contents) - thing.forceMove(get_turf(src)) - return - - if(wrapped.loc != src) - wrapped = null - return - - to_chat(src.loc, SPAN_WARNING("You drop \the [wrapped].")) - wrapped.forceMove(get_turf(src)) - wrapped = null - //update_icon() - -/obj/item/device/gripper/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) - return - -/obj/item/device/gripper/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity, params) - - if(!target || !proximity) //Target is invalid or we are not adjacent. - return - - //There's some weirdness with items being lost inside the arm. Trying to fix all cases. ~Z - if(!wrapped) - for(var/obj/item/thing in src.contents) - wrapped = thing - break - - if(wrapped) //Already have an item. - - //Temporary put wrapped into user so target's attackby() checks pass. - wrapped.forceMove(user) - - //Pass the attack on to the target. This might delete/relocate wrapped. - target.attackby(wrapped,user) - - //If wrapped was neither deleted nor put into target, put it back into the gripper. - if(wrapped && user && (wrapped.loc == user)) - wrapped.forceMove(src) - else - wrapped = null - return - - else if(istype(target,/obj/item)) //Check that we're not pocketing a mob. - - //...and that the item is not in a container. - if(!isturf(target.loc)) - return - - var/obj/item/I = target - - //Check if the item is blacklisted. - var/grab = 0 - for(var/typepath in can_hold) - if(istype(I,typepath)) - grab = 1 - break - - //We can grab the item, finally. - if(grab) - to_chat(user, "You collect \the [I].") - I.forceMove(src) - wrapped = I - return - else - to_chat(user, SPAN_DANGER("Your gripper cannot hold \the [target].")) - - else if(istype(target,/obj/structure/machinery/power/apc)) - var/obj/structure/machinery/power/apc/A = target - if(A.opened) - if(A.cell) - - wrapped = A.cell - - A.cell.add_fingerprint(user) - A.cell.update_icon() - A.cell.forceMove(src) - A.cell = null - - A.charging = 0 - A.update_icon() - - user.visible_message(SPAN_DANGER("[user] removes the power cell from [A]!"), "You remove the power cell.") - - - - - - - -//TODO: Matter decompiler. -/obj/item/device/matter_decompiler - name = "matter decompiler" - desc = "Eating trash, bits of glass, or other debris will replenish your stores." - icon_state = "decompiler" - - //Metal, glass, wood, plastic. - var/list/stored_comms = list( - "metal" = 0, - "glass" = 0, - "wood" = 0, - "plastic" = 0 - ) - -/obj/item/device/matter_decompiler/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) - return - -/obj/item/device/matter_decompiler/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity, params) - - if(!proximity) return //Not adjacent. - - //We only want to deal with using this on turfs. Specific items aren't important. - var/turf/T = get_turf(target) - if(!istype(T)) - return - - //Used to give the right message. - var/grabbed_something = 0 - - for(var/mob/M in T) - if(istype(M,/mob/living/simple_animal/lizard) || istype(M,/mob/living/simple_animal/mouse)) - src.loc.visible_message(SPAN_DANGER("[src.loc] sucks [M] into its decompiler. There's a horrible crunching noise."),SPAN_DANGER("It's a bit of a struggle, but you manage to suck [M] into your decompiler. It makes a series of visceral crunching noises.")) - new/obj/effect/decal/cleanable/blood/splatter(get_turf(src)) - qdel(M) - stored_comms["wood"]++ - stored_comms["wood"]++ - stored_comms["plastic"]++ - stored_comms["plastic"]++ - return - else - continue - - for(var/obj/W in T) - //Different classes of items give different commodities. - if (istype(W,/obj/item/trash/cigbutt)) - stored_comms["plastic"]++ - else if(istype(W,/obj/effect/spider/spiderling)) - stored_comms["wood"]++ - stored_comms["wood"]++ - stored_comms["plastic"]++ - stored_comms["plastic"]++ - else if(istype(W,/obj/item/light_bulb)) - var/obj/item/light_bulb/L = W - if(L.status >= 2) //In before someone changes the inexplicably local defines. ~ Z - stored_comms["metal"]++ - stored_comms["glass"]++ - else - continue - else if(istype(W,/obj/effect/decal/remains/robot)) - stored_comms["metal"]++ - stored_comms["metal"]++ - stored_comms["plastic"]++ - stored_comms["plastic"]++ - stored_comms["glass"]++ - else if(istype(W,/obj/item/trash)) - stored_comms["metal"]++ - stored_comms["plastic"]++ - stored_comms["plastic"]++ - stored_comms["plastic"]++ - else if(istype(W,/obj/effect/decal/cleanable/blood/gibs/robot)) - stored_comms["metal"]++ - stored_comms["metal"]++ - stored_comms["glass"]++ - stored_comms["glass"]++ - else if(istype(W,/obj/item/ammo_casing)) - stored_comms["metal"]++ - else if(istype(W,/obj/item/shard/shrapnel)) - stored_comms["metal"]++ - stored_comms["metal"]++ - stored_comms["metal"]++ - else if(istype(W,/obj/item/shard)) - stored_comms["glass"]++ - stored_comms["glass"]++ - stored_comms["glass"]++ - else if(istype(W,/obj/item/reagent_container/food/snacks/grown)) - stored_comms["wood"]++ - stored_comms["wood"]++ - stored_comms["wood"]++ - stored_comms["wood"]++ - else if(istype(W,/obj/item/ammo_magazine)) - var/obj/item/ammo_magazine/AM = W - if(AM.current_rounds) - continue - stored_comms["metal"]++ - else - continue - - qdel(W) - grabbed_something = 1 - - if(grabbed_something) - to_chat(user, SPAN_NOTICE(" You deploy your decompiler and clear out the contents of \the [T].")) - else - to_chat(user, SPAN_DANGER("Nothing on \the [T] is useful to you.")) - return diff --git a/code/game/objects/prop.dm b/code/game/objects/prop.dm index cc941b19ed97..9e256236e7d6 100644 --- a/code/game/objects/prop.dm +++ b/code/game/objects/prop.dm @@ -169,6 +169,18 @@ icon_state = "game_kit" icon = 'icons/obj/items/items.dmi' +/obj/item/prop/gripper + name = "magnetic gripper" + desc = "A simple grasping tool for synthetic assets." + icon_state = "gripper" + icon = 'icons/obj/items/devices.dmi' + +/obj/item/prop/matter_decompiler + name = "matter decompiler" + desc = "Eating trash, bits of glass, or other debris will replenish your stores." + icon_state = "decompiler" + icon = 'icons/obj/items/devices.dmi' + /// Xeno-specific props /obj/item/prop/alien/hugger diff --git a/colonialmarines.dme b/colonialmarines.dme index 6c234b764d0b..d4c8bf6ce6e3 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -1121,7 +1121,6 @@ #include "code\game\objects\items\devices\debugger.dm" #include "code\game\objects\items\devices\defibrillator.dm" #include "code\game\objects\items\devices\device.dm" -#include "code\game\objects\items\devices\drone_devices.dm" #include "code\game\objects\items\devices\dummy_tablet.dm" #include "code\game\objects\items\devices\flash.dm" #include "code\game\objects\items\devices\flashlight.dm" diff --git a/maps/map_files/CORSAT/Corsat.dmm b/maps/map_files/CORSAT/Corsat.dmm index f335e4c41e8b..5730f8e64032 100644 --- a/maps/map_files/CORSAT/Corsat.dmm +++ b/maps/map_files/CORSAT/Corsat.dmm @@ -24929,7 +24929,7 @@ /area/corsat/gamma/biodome/complex) "bTQ" = ( /obj/structure/surface/table/reinforced, -/obj/item/device/gripper, +/obj/item/prop/gripper, /turf/open/floor/corsat/retrosquareslight, /area/corsat/sigma/south/complex) "bTU" = ( diff --git a/maps/map_files/FOP_v2_Cellblocks/Prison_Station_FOP.dmm b/maps/map_files/FOP_v2_Cellblocks/Prison_Station_FOP.dmm index 5cccceb54389..60bb9c8aa42f 100644 --- a/maps/map_files/FOP_v2_Cellblocks/Prison_Station_FOP.dmm +++ b/maps/map_files/FOP_v2_Cellblocks/Prison_Station_FOP.dmm @@ -18901,7 +18901,7 @@ /area/prison/security/monitoring/highsec) "btD" = ( /obj/structure/surface/table/reinforced, -/obj/item/device/matter_decompiler, +/obj/item/prop/matter_decompiler, /turf/open/floor/prison/redfull, /area/prison/hallway/central/west) "btE" = ( diff --git a/maps/map_files/Sorokyne_Strata/Sorokyne_Strata.dmm b/maps/map_files/Sorokyne_Strata/Sorokyne_Strata.dmm index 2baad841c255..ad54d9e129ae 100644 --- a/maps/map_files/Sorokyne_Strata/Sorokyne_Strata.dmm +++ b/maps/map_files/Sorokyne_Strata/Sorokyne_Strata.dmm @@ -2795,7 +2795,7 @@ }, /obj/structure/surface/table/reinforced/prison, /obj/item/device/mass_spectrometer, -/obj/item/device/matter_decompiler, +/obj/item/prop/matter_decompiler, /turf/open/floor/strata/multi_tiles/southwest, /area/strata/ag/interior/outpost/canteen/personal_storage) "ake" = (