From 5e62d20d5a92d7e7fead78ea94f47ecf6b254bec Mon Sep 17 00:00:00 2001 From: "FunnyMan3595 (Charlie Nolan)" Date: Wed, 15 Jan 2025 18:50:03 +0000 Subject: [PATCH 1/2] Re-buff immovable rods --- code/modules/events/immovable_rod.dm | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/code/modules/events/immovable_rod.dm b/code/modules/events/immovable_rod.dm index 63e2a1f78567..d35c22ad6649 100644 --- a/code/modules/events/immovable_rod.dm +++ b/code/modules/events/immovable_rod.dm @@ -32,6 +32,10 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 var/move_delay = 1 var/atom/start var/atom/end + /// The minimum amount of damage dealt to walls, relative to their max HP. + var/wall_damage_min_fraction = 0.9 + /// The maximum amount of damage dealt to walls, relative to their max HP. Values over 1 are useful for adjusting the probability of destroying the wall. + var/wall_damage_max_fraction = 1.4 /obj/effect/immovablerod/New(atom/_start, atom/_end, delay) . = ..() @@ -84,6 +88,9 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 audible_message("CLANG") clong_turf(newloc) + if(isnull(newloc)) + // The turf is dead, long live the turf! + newloc = loc for(var/atom/victim as anything in newloc) clong_thing(victim) @@ -93,7 +100,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 if(iswallturf(victim)) var/turf/simulated/wall/W = victim - W.take_damage(rand(W.damage_cap / 3, W.damage_cap * 4 / 3)) + W.take_damage(rand(W.damage_cap * wall_damage_min_fraction, W.damage_cap * wall_damage_max_fraction)) else victim.ex_act(EXPLODE_LIGHT) @@ -111,9 +118,13 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 victim.ex_act(EXPLODE_HEAVY) /obj/effect/immovablerod/event + wall_damage_min_fraction = 0.33 + wall_damage_max_fraction = 1.33 // The base chance to "damage" the floor when passing. This is not guaranteed to cause a full on hull breach. - // Chance to expose the tile to space is like 15% of this value. + // Chance to expose the tile to space is like 60% of this value. var/floor_rip_chance = 40 + // Chance to damage the floor if we didn't rip it. + var/floor_graze_chance = 50 /obj/effect/immovablerod/event/Move() . = ..() @@ -124,13 +135,10 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 if(!isfloorturf(victim)) return ..() - if(!prob(floor_rip_chance)) - return - var/turf/simulated/floor/T = victim - if(prob(25)) + if(prob(floor_rip_chance)) T.ex_act(EXPLODE_HEAVY) - else + else if(prob(floor_graze_chance)) T.ex_act(EXPLODE_LIGHT) /obj/effect/immovablerod/deadchat_plays(mode = DEADCHAT_DEMOCRACY_MODE, cooldown = 6 SECONDS) From 4fc3c4e02694b9558d2af9d130c47dc9dd5fa826 Mon Sep 17 00:00:00 2001 From: "FunnyMan3595 (Charlie Nolan)" Date: Wed, 15 Jan 2025 19:29:12 +0000 Subject: [PATCH 2/2] More deadly collisions. --- code/modules/events/immovable_rod.dm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/code/modules/events/immovable_rod.dm b/code/modules/events/immovable_rod.dm index d35c22ad6649..9bc6779e62dd 100644 --- a/code/modules/events/immovable_rod.dm +++ b/code/modules/events/immovable_rod.dm @@ -91,8 +91,17 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 if(isnull(newloc)) // The turf is dead, long live the turf! newloc = loc - for(var/atom/victim as anything in newloc) - clong_thing(victim) + + while(TRUE) + var/hit_something_dense = FALSE + for(var/atom/victim as anything in newloc) + clong_thing(victim) + if(victim.density) + hit_something_dense = TRUE + + // Keep hitting stuff until there's nothing dense or we randomly go through it. + if(!hit_something_dense || prob(25)) + break /obj/effect/immovablerod/proc/clong_turf(turf/victim) if(!victim.density)