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 4706ab4920e471c5777036209d6525dd20fd13a4 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Fri, 26 Jul 2024 09:08:29 +0200 Subject: [PATCH 4/5] accid spray scortches --- code/game/objects/effects/aliens.dm | 6 +- .../abilities/ability_helper_procs.dm | 63 +++++++++---------- 2 files changed, 36 insertions(+), 33 deletions(-) diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm index 10d4e8d098fb..fde8c96088ed 100644 --- a/code/game/objects/effects/aliens.dm +++ b/code/game/objects/effects/aliens.dm @@ -125,6 +125,10 @@ var/obj/vehicle/multitile/V = atm V.handle_acidic_environment(src) continue + if (istype(loc, /turf/open)) + var/turf/open/scorch_turf_target = loc + if(scorch_turf_target.scorchable) + scorch_turf_target.scorch(damage_amount) START_PROCESSING(SSobj, src) addtimer(CALLBACK(src, PROC_REF(die)), time_to_live) @@ -148,7 +152,7 @@ ..() if(AM == cause_data.resolve_mob()) return - + if(isliving(AM)) var/mob/living/living_mob = AM if(living_mob.ally_of_hivenumber(hivenumber)) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm b/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm index 87657af5ce7a..d1c8bee9a644 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm @@ -21,9 +21,9 @@ var/wait_time = 10 - var/turf/T = get_turf(O) + var/turf/turf = get_turf(O) - for(var/obj/effect/xenomorph/acid/A in T) + for(var/obj/effect/xenomorph/acid/A in turf) if(acid_type == A.type && A.acid_t == O) to_chat(src, SPAN_WARNING("[A] is already drenched in acid.")) return @@ -47,22 +47,22 @@ to_chat(src, SPAN_WARNING("[O] is already weakened.")) return - var/dissolvability = T.can_be_dissolved() + var/dissolvability = turf.can_be_dissolved() switch(dissolvability) if(0) - to_chat(src, SPAN_WARNING("We cannot dissolve [T].")) + to_chat(src, SPAN_WARNING("We cannot dissolve [turf].")) return if(1) wait_time = 50 if(2) if(acid_type != /obj/effect/xenomorph/acid/strong) - to_chat(src, SPAN_WARNING("This [T.name] is too tough to be melted by our weak acid.")) + to_chat(src, SPAN_WARNING("This [turf.name] is too tough to be melted by our weak acid.")) return wait_time = 100 else return - if(istype(T, /turf/closed/wall)) - var/turf/closed/wall/W = T + if(istype(turf, /turf/closed/wall)) + var/turf/closed/wall/W = turf // Direction from wall to the mob generating acid on the wall turf var/ambiguous_dir_msg = SPAN_XENOWARNING("We are unsure which direction to melt through [W]. Face it directly and try again.") @@ -92,7 +92,7 @@ var/acided_hole_type = W.acided_hole_dir & (EAST|WEST) ? "a hole horizontally" : "a hole vertically" to_chat(src, SPAN_XENOWARNING("We begin generating enough acid to melt [acided_hole_type] through [W].")) else - to_chat(src, SPAN_XENOWARNING("We begin generating enough acid to melt through [T].")) + to_chat(src, SPAN_XENOWARNING("We begin generating enough acid to melt through [turf].")) else to_chat(src, SPAN_WARNING("You cannot dissolve [O].")) return @@ -101,7 +101,7 @@ return // AGAIN BECAUSE SOMETHING COULD'VE ACIDED THE PLACE - for(var/obj/effect/xenomorph/acid/A in T) + for(var/obj/effect/xenomorph/acid/A in turf) if(acid_type == A.type && A.acid_t == O) to_chat(src, SPAN_WARNING("[A] is already drenched in acid.")) return @@ -131,7 +131,7 @@ use_plasma(plasma_cost) - var/obj/effect/xenomorph/acid/A = new acid_type(T, O) + var/obj/effect/xenomorph/acid/A = new acid_type(turf, O) if(istype(O, /obj/vehicle/multitile)) var/obj/vehicle/multitile/R = O @@ -167,8 +167,8 @@ REMOVE_TRAIT(H, TRAIT_IMMOBILIZED, trait_source) if(ishuman(H)) - var/mob/living/carbon/human/T = H - T.update_xeno_hostile_hud() + var/mob/living/carbon/human/turf = H + turf.update_xeno_hostile_hud() to_chat(H, SPAN_XENOHIGHDANGER("We can move again!")) /mob/living/carbon/xenomorph/proc/zoom_in() @@ -215,28 +215,28 @@ action.on_zoom_out() return -/mob/living/carbon/xenomorph/proc/do_acid_spray_cone(turf/T, spray_type = /obj/effect/xenomorph/spray, range = 3) +/mob/living/carbon/xenomorph/proc/do_acid_spray_cone(turf/turf, spray_type = /obj/effect/xenomorph/spray, range = 3) set waitfor = FALSE - var/facing = get_cardinal_dir(src, T) + var/facing = get_cardinal_dir(src, turf) setDir(facing) - T = loc + turf = loc for(var/i in 0 to range - 1) - var/turf/next_turf = get_step(T, facing) + var/turf/next_turf = get_step(turf, facing) var/atom/movable/temp = new/obj/effect/xenomorph/spray() - var/atom/movable/AM = LinkBlocked(temp, T, next_turf) + var/atom/movable/AM = LinkBlocked(temp, turf, next_turf) qdel(temp) if(AM) AM.acid_spray_act(src) return - T = next_turf - var/obj/effect/xenomorph/spray/S = new spray_type(T, create_cause_data(initial( caste_type), src), hivenumber) - do_acid_spray_cone_normal(T, i, facing, S, spray_type) + turf = next_turf + var/obj/effect/xenomorph/spray/S = new spray_type(turf, create_cause_data(initial( caste_type), src), hivenumber) + do_acid_spray_cone_normal(turf, i, facing, S, spray_type) sleep(2) // Normal refers to the mathematical normal -/mob/living/carbon/xenomorph/proc/do_acid_spray_cone_normal(turf/T, distance, facing, obj/effect/xenomorph/spray/source_spray, spray_type = /obj/effect/xenomorph/spray) +/mob/living/carbon/xenomorph/proc/do_acid_spray_cone_normal(turf/turf, distance, facing, obj/effect/xenomorph/spray/source_spray, spray_type = /obj/effect/xenomorph/spray) if(!distance) return @@ -246,8 +246,8 @@ var/normal_dir = turn(facing, 90) var/inverse_normal_dir = turn(facing, -90) - var/turf/normal_turf = T - var/turf/inverse_normal_turf = T + var/turf/normal_turf = turf + var/turf/inverse_normal_turf = turf var/normal_density_flag = FALSE var/inverse_normal_density_flag = FALSE @@ -286,27 +286,26 @@ var/turf/prev_turf = loc var/distance = 0 - for(var/turf/T in turflist) + for(var/turf/turf in turflist) distance++ if(!prev_turf && length(turflist) > 1) prev_turf = get_turf(src) continue //So we don't burn the tile we be standin on - if(T.density || istype(T, /turf/open/space)) + if(turf.density || istype(turf, /turf/open/space)) break if(distance > distance_max) break - - var/atom/movable/temp = new spray_path() - var/atom/movable/AM = LinkBlocked(temp, prev_turf, T) + var/obj/effect/xenomorph/spray/temp = new spray_path() + var/atom/movable/blocker = LinkBlocked(temp, prev_turf, turf) qdel(temp) - if(AM) - AM.acid_spray_act(src) + if(blocker) + blocker.acid_spray_act(src) break - prev_turf = T - new spray_path(T, create_cause_data(initial(caste_type), src), hivenumber) + prev_turf = turf + new spray_path(turf, create_cause_data(initial(caste_type), src), hivenumber) sleep(2) From d9dcca15f1ef9b4d00a11d91f5770a8a0ad9604f Mon Sep 17 00:00:00 2001 From: vincibrv Date: Sun, 4 Aug 2024 18:06:03 +0200 Subject: [PATCH 5/5] changes var --- .../living/carbon/xenomorph/abilities/ability_helper_procs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm b/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm index d1c8bee9a644..7e9504260209 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm @@ -297,7 +297,7 @@ break if(distance > distance_max) break - var/obj/effect/xenomorph/spray/temp = new spray_path() + var/atom/movable/temp = new spray_path() var/atom/movable/blocker = LinkBlocked(temp, prev_turf, turf) qdel(temp) if(blocker)