Underfloor refactor + Mild codebase cleanup (#6518)

refactors deprecated and old level / hide system to a more orchestrated
and slightly more efficient one
This commit is contained in:
silicons
2024-06-20 17:09:48 -06:00
committed by GitHub
parent 624552b357
commit 83bc9a7ebf
101 changed files with 641 additions and 1384 deletions
+1 -10
View File
@@ -169,19 +169,10 @@ FLOOR SAFES
name = "floor safe"
icon_state = "floorsafe"
density = 0
level = 1 //underfloor
plane = TURF_PLANE
layer = BELOW_TURF_LAYER
hides_underfloor = OBJ_UNDERFLOOR_UNLESS_CREATED_ONTOP
/obj/structure/safe/floor/Initialize(mapload)
. = ..()
var/turf/T = loc
if(istype(T) && !T.is_plating())
hide(1)
update_icon()
/obj/structure/safe/floor/hide(var/intact)
invisibility = intact ? 101 : 0
/obj/structure/safe/floor/hides_under_flooring()
return 1
@@ -14,8 +14,6 @@
var/exit_delay = 2
var/enter_delay = 1
level = 2
// alldirs in global.dm is the same list of directions, but since
// the specific order matters to get a usable icon_state, it is
// copied here so that, in the unlikely case that alldirs is changed,
@@ -30,7 +28,6 @@
//A variant that will can be hidden underneath tiles similiar to pipes and such
/obj/structure/transit_tube/hidden
level = 1
plane = TURF_PLANE
layer = BELOW_TURF_LAYER
@@ -83,8 +80,6 @@
if(tube_dirs == null)
init_dirs()
var/turf/T = loc
if(level == 1 && !T.is_plating()) hide(1)
update_icon()
/obj/structure/transit_tube/Bumped(mob/AM as mob|obj)