mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-30 03:06:54 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user