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 2fce9c631a384423379b8be3077912700b94a8b0 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Tue, 16 Jul 2024 09:20:16 +0200 Subject: [PATCH 3/6] removed old fix it and renames few vars --- .../effects/effect_system/particle_effects.dm | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/code/game/objects/effects/effect_system/particle_effects.dm b/code/game/objects/effects/effect_system/particle_effects.dm index 972d242bf359..6d0f0fdc0383 100644 --- a/code/game/objects/effects/effect_system/particle_effects.dm +++ b/code/game/objects/effects/effect_system/particle_effects.dm @@ -8,10 +8,10 @@ mouse_opacity = MOUSE_OPACITY_TRANSPARENT unacidable = TRUE // So effect are not targeted by alien acid. -/obj/effect/particle_effect/initialize_pass_flags(datum/pass_flags_container/PF) +/obj/effect/particle_effect/initialize_pass_flags(datum/pass_flags_container/pass_flags) ..() - if (PF) - PF.flags_pass = PASS_OVER|PASS_AROUND|PASS_UNDER|PASS_THROUGH|PASS_MOB_THRU + if (pass_flags) + pass_flags.flags_pass = PASS_OVER|PASS_AROUND|PASS_UNDER|PASS_THROUGH|PASS_MOB_THRU //Water @@ -22,17 +22,13 @@ var/life = 15 mouse_opacity = MOUSE_OPACITY_TRANSPARENT -/obj/effect/particle_effect/water/initialize_pass_flags(datum/pass_flags_container/PF) +/obj/effect/particle_effect/water/initialize_pass_flags(datum/pass_flags_container/pass_flags) ..() - if (PF) - PF.flags_pass = PASS_THROUGH|PASS_OVER|PASS_MOB_THRU|PASS_UNDER + if (pass_flags) + pass_flags.flags_pass = PASS_THROUGH|PASS_OVER|PASS_MOB_THRU|PASS_UNDER /obj/effect/particle_effect/water/Move(turf/newloc) - //var/turf/T = src.loc - //if (istype(T, /turf)) - // T.firelevel = 0 //TODO: FIX - if (--src.life < 1) - //SN src = null + if (--life < 1) qdel(src) if(newloc.density) return 0 From e1277f2508e5df5d0d73a13ad87bdff3629dfd48 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Tue, 16 Jul 2024 09:26:28 +0200 Subject: [PATCH 4/6] eh --- 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 27719a3913f8991e5bea4565f72193aa7bd7b870 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Thu, 18 Jul 2024 17:53:45 +0200 Subject: [PATCH 5/6] I think this is it? --- code/game/objects/effects/effect_system/particle_effects.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/objects/effects/effect_system/particle_effects.dm b/code/game/objects/effects/effect_system/particle_effects.dm index 6d0f0fdc0383..efa6d49766f6 100644 --- a/code/game/objects/effects/effect_system/particle_effects.dm +++ b/code/game/objects/effects/effect_system/particle_effects.dm @@ -28,7 +28,8 @@ pass_flags.flags_pass = PASS_THROUGH|PASS_OVER|PASS_MOB_THRU|PASS_UNDER /obj/effect/particle_effect/water/Move(turf/newloc) - if (--life < 1) + life-- + if (life < 1) qdel(src) if(newloc.density) return 0 From 93c24be61eedab64d6889d12ed7109cd26b0362b Mon Sep 17 00:00:00 2001 From: vincibrv Date: Thu, 18 Jul 2024 17:55:55 +0200 Subject: [PATCH 6/6] is this it --- code/game/objects/effects/effect_system/particle_effects.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/effects/effect_system/particle_effects.dm b/code/game/objects/effects/effect_system/particle_effects.dm index efa6d49766f6..9440c16f2d4e 100644 --- a/code/game/objects/effects/effect_system/particle_effects.dm +++ b/code/game/objects/effects/effect_system/particle_effects.dm @@ -28,7 +28,7 @@ pass_flags.flags_pass = PASS_THROUGH|PASS_OVER|PASS_MOB_THRU|PASS_UNDER /obj/effect/particle_effect/water/Move(turf/newloc) - life-- + life -= 1 if (life < 1) qdel(src) if(newloc.density)