From 92f2015d0e6cd3fd943320b1f5b547ed6812c356 Mon Sep 17 00:00:00 2001 From: farie82 Date: Sat, 11 Apr 2020 05:18:08 +0200 Subject: [PATCH] Fixes a few runtimes (#13230) * Fixes a few runtimes * Fixes 2 turf related runtimes * Return TRUE --- code/game/machinery/camera/camera.dm | 8 ++------ code/game/objects/items/tools/welder.dm | 3 ++- code/game/turfs/simulated/floor/plating.dm | 2 +- code/game/turfs/simulated/walls.dm | 3 ++- code/game/turfs/simulated/walls_misc.dm | 1 + code/game/turfs/turf.dm | 6 ++++++ code/modules/mob/living/carbon/carbon.dm | 7 +------ 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 5bc32a0172e..24ffb494422 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -34,9 +34,8 @@ var/in_use_lights = 0 // TO BE IMPLEMENTED var/toggle_sound = 'sound/items/wirecutter.ogg' - -/obj/machinery/camera/New() - ..() +/obj/machinery/camera/Initialize() + . = ..() wires = new(src) assembly = new(src) assembly.state = 4 @@ -45,9 +44,6 @@ GLOB.cameranet.cameras += src GLOB.cameranet.addCamera(src) - -/obj/machinery/camera/Initialize() - ..() if(is_station_level(z) && prob(3) && !start_active) toggle_cam(null, FALSE) wires.CutAll() diff --git a/code/game/objects/items/tools/welder.dm b/code/game/objects/items/tools/welder.dm index b002ed32205..270a44ee559 100644 --- a/code/game/objects/items/tools/welder.dm +++ b/code/game/objects/items/tools/welder.dm @@ -50,7 +50,8 @@ /obj/item/weldingtool/process() var/turf/T = get_turf(src) - T.hotspot_expose(2500, 5) + if(T) // Implants for instance won't find a turf + T.hotspot_expose(2500, 5) if(prob(5)) remove_fuel(1) ..() diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 332786e291c..588a8387474 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -104,7 +104,7 @@ broken = FALSE update_icon() -/turf/simulated/floor/plating/proc/remove_plating(mob/user) +/turf/simulated/floor/plating/remove_plating(mob/user) if(baseturf == /turf/space) ReplaceWithLattice() else diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 078a1b8e513..c18acf19d0a 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -139,7 +139,7 @@ P.setAngle(new_angle_s) return TRUE -/turf/simulated/wall/proc/dismantle_wall(devastated = 0, explode = 0) +/turf/simulated/wall/dismantle_wall(devastated = FALSE, explode = FALSE) if(devastated) devastate_wall() else @@ -156,6 +156,7 @@ O.forceMove(src) ChangeTurf(/turf/simulated/floor/plating) + return TRUE /turf/simulated/wall/proc/break_wall() new sheet_type(src, sheet_amount) diff --git a/code/game/turfs/simulated/walls_misc.dm b/code/game/turfs/simulated/walls_misc.dm index e43ea15f53f..d2d7f8386ee 100644 --- a/code/game/turfs/simulated/walls_misc.dm +++ b/code/game/turfs/simulated/walls_misc.dm @@ -109,6 +109,7 @@ P.roll_and_drop(src) else O.forceMove(src) + return TRUE /turf/simulated/wall/clockwork/devastate_wall() for(var/i in 1 to 2) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index a6b2a53d386..aa3f7b898a1 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -180,6 +180,9 @@ if(L) qdel(L) +/turf/proc/dismantle_wall(devastated = FALSE, explode = FALSE) + return + /turf/proc/TerraformTurf(path, defer_change = FALSE, keep_icon = TRUE, ignore_air = FALSE) return ChangeTurf(path, defer_change, keep_icon, ignore_air) @@ -292,6 +295,9 @@ ChangeTurf(baseturf) new /obj/structure/lattice(locate(x, y, z)) +/turf/proc/remove_plating(mob/user) + return + /turf/proc/kill_creatures(mob/U = null)//Will kill people/creatures and damage mechs./N //Useful to batch-add creatures to the list. for(var/mob/living/M in src) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 980a9b72c52..c4cd95eeb83 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -432,13 +432,8 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven if(!vent_found) for(var/obj/machinery/atmospherics/machine in range(1,src)) - if(is_type_in_list(machine, GLOB.ventcrawl_machinery)) + if(is_type_in_list(machine, GLOB.ventcrawl_machinery) && machine.can_crawl_through()) vent_found = machine - - if(!vent_found.can_crawl_through()) - vent_found = null - - if(vent_found) break if(vent_found)