Blockwise mazes

This commit is contained in:
AffectedArc07
2021-01-24 19:03:53 +00:00
parent 1f96eeec75
commit 55612c43f7
8 changed files with 203 additions and 44 deletions
@@ -1,12 +1,14 @@
/obj/effect/mazegen/module_helper
name = "maze helper"
desc = "You should not be seeing this!"
/**
* Helper handler proc
*
* This exists as an overridable method so you can do custom helper logic.
* An example of this is removing all windows on a tile.
*
* Arguments:
* * blockwise - This will be TRUE if the maze this is running on is a blockwise maze
*/
/obj/effect/mazegen/module_helper/proc/helper_run()
/obj/effect/mazegen/module_helper/proc/helper_run(blockwise = FALSE, obj/effect/mazegen/host)
CRASH("spawn_loot() not overriden for [type]")
@@ -2,8 +2,12 @@
/obj/effect/mazegen/module_helper/entry_exit
name = "entrance/exit allocator"
/obj/effect/mazegen/module_helper/entry_exit/helper_run()
for(var/obj/structure/window/reinforced/mazeglass/MG in get_turf(src))
qdel(MG)
/obj/effect/mazegen/module_helper/entry_exit/helper_run(blockwise = FALSE, obj/effect/mazegen/host)
if(blockwise)
var/turf/T = get_turf(src)
var/obj/effect/mazegen/generator/blockwise/BWG = host
T.ChangeTurf(BWG.floor_material)
else
for(var/obj/structure/window/reinforced/mazeglass/MG in get_turf(src))
qdel(MG)
qdel(src)