From 60134ea8aef3f8d189eae4f65dab094de1f7d928 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Wed, 25 Dec 2019 03:34:42 +0100 Subject: [PATCH] [s] Fixes singularity pulls duping rods out of engine floors. --- code/game/turfs/simulated/floor.dm | 32 ++++++++----------- .../game/turfs/simulated/floor/fancy_floor.dm | 2 +- .../game/turfs/simulated/floor/reinf_floor.dm | 12 ++++--- 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 194014b61a..f335846f06 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -177,7 +177,7 @@ I.play_tool_sound(src, 80) return remove_tile(user, silent) -/turf/open/floor/proc/remove_tile(mob/user, silent = FALSE, make_tile = TRUE) +/turf/open/floor/proc/remove_tile(mob/user, silent = FALSE, make_tile = TRUE, forced = FALSE) if(broken || burnt) broken = 0 burnt = 0 @@ -191,24 +191,20 @@ return make_plating() /turf/open/floor/singularity_pull(S, current_size) - ..() - if(current_size == STAGE_THREE) - if(prob(30)) + . = ..() + switch(current_size) + if(STAGE_THREE) + if(floor_tile && prob(30)) + remove_tile() + if(STAGE_FOUR) + if(floor_tile && prob(50)) + remove_tile() + if(STAGE_FIVE to INFINITY) if(floor_tile) - new floor_tile(src) - make_plating() - else if(current_size == STAGE_FOUR) - if(prob(50)) - if(floor_tile) - new floor_tile(src) - make_plating() - else if(current_size >= STAGE_FIVE) - if(floor_tile) - if(prob(70)) - new floor_tile(src) - make_plating() - else if(prob(50)) - ReplaceWithLattice() + if(prob(70)) + remove_tile() + else if(prob(50)) + ReplaceWithLattice() /turf/open/floor/narsie_act(force, ignore_mobs, probability = 20) . = ..() diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm index 82f1a88253..f38a8a3d9b 100644 --- a/code/game/turfs/simulated/floor/fancy_floor.dm +++ b/code/game/turfs/simulated/floor/fancy_floor.dm @@ -44,7 +44,7 @@ C.play_tool_sound(src, 80) return remove_tile(user, silent, (C.tool_behaviour == TOOL_SCREWDRIVER)) -/turf/open/floor/wood/remove_tile(mob/user, silent = FALSE, make_tile = TRUE) +/turf/open/floor/wood/remove_tile(mob/user, silent = FALSE, make_tile = TRUE, forced = FALSE) if(broken || burnt) broken = 0 burnt = 0 diff --git a/code/game/turfs/simulated/floor/reinf_floor.dm b/code/game/turfs/simulated/floor/reinf_floor.dm index b04f89f8be..09625968f8 100644 --- a/code/game/turfs/simulated/floor/reinf_floor.dm +++ b/code/game/turfs/simulated/floor/reinf_floor.dm @@ -76,14 +76,16 @@ /turf/open/floor/engine/singularity_pull(S, current_size) ..() - if(current_size >= STAGE_FIVE) + if(current_size >= STAGE_FIVE && prob(30)) if(floor_tile) - if(prob(30)) - new floor_tile(src) - make_plating() - else if(prob(30)) + remove_tile(forced = TRUE) + else ReplaceWithLattice() +/turf/open/floor/engine/remove_tile(mob/user, silent = FALSE, make_tile = TRUE, forced = FALSE) + if(forced) + return ..() + /turf/open/floor/engine/attack_paw(mob/user) return attack_hand(user)