From 9676fa0e5676d03642b8ecfe9b06b82d3fbb1583 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Sat, 13 Jul 2024 21:27:47 +0200 Subject: [PATCH 1/6] eh --- code/game/objects/items/explosives/plastic.dm | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/code/game/objects/items/explosives/plastic.dm b/code/game/objects/items/explosives/plastic.dm index 58cbca9a5ab3..d39240733257 100644 --- a/code/game/objects/items/explosives/plastic.dm +++ b/code/game/objects/items/explosives/plastic.dm @@ -21,7 +21,7 @@ var/atom/plant_target = null //which atom the plstique explosive is planted on var/overlay_image = "plastic-explosive2" var/image/overlay - var/list/breachable = list(/obj/structure/window, /turf/closed, /obj/structure/machinery/door, /obj/structure/mineral_door , /obj/structure/cargo_container) + var/list/breachable = list(/obj/structure/window, /turf/closed, /obj/structure/machinery/door, /obj/structure/mineral_door , /obj/structure/cargo_container,/obj/structure/machinery/colony_floodlight) antigrief_protection = TRUE //Should it be checked by antigrief? var/req_skill = SKILL_ENGINEER @@ -173,16 +173,9 @@ update_icon() /obj/item/explosive/plastic/proc/can_place(mob/user, atom/target) - if(istype(target, /obj/structure/ladder) || istype(target, /obj/item) || istype(target, /turf/open) || istype(target, /obj/structure/barricade) || istype(target, /obj/structure/closet/crate)) - return FALSE - - if(istype(target, /obj/structure/closet)) - var/obj/structure/closet/C = target - if(C.opened) - return FALSE - //vehicle interior stuff checks - if(istype(target, /obj/vehicle/multitile)) + if(!is_type_in_list(target, breachable))//only items on the list are allowed + to_chat(user, SPAN_WARNING("You cannot plant [name] on [target]!")) return FALSE //vehicle interior stuff checks @@ -190,11 +183,6 @@ to_chat(user, SPAN_WARNING("It's too cramped in here to deploy [src].")) return FALSE - if(istype(target, /obj/effect) || istype(target, /obj/structure/machinery)) - var/obj/O = target - if(O.unacidable) - return FALSE - if(istype(target, /turf/closed/wall)) var/turf/closed/wall/W = target if(W.hull) @@ -294,6 +282,9 @@ for(var/obj/structure/machinery/door/D in orange(1, target_turf)) D.ex_act(1000 * penetration, , cause_data) + for(var/obj/structure/machinery/colony_floodlight/colony_floodlight in orange(1, target_turf)) + colony_floodlight.Destroy() + handle_explosion(target_turf, dir, temp_cause) /obj/item/explosive/plastic/proc/handle_explosion(turf/target_turf, dir, cause_data) From 444b74cca5b6d542e63bfb809156daf0cb7ed21e Mon Sep 17 00:00:00 2001 From: vincibrv Date: Tue, 16 Jul 2024 08:14:45 +0200 Subject: [PATCH 2/6] ehm --- code/game/objects/items/explosives/plastic.dm | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/code/game/objects/items/explosives/plastic.dm b/code/game/objects/items/explosives/plastic.dm index d39240733257..fa763c311da1 100644 --- a/code/game/objects/items/explosives/plastic.dm +++ b/code/game/objects/items/explosives/plastic.dm @@ -21,7 +21,7 @@ var/atom/plant_target = null //which atom the plstique explosive is planted on var/overlay_image = "plastic-explosive2" var/image/overlay - var/list/breachable = list(/obj/structure/window, /turf/closed, /obj/structure/machinery/door, /obj/structure/mineral_door , /obj/structure/cargo_container,/obj/structure/machinery/colony_floodlight) + var/list/breachable = list(/obj/structure/window, /turf/closed, /obj/structure/machinery/door, /obj/structure/mineral_door , /obj/structure/cargo_container) antigrief_protection = TRUE //Should it be checked by antigrief? var/req_skill = SKILL_ENGINEER @@ -173,9 +173,16 @@ update_icon() /obj/item/explosive/plastic/proc/can_place(mob/user, atom/target) + if(istype(target, /obj/structure/ladder) || istype(target, /obj/item) || istype(target, /turf/open) || istype(target, /obj/structure/barricade) || istype(target, /obj/structure/closet/crate)) + return FALSE - if(!is_type_in_list(target, breachable))//only items on the list are allowed - to_chat(user, SPAN_WARNING("You cannot plant [name] on [target]!")) + if(istype(target, /obj/structure/closet)) + var/obj/structure/closet/C = target + if(C.opened) + return FALSE + + //vehicle interior stuff checks + if(istype(target, /obj/vehicle/multitile)) return FALSE //vehicle interior stuff checks @@ -183,6 +190,11 @@ to_chat(user, SPAN_WARNING("It's too cramped in here to deploy [src].")) return FALSE + if(istype(target, /obj/effect) || istype(target, /obj/structure/machinery)) + var/obj/O = target + if(O.unacidable) + return FALSE + if(istype(target, /turf/closed/wall)) var/turf/closed/wall/W = target if(W.hull) @@ -282,9 +294,6 @@ for(var/obj/structure/machinery/door/D in orange(1, target_turf)) D.ex_act(1000 * penetration, , cause_data) - for(var/obj/structure/machinery/colony_floodlight/colony_floodlight in orange(1, target_turf)) - colony_floodlight.Destroy() - handle_explosion(target_turf, dir, temp_cause) /obj/item/explosive/plastic/proc/handle_explosion(turf/target_turf, dir, cause_data) @@ -382,4 +391,3 @@ to_chat(user, SPAN_WARNING("You don't quite understand how the device works...")) return FALSE . = ..() - From 2a78285e6827fe1d1ae475ce796f718fc7884d13 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Tue, 16 Jul 2024 09:26:50 +0200 Subject: [PATCH 3/6] ehm --- code/game/objects/items/explosives/plastic.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/objects/items/explosives/plastic.dm b/code/game/objects/items/explosives/plastic.dm index fa763c311da1..58cbca9a5ab3 100644 --- a/code/game/objects/items/explosives/plastic.dm +++ b/code/game/objects/items/explosives/plastic.dm @@ -391,3 +391,4 @@ to_chat(user, SPAN_WARNING("You don't quite understand how the device works...")) return FALSE . = ..() + From 413ec4238879efe8a15ed5d80f9587a86a21b121 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Tue, 16 Jul 2024 10:22:37 +0200 Subject: [PATCH 4/6] removal --- .../objects/items/devices/drone_devices.dm | 241 ------------------ colonialmarines.dme | 1 - maps/map_files/CORSAT/Corsat.dmm | 1 - .../FOP_v2_Cellblocks/Prison_Station_FOP.dmm | 1 - .../Sorokyne_Strata/Sorokyne_Strata.dmm | 1 - 5 files changed, 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/colonialmarines.dme b/colonialmarines.dme index b479f0af62c5..1a9989149a30 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -1123,7 +1123,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 ea56dacf0fa3..4e6f0991ca6f 100644 --- a/maps/map_files/CORSAT/Corsat.dmm +++ b/maps/map_files/CORSAT/Corsat.dmm @@ -24930,7 +24930,6 @@ /area/corsat/gamma/biodome/complex) "bTQ" = ( /obj/structure/surface/table/reinforced, -/obj/item/device/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..22ff5273bffc 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,6 @@ /area/prison/security/monitoring/highsec) "btD" = ( /obj/structure/surface/table/reinforced, -/obj/item/device/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..ac53e9a1dfd7 100644 --- a/maps/map_files/Sorokyne_Strata/Sorokyne_Strata.dmm +++ b/maps/map_files/Sorokyne_Strata/Sorokyne_Strata.dmm @@ -2795,7 +2795,6 @@ }, /obj/structure/surface/table/reinforced/prison, /obj/item/device/mass_spectrometer, -/obj/item/device/matter_decompiler, /turf/open/floor/strata/multi_tiles/southwest, /area/strata/ag/interior/outpost/canteen/personal_storage) "ake" = ( From 1b7cc10ee9c22b9b05d9ed78c05c4923e84d3f08 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Thu, 18 Jul 2024 08:50:51 +0200 Subject: [PATCH 5/6] replacement with props --- code/game/objects/prop.dm | 12 ++++++++++++ maps/map_files/CORSAT/Corsat.dmm | 1 + .../FOP_v2_Cellblocks/Prison_Station_FOP.dmm | 1 + maps/map_files/Sorokyne_Strata/Sorokyne_Strata.dmm | 1 + 4 files changed, 15 insertions(+) diff --git a/code/game/objects/prop.dm b/code/game/objects/prop.dm index cc941b19ed97..aea6818fca91 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/griper + 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/maps/map_files/CORSAT/Corsat.dmm b/maps/map_files/CORSAT/Corsat.dmm index 4e6f0991ca6f..0ce623f93f32 100644 --- a/maps/map_files/CORSAT/Corsat.dmm +++ b/maps/map_files/CORSAT/Corsat.dmm @@ -24930,6 +24930,7 @@ /area/corsat/gamma/biodome/complex) "bTQ" = ( /obj/structure/surface/table/reinforced, +/obj/item/prop/griper, /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 22ff5273bffc..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,6 +18901,7 @@ /area/prison/security/monitoring/highsec) "btD" = ( /obj/structure/surface/table/reinforced, +/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 ac53e9a1dfd7..ad54d9e129ae 100644 --- a/maps/map_files/Sorokyne_Strata/Sorokyne_Strata.dmm +++ b/maps/map_files/Sorokyne_Strata/Sorokyne_Strata.dmm @@ -2795,6 +2795,7 @@ }, /obj/structure/surface/table/reinforced/prison, /obj/item/device/mass_spectrometer, +/obj/item/prop/matter_decompiler, /turf/open/floor/strata/multi_tiles/southwest, /area/strata/ag/interior/outpost/canteen/personal_storage) "ake" = ( From e29c8e2601c13e8b95875e3f3720aecfdc8416db Mon Sep 17 00:00:00 2001 From: vincibrv Date: Thu, 18 Jul 2024 17:49:54 +0200 Subject: [PATCH 6/6] mispel lfix --- code/game/objects/prop.dm | 2 +- maps/map_files/CORSAT/Corsat.dmm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/prop.dm b/code/game/objects/prop.dm index aea6818fca91..9e256236e7d6 100644 --- a/code/game/objects/prop.dm +++ b/code/game/objects/prop.dm @@ -169,7 +169,7 @@ icon_state = "game_kit" icon = 'icons/obj/items/items.dmi' -/obj/item/prop/griper +/obj/item/prop/gripper name = "magnetic gripper" desc = "A simple grasping tool for synthetic assets." icon_state = "gripper" diff --git a/maps/map_files/CORSAT/Corsat.dmm b/maps/map_files/CORSAT/Corsat.dmm index 0ce623f93f32..f5f4f0095d19 100644 --- a/maps/map_files/CORSAT/Corsat.dmm +++ b/maps/map_files/CORSAT/Corsat.dmm @@ -24930,7 +24930,7 @@ /area/corsat/gamma/biodome/complex) "bTQ" = ( /obj/structure/surface/table/reinforced, -/obj/item/prop/griper, +/obj/item/prop/gripper, /turf/open/floor/corsat/retrosquareslight, /area/corsat/sigma/south/complex) "bTU" = (