mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 01:23:41 +01:00
Make lavaland bridges hover over rivers. (#27402)
* feat: Make lavaland bridges hover over rivers. * just use the normal AO as shadows * change return * kill reference to shadows
This commit is contained in:
committed by
GitHub
parent
0c5fb4198d
commit
db4dda0fdf
@@ -8,8 +8,6 @@ SUBSYSTEM_DEF(late_mapping)
|
||||
flags = SS_NO_FIRE
|
||||
/// List of all maze generators to process
|
||||
var/list/obj/effect/mazegen/generator/maze_generators = list()
|
||||
/// List of all bridge spawners to process
|
||||
var/list/obj/effect/spawner/bridge/bridge_spawners = list()
|
||||
|
||||
/datum/controller/subsystem/late_mapping/Initialize()
|
||||
// Sort all the air machines we initialized during mapload by name all at once
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
var/bridge_theme = LONG_BRIDGE_THEME_CULT
|
||||
var/list/forwards_backwards
|
||||
var/list/side_to_side
|
||||
var/turf/forward_goal
|
||||
var/turf/backward_goal
|
||||
|
||||
/obj/effect/spawner/dynamic_bridge/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -49,6 +51,8 @@
|
||||
forwards_backwards = list(NORTH, SOUTH)
|
||||
side_to_side = list(EAST, WEST)
|
||||
if(!attempt_bridge())
|
||||
forward_goal = null
|
||||
backward_goal = null
|
||||
forwards_backwards = list(EAST, WEST)
|
||||
side_to_side = list(NORTH, SOUTH)
|
||||
attempt_bridge()
|
||||
@@ -109,6 +113,49 @@
|
||||
|
||||
T.flags |= LAVA_BRIDGE
|
||||
|
||||
/obj/structure/bridge_walkway
|
||||
name = "floor"
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
anchored = TRUE
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
|
||||
/obj/structure/bridge_walkway/Destroy()
|
||||
var/turf/T = get_turf(src)
|
||||
if(T)
|
||||
T.layer = PLATING_LAYER
|
||||
T.clear_filters()
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/bridge_walkway/cult
|
||||
icon_state = "cult"
|
||||
|
||||
/obj/structure/bridge_walkway/hiero
|
||||
icon = 'icons/turf/floors/hierophant_floor.dmi'
|
||||
icon_state = "floor"
|
||||
|
||||
/obj/structure/bridge_walkway/clockwork
|
||||
name = "clockwork floor"
|
||||
icon_state = "clockwork_floor"
|
||||
|
||||
// Pretend to be a normal clockwork floor and duplicate its visual effect
|
||||
/obj/structure/bridge_walkway/clockwork/Crossed(atom/crosser, atom/old_loc)
|
||||
. = ..()
|
||||
var/counter = 0
|
||||
for(var/obj/effect/temp_visual/ratvar/floor/floor in contents)
|
||||
if(++counter == 3)
|
||||
return
|
||||
|
||||
if(!. && isliving(crosser))
|
||||
addtimer(CALLBACK(src, PROC_REF(spawn_visual)), 0.2 SECONDS, TIMER_DELETE_ME)
|
||||
|
||||
/obj/structure/bridge_walkway/clockwork/proc/spawn_visual()
|
||||
new /obj/effect/temp_visual/ratvar/floor(loc)
|
||||
|
||||
/obj/structure/bridge_walkway/wood
|
||||
icon_state = "wood"
|
||||
|
||||
/obj/effect/spawner/dynamic_bridge/proc/make_walkway(turf/T)
|
||||
for(var/obj/structure/spawner/S in T)
|
||||
qdel(S)
|
||||
@@ -119,14 +166,14 @@
|
||||
|
||||
switch(bridge_theme)
|
||||
if(LONG_BRIDGE_THEME_CULT)
|
||||
T.ChangeTurf(/turf/simulated/floor/engine/cult/lavaland_air)
|
||||
new /obj/structure/bridge_walkway/cult(T)
|
||||
if(LONG_BRIDGE_THEME_HIERO)
|
||||
T.ChangeTurf(/turf/simulated/floor/indestructible/hierophant)
|
||||
new /obj/structure/bridge_walkway/hiero(T)
|
||||
if(LONG_BRIDGE_THEME_CLOCKWORK)
|
||||
T.ChangeTurf(/turf/simulated/floor/clockwork/lavaland_air)
|
||||
new /obj/structure/bridge_walkway/clockwork(T)
|
||||
if(LONG_BRIDGE_THEME_STONE)
|
||||
// Stone tiles are different sizes and shapes so these are
|
||||
// "safe-looking" arrangements
|
||||
// "safe-looking" arrangements.
|
||||
switch(rand(1, 5))
|
||||
if(1)
|
||||
new /obj/structure/stone_tile/block(T)
|
||||
@@ -146,9 +193,9 @@
|
||||
var/obj/structure/stone_tile/block/B = new(T)
|
||||
B.dir = NORTH
|
||||
if(LONG_BRIDGE_THEME_WOOD)
|
||||
T.ChangeTurf(/turf/simulated/floor/wood/lavaland_air)
|
||||
var/obj/structure/bridge_walkway/wood/tile = new(T)
|
||||
if(prob(20))
|
||||
new /obj/effect/mapping_helpers/turfs/damage(T)
|
||||
tile.icon_state = pick("wood-broken", "wood-broken2", "wood-broken3", "wood-broken4", "wood-broken5", "wood-broken6", "wood-broken7")
|
||||
if(LONG_BRIDGE_THEME_CATWALK)
|
||||
new /obj/structure/lattice/catwalk/mining(T)
|
||||
|
||||
@@ -165,8 +212,6 @@
|
||||
var/walk_dir = forwards_backwards[1]
|
||||
var/turf/forward_step = get_turf(src)
|
||||
var/turf/backward_step = get_turf(src)
|
||||
var/turf/forward_goal
|
||||
var/turf/backward_goal
|
||||
var/bad_passage = FALSE
|
||||
|
||||
while(count <= max_length && !(forward_goal && backward_goal) && !bad_passage)
|
||||
|
||||
@@ -83,7 +83,11 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama
|
||||
|
||||
// Checks if there is foothold over the turf
|
||||
/turf/simulated/floor/proc/find_safeties()
|
||||
var/static/list/safeties_typecache = typecacheof(list(/obj/structure/lattice/catwalk, /obj/structure/stone_tile))
|
||||
var/static/list/safeties_typecache = typecacheof(list(
|
||||
/obj/structure/lattice/catwalk,
|
||||
/obj/structure/stone_tile,
|
||||
/obj/structure/bridge_walkway
|
||||
))
|
||||
var/list/found_safeties = typecache_filter_list(contents, safeties_typecache)
|
||||
return LAZYLEN(found_safeties)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user