From 9676fa0e5676d03642b8ecfe9b06b82d3fbb1583 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Sat, 13 Jul 2024 21:27:47 +0200 Subject: [PATCH 1/5] 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/5] 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/5] 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 8218d2d43f339a622729c2ec0c00f9476a599c03 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Fri, 26 Jul 2024 16:57:34 +0200 Subject: [PATCH 4/5] replaces hydro lights with colony lights --- code/game/machinery/bio-dome_floodlights.dm | 169 ------------------ .../vehicles/multitile/multitile_bump.dm | 8 - colonialmarines.dme | 1 - maps/templates/baseone.dmm | 2 +- 4 files changed, 1 insertion(+), 179 deletions(-) delete mode 100644 code/game/machinery/bio-dome_floodlights.dm diff --git a/code/game/machinery/bio-dome_floodlights.dm b/code/game/machinery/bio-dome_floodlights.dm deleted file mode 100644 index e23dbcc023f4..000000000000 --- a/code/game/machinery/bio-dome_floodlights.dm +++ /dev/null @@ -1,169 +0,0 @@ -/obj/structure/machinery/hydro_floodlight_switch - name = "Biodome Floodlight Switch" - icon = 'icons/obj/structures/machinery/power.dmi' - icon_state = "panelnopower" - desc = "This switch controls the floodlights surrounding the archaeology complex. It only functions when there is power." - density = FALSE - anchored = TRUE - var/ispowered = FALSE - var/turned_on = 0 //has to be toggled in engineering - use_power = USE_POWER_IDLE - unslashable = TRUE - unacidable = TRUE - var/list/floodlist = list() // This will save our list of floodlights on the map - -/obj/structure/machinery/hydro_floodlight_switch/Initialize(mapload, ...) - . = ..() - for(var/obj/structure/machinery/hydro_floodlight/F in GLOB.machines) - floodlist += F - F.fswitch = src - start_processing() - -/obj/structure/machinery/hydro_floodlight_switch/Destroy() - for(var/obj/structure/machinery/hydro_floodlight/floodlight as anything in floodlist) - floodlight.fswitch = null - floodlist = null - return ..() - - -/obj/structure/machinery/hydro_floodlight_switch/process() - var/lightpower = 0 - for(var/obj/structure/machinery/hydro_floodlight/H in floodlist) - if(!H.is_lit) - continue - lightpower += H.power_tick - use_power(lightpower) - -/obj/structure/machinery/hydro_floodlight_switch/update_icon() - if(!ispowered) - icon_state = "panelnopower" - else if(turned_on) - icon_state = "panelon" - else - icon_state = "paneloff" - -/obj/structure/machinery/hydro_floodlight_switch/power_change() - ..() - if((stat & NOPOWER)) - if(ispowered && turned_on) - toggle_lights() - ispowered = FALSE - turned_on = 0 - update_icon() - else - ispowered = TRUE - update_icon() - -/obj/structure/machinery/hydro_floodlight_switch/proc/toggle_lights() - for(var/obj/structure/machinery/hydro_floodlight/F in floodlist) - if(!istype(F) || QDELETED(F) || F.damaged) continue //Missing or damaged, skip it - - spawn(rand(0,50)) - if(F.is_lit) //Shut it down - F.set_light(0) - else - F.set_light(F.lum_value) - F.is_lit = !(F.is_lit) - F.update_icon() - return 0 - -/obj/structure/machinery/hydro_floodlight_switch/attack_hand(mob/user as mob) - if(!ishuman(user)) - to_chat(user, "Nice try.") - return 0 - if(!ispowered) - to_chat(user, "Nothing happens.") - return 0 - playsound(src,'sound/machines/click.ogg', 15, 1) - use_power(5) - toggle_lights() - turned_on = !(src.turned_on) - update_icon() - return 1 - -/obj/structure/machinery/hydro_floodlight - name = "Biodome Floodlight" - icon = 'icons/obj/structures/machinery/big_floodlight.dmi' - icon_state = "flood_s_off" - density = TRUE - anchored = TRUE - layer = WINDOW_LAYER - var/damaged = 0 //Can be smashed by xenos - var/is_lit = 0 - unslashable = TRUE - unacidable = TRUE - var/power_tick = 800 // power each floodlight takes up per process - use_power = USE_POWER_NONE //It's the switch that uses the actual power, not the lights - var/obj/structure/machinery/hydro_floodlight_switch/fswitch = null //Reverse lookup for power grabbing in area - var/lum_value = 7 - -/obj/structure/machinery/hydro_floodlight/Destroy() - if(fswitch?.floodlist) - fswitch.floodlist -= src - fswitch = null - return ..() - -/obj/structure/machinery/hydro_floodlight/update_icon() - if(damaged) - icon_state = "flood_s_dmg" - else if(is_lit) - icon_state = "flood_s_on" - else - icon_state = "flood_s_off" - -/obj/structure/machinery/hydro_floodlight/attackby(obj/item/W as obj, mob/user as mob) - var/obj/item/tool/weldingtool/WT = W - if(istype(WT)) - if(!damaged) return - if(!HAS_TRAIT(WT, TRAIT_TOOL_BLOWTORCH)) - to_chat(user, SPAN_WARNING("You need a stronger blowtorch!")) - return - if(WT.remove_fuel(0, user)) - playsound(src.loc, 'sound/items/weldingtool_weld.ogg', 25) - user.visible_message(SPAN_NOTICE("[user] starts welding [src]'s damage."), \ - SPAN_NOTICE("You start welding [src]'s damage.")) - if(do_after(user, 200 * user.get_skill_duration_multiplier(SKILL_ENGINEER), INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD)) - playsound(get_turf(src), 'sound/items/Welder2.ogg', 25, 1) - if(!src || !WT.isOn()) return - damaged = 0 - user.visible_message(SPAN_NOTICE("[user] finishes welding [src]'s damage."), \ - SPAN_NOTICE("You finish welding [src]'s damage.")) - if(is_lit) - set_light(lum_value) - update_icon() - return 1 - else - to_chat(user, SPAN_WARNING("You need more welding fuel to complete this task.")) - return 0 - ..() - return 0 - -/obj/structure/machinery/hydro_floodlight/attack_hand(mob/user as mob) - if(ishuman(user)) - to_chat(user, SPAN_WARNING("Nothing happens. Looks like it's powered elsewhere.")) - return 0 - else if(!is_lit) - to_chat(user, SPAN_WARNING("Why bother? It's just some weird metal thing.")) - return 0 - else - if(damaged) - to_chat(user, SPAN_WARNING("It's already damaged.")) - return 0 - else - if(islarva(user)) - return //Larvae can't do shit - if(user.get_active_hand()) - to_chat(user, SPAN_WARNING("You need your claws empty for this!")) - return FALSE - user.visible_message(SPAN_DANGER("[user] starts to slash and claw away at [src]!"), - SPAN_DANGER("You start slashing and clawing at [src]!")) - if(do_after(user, 50, INTERRUPT_ALL, BUSY_ICON_HOSTILE) && !damaged) //Not when it's already damaged. - if(!src) return 0 - damaged = 1 - set_light(0) - user.visible_message(SPAN_DANGER("[user] slashes up [src]!"), - SPAN_DANGER("You slash up [src]!")) - playsound(src, 'sound/weapons/blade1.ogg', 25, 1) - update_icon() - return 0 - ..() diff --git a/code/modules/vehicles/multitile/multitile_bump.dm b/code/modules/vehicles/multitile/multitile_bump.dm index 11005cc87ea2..2885f99ed1f7 100644 --- a/code/modules/vehicles/multitile/multitile_bump.dm +++ b/code/modules/vehicles/multitile/multitile_bump.dm @@ -437,14 +437,6 @@ qdel(src) return TRUE -/obj/structure/machinery/hydro_floodlight/handle_vehicle_bump(obj/vehicle/multitile/V) - if(V.vehicle_flags & VEHICLE_CLASS_WEAK) - return FALSE - playsound(V, 'sound/effects/metal_crash.ogg', 20) - visible_message(SPAN_DANGER("\The [V] crushes \the [src]!")) - qdel(src) - return TRUE - /obj/structure/machinery/floodlight/handle_vehicle_bump(obj/vehicle/multitile/V) if(V.vehicle_flags & VEHICLE_CLASS_WEAK) return FALSE diff --git a/colonialmarines.dme b/colonialmarines.dme index daafb41694f7..b414b4455ce3 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -842,7 +842,6 @@ #include "code\game\machinery\autolathe.dm" #include "code\game\machinery\autolathe_datums.dm" #include "code\game\machinery\Beacon.dm" -#include "code\game\machinery\bio-dome_floodlights.dm" #include "code\game\machinery\biohazard_lockdown.dm" #include "code\game\machinery\bioprinter.dm" #include "code\game\machinery\buttons.dm" diff --git a/maps/templates/baseone.dmm b/maps/templates/baseone.dmm index c054c2310164..80962bf165c5 100644 --- a/maps/templates/baseone.dmm +++ b/maps/templates/baseone.dmm @@ -504,7 +504,7 @@ /turf/open/floor/almayer/blue/north, /area/adminlevel/bunker01/hydroponics) "bD" = ( -/obj/structure/machinery/hydro_floodlight, +/obj/structure/machinery/colony_floodlight, /turf/open/floor/almayer/blue/northeast, /area/adminlevel/bunker01/hydroponics) "bE" = ( From e420ca3b19127828a7597f295ed48d90c28d0941 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Fri, 26 Jul 2024 17:10:28 +0200 Subject: [PATCH 5/5] eh --- maps/templates/basetwo.dmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maps/templates/basetwo.dmm b/maps/templates/basetwo.dmm index 890d433cb575..1051f515c96d 100644 --- a/maps/templates/basetwo.dmm +++ b/maps/templates/basetwo.dmm @@ -896,7 +896,7 @@ /turf/open/floor/almayer/blue/north, /area/adminlevel/bunker01/hydroponics) "df" = ( -/obj/structure/machinery/hydro_floodlight, +/obj/structure/machinery/colony_floodlight, /turf/open/floor/almayer/blue/northeast, /area/adminlevel/bunker01/hydroponics) "dg" = (