From a7c125f69401da50c0986eb9b629ae2f3812088e Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 19 Nov 2023 16:28:18 +0100 Subject: [PATCH] [MIRROR] Splits placeontop proc [MDB IGNORE] (#25103) * Splits placeontop proc (#79702) ## About The Pull Request I find the proc hard to read honestly. There's no reason we can't split this into two functions - the secondary functionality is used only once, in reader.dmm. ## Why It's Good For The Game Code improvement Glorious snake case ## Changelog N/A nothing player facing --------- Co-authored-by: san7890 <34697715+san7890@ users.noreply.github.com> * Splits placeontop proc * Update brass_spreader.dm --------- Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com> Co-authored-by: san7890 <34697715+san7890@ users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> --- code/datums/components/trapdoor.dm | 2 +- code/datums/elements/movement_turf_changer.dm | 2 +- .../machinery/computer/arcade/orion_event.dm | 2 +- code/game/machinery/deployable.dm | 2 +- .../fluid_spread/effects_foam.dm | 4 +- code/game/objects/items/stacks/stack.dm | 2 +- .../objects/items/stacks/tiles/tile_types.dm | 2 +- code/game/objects/structures/false_walls.dm | 4 +- code/game/objects/structures/girders.dm | 16 ++--- code/game/objects/structures/lattice.dm | 2 +- code/game/turfs/baseturfs.dm | 68 ++++++++----------- code/game/turfs/open/_open.dm | 4 +- code/game/turfs/open/chasm.dm | 2 +- code/game/turfs/open/floor.dm | 2 +- code/game/turfs/open/floor/plating.dm | 4 +- code/game/turfs/open/lava.dm | 2 +- code/game/turfs/open/misc.dm | 2 +- code/game/turfs/open/openspace.dm | 6 +- code/game/turfs/open/space/space.dm | 6 +- .../antagonists/cult/cult_structure_pylon.dm | 2 +- .../heretic/magic/rust_construction.dm | 2 +- code/modules/buildmode/submodes/basic.dm | 8 +-- code/modules/cargo/supplypod.dm | 2 +- .../ruins/lavalandruin_code/puzzle.dm | 4 +- code/modules/mapping/mapping_helpers.dm | 4 +- code/modules/mapping/reader.dm | 2 +- .../mob/living/simple_animal/bot/floorbot.dm | 12 ++-- .../chemistry/reagents/other_reagents.dm | 2 +- .../spells/spell_types/conjure/_conjure.dm | 2 +- code/modules/unit_tests/baseturfs.dm | 2 +- .../mecha/equipment/tools/work_tools.dm | 4 +- .../code/components/brass_spreader.dm | 2 +- 32 files changed, 85 insertions(+), 97 deletions(-) diff --git a/code/datums/components/trapdoor.dm b/code/datums/components/trapdoor.dm index 0fca7b2c5f5..48ccdcd9e62 100644 --- a/code/datums/components/trapdoor.dm +++ b/code/datums/components/trapdoor.dm @@ -372,7 +372,7 @@ in_use = FALSE if(!isopenspaceturf(target_turf)) // second check to make sure nothing changed during constructions return - var/turf/new_turf = target_turf.PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) + var/turf/new_turf = target_turf.place_on_top(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) new_turf.AddComponent(/datum/component/trapdoor, starts_open = FALSE, conspicuous = TRUE) balloon_alert(user, "trapdoor constructed") qdel(src) diff --git a/code/datums/elements/movement_turf_changer.dm b/code/datums/elements/movement_turf_changer.dm index c42ef287f81..4f60257d510 100644 --- a/code/datums/elements/movement_turf_changer.dm +++ b/code/datums/elements/movement_turf_changer.dm @@ -29,4 +29,4 @@ if(!isturf(destination) || istype(destination, turf_type) || isgroundlessturf(destination)) return - destination.PlaceOnTop(turf_type) + destination.place_on_top(turf_type) diff --git a/code/game/machinery/computer/arcade/orion_event.dm b/code/game/machinery/computer/arcade/orion_event.dm index 97590059a52..f1050e9a8e2 100644 --- a/code/game/machinery/computer/arcade/orion_event.dm +++ b/code/game/machinery/computer/arcade/orion_event.dm @@ -172,7 +172,7 @@ game.say("A new floor suddenly appears around [game]. What the hell?") playsound(game, 'sound/weapons/genhit.ogg', 100, TRUE) for(var/turf/open/space/fixed in orange(1, game)) - fixed.PlaceOnTop(/turf/open/floor/plating) + fixed.place_on_top(/turf/open/floor/plating) #define BUTTON_EXPLORE_SHIP "Explore Ship" #define BUTTON_LEAVE_THE_DERELICT "Leave the Derelict" diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index 79ec5e1861a..6f08275d95e 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -80,7 +80,7 @@ if(do_after(user, 50, target=src)) W.use(5) var/turf/T = get_turf(src) - T.PlaceOnTop(/turf/closed/wall/mineral/wood/nonmetal) + T.place_on_top(/turf/closed/wall/mineral/wood/nonmetal) qdel(src) return return ..() diff --git a/code/game/objects/effects/effect_system/fluid_spread/effects_foam.dm b/code/game/objects/effects/effect_system/fluid_spread/effects_foam.dm index 73e95ab48cd..9a13e68c1b1 100644 --- a/code/game/objects/effects/effect_system/fluid_spread/effects_foam.dm +++ b/code/game/objects/effects/effect_system/fluid_spread/effects_foam.dm @@ -361,7 +361,7 @@ return to_chat(user, span_notice("You add the plating.")) var/turf/T = get_turf(src) - T.PlaceOnTop(/turf/closed/wall/metal_foam_base) + T.place_on_top(/turf/closed/wall/metal_foam_base) transfer_fingerprints_to(T) qdel(src) return @@ -393,7 +393,7 @@ /obj/effect/particle_effect/fluid/foam/metal/smart/make_result() //Smart foam adheres to area borders for walls var/turf/open/location = loc if(isspaceturf(location)) - location.PlaceOnTop(/turf/open/floor/plating/foam) + location.place_on_top(/turf/open/floor/plating/foam) for(var/cardinal in GLOB.cardinals) var/turf/cardinal_turf = get_step(location, cardinal) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 7f789eaa514..d31dc5caea6 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -421,7 +421,7 @@ var/turf/covered_turf = builder.drop_location() if(!isturf(covered_turf)) return - var/turf/created_turf = covered_turf.PlaceOnTop(recipe.result_type, flags = CHANGETURF_INHERIT_AIR) + var/turf/created_turf = covered_turf.place_on_top(recipe.result_type, flags = CHANGETURF_INHERIT_AIR) builder.balloon_alert(builder, "placed [ispath(recipe.result_type, /turf/open) ? "floor" : "wall"]") if(recipe.applies_mats && LAZYLEN(mats_per_unit)) created_turf.set_custom_materials(mats_per_unit, recipe.req_amount / recipe.res_amount) diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index ef19367d42a..67b260dcf09 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -81,7 +81,7 @@ if(!replace_plating) if(!use(1)) return - target_plating = target_plating.PlaceOnTop(placed_turf_path, flags = CHANGETURF_INHERIT_AIR) + target_plating = target_plating.place_on_top(placed_turf_path, flags = CHANGETURF_INHERIT_AIR) target_plating.setDir(turf_dir) playsound(target_plating, 'sound/weapons/genhit.ogg', 50, TRUE) return target_plating // Most executions should end here. diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index 8cb4b487c67..4f7b12e5303 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -79,7 +79,7 @@ /obj/structure/falsewall/proc/ChangeToWall(delete = 1) var/turf/T = get_turf(src) - T.PlaceOnTop(walltype) + T.place_on_top(walltype) if(delete) qdel(src) return T @@ -406,7 +406,7 @@ /obj/structure/falsewall/material/ChangeToWall(delete = 1) var/turf/current_turf = get_turf(src) - var/turf/closed/wall/material/new_wall = current_turf.PlaceOnTop(/turf/closed/wall/material) + var/turf/closed/wall/material/new_wall = current_turf.place_on_top(/turf/closed/wall/material) new_wall.set_custom_materials(custom_materials) if(delete) qdel(src) diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 7b697368578..29381e2fe9e 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -99,7 +99,7 @@ return rod.use(amount) var/turf/T = get_turf(src) - T.PlaceOnTop(/turf/closed/wall/mineral/iron) + T.place_on_top(/turf/closed/wall/mineral/iron) transfer_fingerprints_to(T) qdel(src) return @@ -149,7 +149,7 @@ return sheets.use(amount) var/turf/T = get_turf(src) - T.PlaceOnTop(/turf/closed/wall) + T.place_on_top(/turf/closed/wall) transfer_fingerprints_to(T) qdel(src) return @@ -194,7 +194,7 @@ return sheets.use(amount) var/turf/T = get_turf(src) - T.PlaceOnTop(/turf/closed/wall/r_wall) + T.place_on_top(/turf/closed/wall/r_wall) transfer_fingerprints_to(T) qdel(src) return @@ -270,9 +270,9 @@ sheets.use(amount) var/turf/T = get_turf(src) if(sheets.walltype) - T.PlaceOnTop(sheets.walltype) + T.place_on_top(sheets.walltype) else - var/turf/newturf = T.PlaceOnTop(/turf/closed/wall/material) + var/turf/newturf = T.place_on_top(/turf/closed/wall/material) var/list/material_list = list() material_list[GET_MATERIAL_REF(sheets.material_type)] = SHEET_MATERIAL_AMOUNT * 2 if(material_list) @@ -452,7 +452,7 @@ return R.use(amount) var/turf/T = get_turf(src) - T.PlaceOnTop(/turf/closed/wall/mineral/cult) + T.place_on_top(/turf/closed/wall/mineral/cult) qdel(src) else @@ -487,7 +487,7 @@ return FALSE var/turf/T = get_turf(src) - T.PlaceOnTop(/turf/closed/wall) + T.place_on_top(/turf/closed/wall) qdel(src) return TRUE if(RCD_DECONSTRUCT) @@ -524,7 +524,7 @@ return B.use(amount) var/turf/T = get_turf(src) - T.PlaceOnTop(/turf/closed/wall/mineral/bronze) + T.place_on_top(/turf/closed/wall/mineral/bronze) qdel(src) else diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index f6d5b933494..e5eabc5defa 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -73,7 +73,7 @@ if(design_structure == /turf/open/floor/plating) var/turf/T = src.loc if(isgroundlessturf(T)) - T.PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) + T.place_on_top(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) qdel(src) return TRUE if(design_structure == /obj/structure/lattice/catwalk) diff --git a/code/game/turfs/baseturfs.dm b/code/game/turfs/baseturfs.dm index 91e66b1a4d0..ad016b63447 100644 --- a/code/game/turfs/baseturfs.dm +++ b/code/game/turfs/baseturfs.dm @@ -27,54 +27,42 @@ src ) -// Make a new turf and put it on top -// The args behave identical to PlaceOnBottom except they go on top -// Things placed on top of closed turfs will ignore the topmost closed turf -// Returns the new turf -/turf/proc/PlaceOnTop(list/new_baseturfs, turf/fake_turf_type, flags) - var/area/turf_area = loc - if(new_baseturfs && !length(new_baseturfs)) - new_baseturfs = list(new_baseturfs) - flags = turf_area.PlaceOnTopReact(new_baseturfs, fake_turf_type, flags) // A hook so areas can modify the incoming args +/// Places a turf at the top of the stack +/turf/proc/place_on_top(turf/added_layer, flags) + var/list/turf/new_baseturfs = list() + + new_baseturfs.Add(baseturfs) + if(isopenturf(src)) + new_baseturfs.Add(type) + + return ChangeTurf(added_layer, new_baseturfs, flags) + +/// Places a turf on top - for map loading +/turf/proc/load_on_top(turf/added_layer, flags) + var/area/our_area = get_area(src) + flags = our_area.PlaceOnTopReact(list(baseturfs), added_layer, flags) - var/turf/newT if(flags & CHANGETURF_SKIP) // We haven't been initialized if(flags_1 & INITIALIZED_1) stack_trace("CHANGETURF_SKIP was used in a PlaceOnTop call for a turf that's initialized. This is a mistake. [src]([type])") assemble_baseturfs() - if(fake_turf_type) - if(!new_baseturfs) // If no baseturfs list then we want to create one from the turf type - if(!length(baseturfs)) - baseturfs = list(baseturfs) - var/list/old_baseturfs = baseturfs.Copy() - if(!isclosedturf(src)) - old_baseturfs += type - newT = ChangeTurf(fake_turf_type, null, flags) - newT.assemble_baseturfs(initial(fake_turf_type.baseturfs)) // The baseturfs list is created like roundstart - if(!length(newT.baseturfs)) - newT.baseturfs = list(baseturfs) - // The old baseturfs are put underneath, and we sort out the unwanted ones - newT.baseturfs = baseturfs_string_list(old_baseturfs + (newT.baseturfs - GLOB.blacklisted_automated_baseturfs), newT) - return newT - if(!length(baseturfs)) - baseturfs = list(baseturfs) - if(!isclosedturf(src)) - new_baseturfs = list(type) + new_baseturfs - baseturfs = baseturfs_string_list(baseturfs + new_baseturfs, src) - return ChangeTurf(fake_turf_type, null, flags) + + var/turf/new_turf if(!length(baseturfs)) baseturfs = list(baseturfs) + + var/list/old_baseturfs = baseturfs.Copy() if(!isclosedturf(src)) - baseturfs = baseturfs_string_list(baseturfs + type, src) - var/turf/change_type - if(length(new_baseturfs)) - change_type = new_baseturfs[new_baseturfs.len] - new_baseturfs.len-- - if(new_baseturfs.len) - baseturfs = baseturfs_string_list(baseturfs + new_baseturfs, src) - else - change_type = new_baseturfs - return ChangeTurf(change_type, null, flags) + old_baseturfs += type + + new_turf = ChangeTurf(added_layer, null, flags) + new_turf.assemble_baseturfs(initial(added_layer.baseturfs)) // The baseturfs list is created like roundstart + if(!length(new_turf.baseturfs)) + new_turf.baseturfs = list(baseturfs) + + // The old baseturfs are put underneath, and we sort out the unwanted ones + new_turf.baseturfs = baseturfs_string_list(old_baseturfs + (new_turf.baseturfs - GLOB.blacklisted_automated_baseturfs), new_turf) + return new_turf // Copy an existing turf and put it on top // Returns the new turf diff --git a/code/game/turfs/open/_open.dm b/code/game/turfs/open/_open.dm index 8480b19940c..657d94d5c5f 100644 --- a/code/game/turfs/open/_open.dm +++ b/code/game/turfs/open/_open.dm @@ -90,7 +90,7 @@ */ /turf/open/proc/replace_floor(turf/open/new_floor_path, flags) if (!overfloor_placed && initial(new_floor_path.overfloor_placed)) - PlaceOnTop(new_floor_path, flags = flags) + place_on_top(new_floor_path, flags = flags) return ChangeTurf(new_floor_path, flags = flags) @@ -408,7 +408,7 @@ return playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE) - var/turf/open/floor/plating/new_plating = PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) + var/turf/open/floor/plating/new_plating = place_on_top(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) if(lattice) qdel(lattice) else diff --git a/code/game/turfs/open/chasm.dm b/code/game/turfs/open/chasm.dm index f4094c35b36..48ab1ceca38 100644 --- a/code/game/turfs/open/chasm.dm +++ b/code/game/turfs/open/chasm.dm @@ -42,7 +42,7 @@ /turf/open/chasm/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, list/rcd_data) if(rcd_data["[RCD_DESIGN_MODE]"] == RCD_TURF && rcd_data["[RCD_DESIGN_PATH]"] == /turf/open/floor/plating/rcd) - PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) + place_on_top(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) return TRUE return FALSE diff --git a/code/game/turfs/open/floor.dm b/code/game/turfs/open/floor.dm index a5e5c2c1beb..84d8cab4859 100644 --- a/code/game/turfs/open/floor.dm +++ b/code/game/turfs/open/floor.dm @@ -274,7 +274,7 @@ if(girder) return girder.rcd_act(user, the_rcd, rcd_data) - PlaceOnTop(/turf/closed/wall) + place_on_top(/turf/closed/wall) return TRUE if(RCD_WINDOWGRILLE) //check if we are building a window diff --git a/code/game/turfs/open/floor/plating.dm b/code/game/turfs/open/floor/plating.dm index a38338010d4..8b483cad262 100644 --- a/code/game/turfs/open/floor/plating.dm +++ b/code/game/turfs/open/floor/plating.dm @@ -64,7 +64,7 @@ to_chat(user, span_notice("You begin reinforcing the floor...")) if(do_after(user, 30, target = src)) if (R.get_amount() >= 2 && !istype(src, /turf/open/floor/engine)) - PlaceOnTop(/turf/open/floor/engine, flags = CHANGETURF_INHERIT_AIR) + place_on_top(/turf/open/floor/engine, flags = CHANGETURF_INHERIT_AIR) playsound(src, 'sound/items/deconstruct.ogg', 80, TRUE) R.use(2) to_chat(user, span_notice("You reinforce the floor.")) @@ -100,7 +100,7 @@ return sheets.use(PLATE_REINFORCE_COST) playsound(src, 'sound/machines/creak.ogg', 100, vary = TRUE) - PlaceOnTop(/turf/open/floor/plating/reinforced) + place_on_top(/turf/open/floor/plating/reinforced) else if(!iscyborg(user)) balloon_alert(user, "too damaged, use a welding tool!") diff --git a/code/game/turfs/open/lava.dm b/code/game/turfs/open/lava.dm index ebcfd4d3843..567aa8710c7 100644 --- a/code/game/turfs/open/lava.dm +++ b/code/game/turfs/open/lava.dm @@ -160,7 +160,7 @@ /turf/open/lava/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, list/rcd_data) if(rcd_data["[RCD_DESIGN_MODE]"] == RCD_TURF && rcd_data["[RCD_DESIGN_PATH]"] == /turf/open/floor/plating/rcd) - PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) + place_on_top(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) return TRUE return FALSE diff --git a/code/game/turfs/open/misc.dm b/code/game/turfs/open/misc.dm index edf9e92c8a9..6459a29e99b 100644 --- a/code/game/turfs/open/misc.dm +++ b/code/game/turfs/open/misc.dm @@ -144,7 +144,7 @@ if(girder) return girder.rcd_act(user, the_rcd, rcd_data) - PlaceOnTop(/turf/closed/wall) + place_on_top(/turf/closed/wall) return TRUE if(RCD_WINDOWGRILLE) //check if we are building a window diff --git a/code/game/turfs/open/openspace.dm b/code/game/turfs/open/openspace.dm index bd74acab440..f6a9dd8b77d 100644 --- a/code/game/turfs/open/openspace.dm +++ b/code/game/turfs/open/openspace.dm @@ -145,7 +145,7 @@ /turf/open/openspace/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, list/rcd_data) if(rcd_data["[RCD_DESIGN_MODE]"] == RCD_TURF && rcd_data["[RCD_DESIGN_PATH]"] == /turf/open/floor/plating/rcd) - PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) + place_on_top(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) return TRUE return FALSE @@ -163,8 +163,8 @@ ChangeTurf(new_floor_path, flags = flags) return // Create plating under tiled floor we try to create directly onto the air - PlaceOnTop(/turf/open/floor/plating, flags = flags) - PlaceOnTop(new_floor_path, flags = flags) + place_on_top(/turf/open/floor/plating, flags = flags) + place_on_top(new_floor_path, flags = flags) /turf/open/openspace/can_cross_safely(atom/movable/crossing) return HAS_TRAIT(crossing, TRAIT_MOVE_FLYING) diff --git a/code/game/turfs/open/space/space.dm b/code/game/turfs/open/space/space.dm index 049309c262b..d404870e1c8 100644 --- a/code/game/turfs/open/space/space.dm +++ b/code/game/turfs/open/space/space.dm @@ -229,7 +229,7 @@ GLOBAL_LIST_EMPTY(starlight) /turf/open/space/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, list/rcd_data) if(the_rcd.mode == RCD_TURF) if(rcd_data["[RCD_DESIGN_PATH]"] == /turf/open/floor/plating/rcd) - PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) + place_on_top(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) return TRUE else if(rcd_data["[RCD_DESIGN_PATH]"] == /obj/structure/lattice/catwalk) var/obj/structure/lattice/lattice = locate(/obj/structure/lattice, src) @@ -346,5 +346,5 @@ GLOBAL_LIST_EMPTY(starlight) ChangeTurf(new_floor_path, flags = flags) return // Create plating under tiled floor we try to create directly onto space - PlaceOnTop(/turf/open/floor/plating, flags = flags) - PlaceOnTop(new_floor_path, flags = flags) + place_on_top(/turf/open/floor/plating, flags = flags) + place_on_top(new_floor_path, flags = flags) diff --git a/code/modules/antagonists/cult/cult_structure_pylon.dm b/code/modules/antagonists/cult/cult_structure_pylon.dm index 280df3ee09d..7900aaad120 100644 --- a/code/modules/antagonists/cult/cult_structure_pylon.dm +++ b/code/modules/antagonists/cult/cult_structure_pylon.dm @@ -60,7 +60,7 @@ if(length(validturfs)) var/turf/converted_turf = pick(validturfs) if(isplatingturf(converted_turf)) - converted_turf.PlaceOnTop(/turf/open/floor/engine/cult, flags = CHANGETURF_INHERIT_AIR) + converted_turf.place_on_top(/turf/open/floor/engine/cult, flags = CHANGETURF_INHERIT_AIR) else converted_turf.ChangeTurf(/turf/open/floor/engine/cult, flags = CHANGETURF_INHERIT_AIR) diff --git a/code/modules/antagonists/heretic/magic/rust_construction.dm b/code/modules/antagonists/heretic/magic/rust_construction.dm index 08973093da0..130e3e06be2 100644 --- a/code/modules/antagonists/heretic/magic/rust_construction.dm +++ b/code/modules/antagonists/heretic/magic/rust_construction.dm @@ -46,7 +46,7 @@ /datum/action/cooldown/spell/pointed/rust_construction/cast(turf/open/cast_on) . = ..() var/rises_message = "rises out of [cast_on]" - var/turf/closed/wall/new_wall = cast_on.PlaceOnTop(/turf/closed/wall) + var/turf/closed/wall/new_wall = cast_on.place_on_top(/turf/closed/wall) if(!istype(new_wall)) return diff --git a/code/modules/buildmode/submodes/basic.dm b/code/modules/buildmode/submodes/basic.dm index a584dace3fd..a37c6becfa1 100644 --- a/code/modules/buildmode/submodes/basic.dm +++ b/code/modules/buildmode/submodes/basic.dm @@ -22,13 +22,13 @@ if(istype(object,/turf) && left_click && !alt_click && !ctrl_click) var/turf/clicked_turf = object if(isplatingturf(object)) - clicked_turf.PlaceOnTop(/turf/open/floor/iron, flags = CHANGETURF_INHERIT_AIR) + clicked_turf.place_on_top(/turf/open/floor/iron, flags = CHANGETURF_INHERIT_AIR) else if(isfloorturf(object)) - clicked_turf.PlaceOnTop(/turf/closed/wall) + clicked_turf.place_on_top(/turf/closed/wall) else if(iswallturf(object)) - clicked_turf.PlaceOnTop(/turf/closed/wall/r_wall) + clicked_turf.place_on_top(/turf/closed/wall/r_wall) else - clicked_turf.PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) // Gotta do something + clicked_turf.place_on_top(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) // Gotta do something log_admin("Build Mode: [key_name(c)] built [clicked_turf] at [AREACOORD(clicked_turf)]") return else if(right_click) diff --git a/code/modules/cargo/supplypod.dm b/code/modules/cargo/supplypod.dm index ed75e634967..503effd258f 100644 --- a/code/modules/cargo/supplypod.dm +++ b/code/modules/cargo/supplypod.dm @@ -319,7 +319,7 @@ if (openingSound) playsound(get_turf(holder), openingSound, soundVolume, FALSE, FALSE) //Special admin sound to play for (var/turf_type in turfs_in_cargo) - turf_underneath.PlaceOnTop(turf_type) + turf_underneath.place_on_top(turf_type) for (var/cargo in holder.contents) var/atom/movable/movable_cargo = cargo movable_cargo.forceMove(turf_underneath) diff --git a/code/modules/mapfluff/ruins/lavalandruin_code/puzzle.dm b/code/modules/mapfluff/ruins/lavalandruin_code/puzzle.dm index 0e5437b9fd4..1ec15d01345 100644 --- a/code/modules/mapfluff/ruins/lavalandruin_code/puzzle.dm +++ b/code/modules/mapfluff/ruins/lavalandruin_code/puzzle.dm @@ -173,7 +173,7 @@ //Setup random empty tile empty_tile_id = pick_n_take(left_ids) var/turf/empty_tile_turf = get_turf_for_id(empty_tile_id) - empty_tile_turf.PlaceOnTop(floor_type,null,CHANGETURF_INHERIT_AIR) + empty_tile_turf.place_on_top(floor_type, CHANGETURF_INHERIT_AIR) var/mutable_appearance/MA = new(puzzle_pieces["[empty_tile_id]"]) MA.layer = empty_tile_turf.layer + 0.1 empty_tile_turf.add_overlay(MA) @@ -182,7 +182,7 @@ var/list/empty_spots = left_ids.Copy() for(var/spot_id in empty_spots) var/turf/T = get_turf_for_id(spot_id) - T = T.PlaceOnTop(floor_type,null,CHANGETURF_INHERIT_AIR) + T = T.place_on_top(floor_type, CHANGETURF_INHERIT_AIR) var/obj/structure/puzzle_element/E = new element_type(T) elements += E var/chosen_id = pick_n_take(left_ids) diff --git a/code/modules/mapping/mapping_helpers.dm b/code/modules/mapping/mapping_helpers.dm index 7f759acd13b..cf3835e247a 100644 --- a/code/modules/mapping/mapping_helpers.dm +++ b/code/modules/mapping/mapping_helpers.dm @@ -153,11 +153,11 @@ if(1 to 9) var/turf/here = get_turf(src) for(var/turf/closed/T in range(2, src)) - here.PlaceOnTop(T.type) + here.place_on_top(T.type) qdel(airlock) qdel(src) return - here.PlaceOnTop(/turf/closed/wall) + here.place_on_top(/turf/closed/wall) qdel(airlock) qdel(src) return diff --git a/code/modules/mapping/reader.dm b/code/modules/mapping/reader.dm index 14a8fdf6b94..ec2d2806a93 100644 --- a/code/modules/mapping/reader.dm +++ b/code/modules/mapping/reader.dm @@ -950,7 +950,7 @@ GLOBAL_LIST_EMPTY(map_model_default) // Note: we make the assertion that the last path WILL be a turf. if it isn't, this will fail. if(placeOnTop) - instance = crds.PlaceOnTop(null, members[index], CHANGETURF_DEFER_CHANGE | (no_changeturf ? CHANGETURF_SKIP : NONE)) + instance = crds.load_on_top(members[index], CHANGETURF_DEFER_CHANGE | (no_changeturf ? CHANGETURF_SKIP : NONE)) else if(no_changeturf) instance = create_atom(members[index], crds)//first preloader pass else diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index 17e918f0795..2884b0a0486 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -329,15 +329,15 @@ if(do_after(src, 50, target = target_turf) && mode == BOT_REPAIRING) if(autotile) //Build the floor and include a tile. if(replacetiles && tilestack) - target_turf.PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) //make sure a hull is actually below the floor tile + target_turf.place_on_top(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) //make sure a hull is actually below the floor tile tilestack.place_tile(target_turf, src) if(!tilestack) speak("Requesting refill of custom floor tiles to continue replacing.") else - target_turf.PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) //make sure a hull is actually below the floor tile - target_turf.PlaceOnTop(/turf/open/floor/iron, flags = CHANGETURF_INHERIT_AIR) + target_turf.place_on_top(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) //make sure a hull is actually below the floor tile + target_turf.place_on_top(/turf/open/floor/iron, flags = CHANGETURF_INHERIT_AIR) else //Build a hull plating without a floor tile. - target_turf.PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) + target_turf.place_on_top(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) else var/turf/open/floor/F = target_turf @@ -370,10 +370,10 @@ F.burnt = FALSE F.update_appearance() else if(istype(is_this_maints, /area/station/maintenance)) //place catwalk if it's plating and we're in maints - F.PlaceOnTop(/turf/open/floor/catwalk_floor, flags = CHANGETURF_INHERIT_AIR) + F.place_on_top(/turf/open/floor/catwalk_floor, flags = CHANGETURF_INHERIT_AIR) else //place normal tile if it's plating anywhere else F = F.make_plating(TRUE) || F - F.PlaceOnTop(/turf/open/floor/iron, flags = CHANGETURF_INHERIT_AIR) + F.place_on_top(/turf/open/floor/iron, flags = CHANGETURF_INHERIT_AIR) if(!QDELETED(src)) go_idle() diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index de662e8905e..1e8582112a3 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1874,7 +1874,7 @@ /datum/reagent/carpet/expose_turf(turf/exposed_turf, reac_volume) if(isopenturf(exposed_turf) && exposed_turf.turf_flags & IS_SOLID && !istype(exposed_turf, /turf/open/floor/carpet)) - exposed_turf.PlaceOnTop(carpet_type, flags = CHANGETURF_INHERIT_AIR) + exposed_turf.place_on_top(carpet_type, flags = CHANGETURF_INHERIT_AIR) ..() /datum/reagent/carpet/black diff --git a/code/modules/spells/spell_types/conjure/_conjure.dm b/code/modules/spells/spell_types/conjure/_conjure.dm index 5fcff10ee18..10b14bd47d5 100644 --- a/code/modules/spells/spell_types/conjure/_conjure.dm +++ b/code/modules/spells/spell_types/conjure/_conjure.dm @@ -44,7 +44,7 @@ if (spawn_place.overfloor_placed) spawn_place.ChangeTurf(summoned_object_type, flags = CHANGETURF_INHERIT_AIR) else - spawn_place.PlaceOnTop(summoned_object_type, flags = CHANGETURF_INHERIT_AIR) + spawn_place.place_on_top(summoned_object_type, flags = CHANGETURF_INHERIT_AIR) return var/turf/open/open_turf = spawn_place open_turf.replace_floor(summoned_object_type, flags = CHANGETURF_INHERIT_AIR) diff --git a/code/modules/unit_tests/baseturfs.dm b/code/modules/unit_tests/baseturfs.dm index 9bc561deeeb..3150aac342f 100644 --- a/code/modules/unit_tests/baseturfs.dm +++ b/code/modules/unit_tests/baseturfs.dm @@ -34,7 +34,7 @@ // Do this instead of just ChangeTurf to guarantee that baseturfs is completely default on-init behavior RESET_TO_EXPECTED(run_loc_floor_bottom_left) - run_loc_floor_bottom_left.PlaceOnTop(/turf/closed/wall/rock) + run_loc_floor_bottom_left.place_on_top(/turf/closed/wall/rock) TEST_ASSERT_EQUAL(run_loc_floor_bottom_left.type, /turf/closed/wall/rock, "Rock wall should've been placed on top") run_loc_floor_bottom_left.ScrapeAway() diff --git a/code/modules/vehicles/mecha/equipment/tools/work_tools.dm b/code/modules/vehicles/mecha/equipment/tools/work_tools.dm index 45e96b9700d..9b45713f17f 100644 --- a/code/modules/vehicles/mecha/equipment/tools/work_tools.dm +++ b/code/modules/vehicles/mecha/equipment/tools/work_tools.dm @@ -306,13 +306,13 @@ to_chat(source, "[icon2html(src, source)][span_notice("Building Wall...")]") if(!do_after_cooldown(floor_turf, source)) return - floor_turf.PlaceOnTop(/turf/closed/wall) + floor_turf.place_on_top(/turf/closed/wall) else if(isopenturf(target)) var/turf/open/open_turf = target to_chat(source, "[icon2html(src, source)][span_notice("Building Floor...")]") if(!do_after_cooldown(open_turf, source)) return - open_turf.PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) + open_turf.place_on_top(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR) if(MODE_AIRLOCK) if(isfloorturf(target)) to_chat(source, "[icon2html(src, source)][span_notice("Building Airlock...")]") diff --git a/modular_skyrat/modules/clock_cult/code/components/brass_spreader.dm b/modular_skyrat/modules/clock_cult/code/components/brass_spreader.dm index 911d420d85f..98027573178 100644 --- a/modular_skyrat/modules/clock_cult/code/components/brass_spreader.dm +++ b/modular_skyrat/modules/clock_cult/code/components/brass_spreader.dm @@ -52,7 +52,7 @@ var/turf/converted_turf = pick(valid_turfs) if(isplatingturf(converted_turf)) - converted_turf.PlaceOnTop(/turf/open/floor/bronze, flags = CHANGETURF_INHERIT_AIR) + converted_turf.place_on_top(/turf/open/floor/bronze, flags = CHANGETURF_INHERIT_AIR) new /obj/effect/temp_visual/ratvar/floor(converted_turf) else if(isopenturf(converted_turf))