Skip to content

Commit

Permalink
Ports glass floors & catwalk tiles (#9558)
Browse files Browse the repository at this point in the history
* tgstation/tgstation#50831

* https://github.com/tgstation/tgstation/pull/54250/files

* https://github.com/tgstation/tgstation/pull/62890/files

* tgstation/tgstation#67449

* inhands

* fixtest

* test 2

* layers

* moving

* it just works!

* 1

* l

* i

* initial commit

* un-replace

* 515

* z-mimic

* tra

* convert

* empty file

* do tile reskinning first

* conversion

* glass floor placing

* adds catwalk flooring

* recipe

* bugfix

* fix overlays

* REVAMP

* fix turf transparency?

* examination

* fix compile

* missingicons

* lighting, plasmaglass recipe

* meta mapp'd

* converting it over to materials

* now accounting for base turf; +special halved starlight: starfloor

* floria's rad and echo

* fix error

* glass tiling for box / delta

* Kilo glass floors

* couple extra meta windows

* remove unused defines

* Pgn icons and fixes

* fixes wrong tiling addressing and adjust icons

* and of course, forgot to save the last file

* meta-catwalkening

* miscelaneous map adjustments

* push

* FINAL - fland

---------

Co-authored-by: HowToLoLu <[email protected]>
Co-authored-by: BriggsIDP <[email protected]>
Co-authored-by: spockye <[email protected]>
Co-authored-by: PigeonVerde322 <[email protected]>
  • Loading branch information
5 people authored Jun 29, 2024
1 parent 4d0f513 commit 6ebd1bb
Show file tree
Hide file tree
Showing 46 changed files with 8,999 additions and 8,689 deletions.
628 changes: 319 additions & 309 deletions _maps/map_files/BoxStation/BoxStation.dmm

Large diffs are not rendered by default.

743 changes: 370 additions & 373 deletions _maps/map_files/Deltastation/DeltaStation2.dmm

Large diffs are not rendered by default.

2,037 changes: 1,021 additions & 1,016 deletions _maps/map_files/EchoStation/EchoStation.dmm

Large diffs are not rendered by default.

3,344 changes: 1,630 additions & 1,714 deletions _maps/map_files/FlandStation/FlandStation.dmm

Large diffs are not rendered by default.

419 changes: 229 additions & 190 deletions _maps/map_files/KiloStation/KiloStation.dmm

Large diffs are not rendered by default.

3,939 changes: 2,098 additions & 1,841 deletions _maps/map_files/MetaStation/MetaStation.dmm

Large diffs are not rendered by default.

6,005 changes: 2,826 additions & 3,179 deletions _maps/map_files/RadStation/RadStation.dmm

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions beestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1675,8 +1675,10 @@
#include "code\game\turfs\open\reebe_void.dm"
#include "code\game\turfs\open\river.dm"
#include "code\game\turfs\open\water.dm"
#include "code\game\turfs\open\floor\catwalk_plating.dm"
#include "code\game\turfs\open\floor\dock_floor.dm"
#include "code\game\turfs\open\floor\fancy_floor.dm"
#include "code\game\turfs\open\floor\glass.dm"
#include "code\game\turfs\open\floor\iron_floor.dm"
#include "code\game\turfs\open\floor\light_floor.dm"
#include "code\game\turfs\open\floor\mineral_floor.dm"
Expand Down
17 changes: 12 additions & 5 deletions code/__DEFINES/dcs/signals/signals_turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@
// All signals send the source datum of the signal as the first argument

// /turf signals
#define COMSIG_TURF_CHANGE "turf_change" //! from base of turf/ChangeTurf(): (path, list/new_baseturfs, flags, list/transferring_comps)
#define COMSIG_TURF_HAS_GRAVITY "turf_has_gravity" //! from base of atom/has_gravity(): (atom/asker, list/forced_gravities)
#define COMSIG_TURF_MULTIZ_NEW "turf_multiz_new" //! from base of turf/New(): (turf/source, direction)
#define COMSIG_TURF_AFTER_SHUTTLE_MOVE "turf_after_shuttle_move" //! from base of turf/proc/afterShuttleMove: (turf/new_turf)
#define COMSIG_TURF_RESERVATION_RELEASED "turf_reservation_released"//! from base of /datum/turf_reservation/proc/Release: (datum/turf_reservation/reservation)

#define COMSIG_TURF_CHANGE "turf_change"
///from base of atom/has_gravity(): (atom/asker, list/forced_gravities)
#define COMSIG_TURF_HAS_GRAVITY "turf_has_gravity"
///from base of turf/multiz_turf_del(): (turf/source, direction)
#define COMSIG_TURF_MULTIZ_DEL "turf_multiz_del"
///from base of turf/multiz_turf_new: (turf/source, direction)
#define COMSIG_TURF_MULTIZ_NEW "turf_multiz_new"
/// from base of turf/proc/afterShuttleMove: (turf/new_turf)
#define COMSIG_TURF_AFTER_SHUTTLE_MOVE "turf_after_shuttle_move"
/// from base of /datum/turf_reservation/proc/Release: (datum/turf_reservation/reservation)
#define COMSIG_TURF_RESERVATION_RELEASED "turf_reservation_released"
9 changes: 8 additions & 1 deletion code/__DEFINES/footsteps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define FOOTSTEP_WATER "water"
#define FOOTSTEP_LAVA "lava"
#define FOOTSTEP_MEAT "meat"
#define FOOTSTEP_CATWALK "catwalk"
//barefoot sounds
#define FOOTSTEP_WOOD_BAREFOOT "woodbarefoot"
#define FOOTSTEP_WOOD_CLAW "woodclaw"
Expand Down Expand Up @@ -83,7 +84,13 @@ GLOBAL_LIST_INIT(footstep, list(
'sound/effects/footstep/lava2.ogg',
'sound/effects/footstep/lava3.ogg'), 100, 0),
FOOTSTEP_MEAT = list(list(
'sound/effects/meatslap.ogg'), 100, 0)
'sound/effects/meatslap.ogg'), 100, 0),
FOOTSTEP_CATWALK = list(list(
'sound/effects/footstep/catwalk1.ogg',
'sound/effects/footstep/catwalk2.ogg',
'sound/effects/footstep/catwalk3.ogg',
'sound/effects/footstep/catwalk4.ogg',
'sound/effects/footstep/catwalk5.ogg'), 100, 1),
))
//bare footsteps lists
GLOBAL_LIST_INIT(barefootstep, list(
Expand Down
3 changes: 1 addition & 2 deletions code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(

#define isplatingturf(A) (istype(A, /turf/open/floor/plating))

// Temporary, but the code needs a way to differentiate if transparent turfs are added in the future.
#define istransparentturf(A) (istype(A, /turf/open/openspace))
#define istransparentturf(A) (TURF_IS_MIMICKING(A))

#define isopenspace(A) (istype(A, /turf/open/openspace))

Expand Down
5 changes: 4 additions & 1 deletion code/__DEFINES/layers.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//Defines for atom layers and planes
//KEEP THESE IN A NICE ACSCENDING ORDER, PLEASE

//NEVER HAVE ANYTHING BELOW THIS PLANE ADJUST IF YOU NEED MORE SPACE
#define LOWEST_EVER_PLANE -200

Expand Down Expand Up @@ -41,13 +42,15 @@
#define WIRE_LAYER 2.4
#define WIRE_TERMINAL_LAYER 2.45
#define UNDER_CATWALK 2.454
#define CATWALK_LAYER 2.455
#define CATWALK_LATTICE 2.455
#define GAS_SCRUBBER_LAYER 2.46
#define GAS_PIPE_VISIBLE_LAYER 2.47
#define GAS_FILTER_LAYER 2.48
#define GAS_PUMP_LAYER 2.49
#define PRESSURE_PLATE_LAYER 2.49
#define LOW_OBJ_LAYER 2.5
///catwalk overlay of /turf/open/floor/plating/catwalk_floor
#define CATWALK_LAYER 2.51
#define LOW_SIGIL_LAYER 2.52
#define SIGIL_LAYER 2.54
#define HIGH_SIGIL_LAYER 2.56
Expand Down
7 changes: 7 additions & 0 deletions code/__DEFINES/lighting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ GLOBAL_DATUM_INIT(starlight_overlay, /image, create_starlight_overlay())
lighting_effect.appearance = /obj/effect/fullbright/starlight
return lighting_effect

GLOBAL_DATUM_INIT(starfloor_overlay, /image, create_starfloor_overlay())

/proc/create_starfloor_overlay()
var/image/lighting_effect = new()
lighting_effect.appearance = /obj/effect/fullbright/starlight/starfloor
return lighting_effect

/// Innate lum source that cannot be removed
#define LUM_SOURCE_INNATE (1 << 4)
/// Luminosity source for glasses
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai

/// this object has been frozen
#define TRAIT_FROZEN "frozen"
///Turf trait for when a turf is transparent
#define TURF_Z_TRANSPARENT_TRAIT "turf_z_transparent"

// common trait sources
#define TRAIT_GENERIC "generic"
Expand Down Expand Up @@ -394,6 +396,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define CURSE_TRAIT "eldritch"
#define STATION_TRAIT "station-trait"
#define TRAIT_RUSTY "rust_trait"
#define TURF_TRAIT "turf"

// unique trait sources, still defines
#define CLONING_POD_TRAIT "cloning-pod"
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/turfs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#define IS_OPAQUE_TURF(turf) (turf.directional_opacity == ALL_CARDINALS)

#define READ_BASETURF(T) (islist(T.baseturfs) ? T.baseturfs[length(T.baseturfs)] : T.baseturfs)

//supposedly the fastest way to do this according to https://gist.github.com/Giacom/be635398926bb463b42a
///Returns a list of turf in a square
#define RANGE_TURFS(RADIUS, CENTER) \
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/zmimic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ GLOBAL_LIST_INIT(z_defines, list(
#define ZMM_AUTOMANGLE (1 << 4) //! Behaves the same as ZMM_MANGLE_PLANES, but is automatically applied by SSoverlays. Do not manually use.

// convenience flags
// This is intended for use on dev-defined openspace turfs, don't put _OVERWRITE in here unless you feel like having people ask why their zturfs are empty
#define Z_MIMIC_DEFAULTS (Z_MIMIC_BELOW) //! Common defaults for zturfs.
#define ZMM_WIDE_LOAD (ZMM_LOOKAHEAD | ZMM_LOOKBESIDE) //! Atom is big and needs to scan one extra turf in both X and Y. This only extends the range by one turf. Cheap, but not free.

/*
Expand Down
3 changes: 3 additions & 0 deletions code/_globalvars/turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ GLOBAL_LIST_INIT(default_turf_burn, list("damaged1", "damaged2", "damaged3", "da
GLOBAL_LIST_INIT(wood_turf_damage, list("damaged_wood1", "damaged_wood2"))
GLOBAL_LIST_INIT(wood_big_turf_damage, list("damaged_woodbig1", "damaged_woodbig2"))

GLOBAL_LIST_INIT(glass_turf_damage, list("glass-damaged1", "glass-damaged2", "glass-damaged3"))
GLOBAL_LIST_INIT(reinfglass_turf_damage, list("reinf_glass-damaged1", "reinf_glass-damaged2", "reinf_glass-damaged3"))

GLOBAL_LIST_INIT(turf_texture_hallway, list(/datum/turf_texture/hallway))
GLOBAL_LIST_INIT(turf_texture_maint, list(/datum/turf_texture/maint, /datum/turf_texture/hallway, /datum/turf_texture/maint/tile))

Expand Down
1 change: 1 addition & 0 deletions code/_onclick/hud/rendering/plane_master_controller.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ INITIALIZE_IMMEDIATE(/atom/movable/plane_master_controller)
. = ..()
if(!istype(hud))
return

owner_hud = hud
var/assoc_controlled_planes = list()
for(var/i in controlled_planes)
Expand Down
2 changes: 0 additions & 2 deletions code/controllers/subsystem/zcopy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#define SHADOWER_DARKENING_FACTOR 0.8
/// The above, but as an RGB string for lighting-less turfs.
#define SHADOWER_DARKENING_COLOR "#CCCCCC"
#define READ_BASETURF(T) (islist(T.baseturfs) ? T.baseturfs[length(T.baseturfs)] : T.baseturfs)

SUBSYSTEM_DEF(zcopy)
name = "Z-Copy"
Expand Down Expand Up @@ -789,4 +788,3 @@ SUBSYSTEM_DEF(zcopy)
out += "<em>No atoms.</em>"

#undef FMT_DEPTH
#undef READ_BASETURF
16 changes: 14 additions & 2 deletions code/datums/materials/_material.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ Simple datum which is instanced once per type and is used for every object of sa
if(material_flags & MATERIAL_ADD_PREFIX)
source.name = "[name] [source.name]"

//if(beauty_modifier)
// source.AddElement(/datum/element/beauty, beauty_modifier * amount)

if(istype(source, /obj)) //objs
on_applied_obj(source, amount, material_flags)

Expand Down Expand Up @@ -132,6 +135,12 @@ Simple datum which is instanced once per type and is used for every object of sa
O.barefootstep = turf_sound_override
O.clawfootstep = turf_sound_override
O.heavyfootstep = turf_sound_override
if(alpha < 255) //We can see through you, so we want to see stuff happening below you. Either space, or multi-z
T.enable_zmimic()
if(isspaceturf(T.baseturfs[1]))
T.fullbright_type = FULLBRIGHT_STARLIGHT
T.luminosity = 2

return

/datum/material/proc/get_greyscale_config_for(datum/greyscale_config/config_path)
Expand Down Expand Up @@ -181,7 +190,11 @@ Simple datum which is instanced once per type and is used for every object of sa
)

/datum/material/proc/on_removed_turf(turf/T, material_flags)
return
if(alpha < 255)
T.disable_zmimic()
if(ispath(READ_BASETURF(T), /turf/open/space))
T.fullbright_type = FULLBRIGHT_DEFAULT
T.luminosity = 1

/**
* This proc is called when the mat is found in an item that's consumed by accident. see /obj/item/proc/on_accidental_consumption.
Expand All @@ -192,7 +205,6 @@ Simple datum which is instanced once per type and is used for every object of sa
/datum/material/proc/on_accidental_mat_consumption(mob/living/carbon/M, obj/item/S)
return FALSE


/// Returns GLOB.recipes of a material to modify the recipes.
/// This will be only called once from SSMaterials.
/datum/material/proc/get_material_recipes()
Expand Down
4 changes: 4 additions & 0 deletions code/game/objects/effects/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
plane = STARLIGHT_PLANE
transform = matrix(2, 0, 0, 0, 2, 0)

/obj/effect/fullbright/starlight/starfloor
icon_state = "grey"
transform = matrix(1.5, 0, 0, 0, 1.5, 0)

/obj/effect/abstract/marker
name = "marker"
icon = 'icons/effects/effects.dmi'
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items/stacks/rods/rods_recipes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
new/datum/stack_recipe("scooter frame", /obj/item/scooter_frame, 10, one_per_turf = FALSE, time = 2.5 SECONDS), \
new/datum/stack_recipe("linen bin", /obj/structure/bedsheetbin/empty, 2, one_per_turf = FALSE, time = 0.5 SECONDS), \
new/datum/stack_recipe("railing", /obj/structure/railing, 3, window_checks = TRUE, time = 1.8 SECONDS), \
new/datum/stack_recipe("catwalk floor tile", /obj/item/stack/tile/catwalk_tile, 1, 4, 20), \
))

/obj/item/stack/rods/cyborg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
GLOBAL_LIST_INIT(glass_recipes, list ( \
new/datum/stack_recipe("glass shard", /obj/item/shard, on_floor = FALSE), \
new/datum/stack_recipe("directional window", /obj/structure/window/unanchored, on_floor = TRUE, window_checks = TRUE), \
new/datum/stack_recipe("fulltile window", /obj/structure/window/fulltile/unanchored, 2, on_floor = TRUE, window_checks = TRUE) \
new/datum/stack_recipe("fulltile window", /obj/structure/window/fulltile/unanchored, 2, on_floor = TRUE, window_checks = TRUE), \
new/datum/stack_recipe("glass tile", /obj/item/stack/tile/glass, 1, 4, 20) \
))

STACKSIZE_MACRO(/obj/item/stack/sheet/glass)
Expand All @@ -13,6 +14,7 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
null, \
new/datum/stack_recipe("directional reinforced window", /obj/structure/window/reinforced/unanchored, on_floor = TRUE, window_checks = TRUE), \
new/datum/stack_recipe("fulltile reinforced window", /obj/structure/window/reinforced/fulltile/unanchored, 2, on_floor = TRUE, window_checks = TRUE), \
new/datum/stack_recipe("reinforced glass tile", /obj/item/stack/tile/rglass, 1, 4, 20), \
new/datum/stack_recipe("window firelock frame", /obj/structure/firelock_frame/window, 2, one_per_turf = TRUE, on_floor = TRUE, window_checks = FALSE, time = 5 SECONDS) \
))

Expand All @@ -21,7 +23,8 @@ STACKSIZE_MACRO(/obj/item/stack/sheet/rglass)
/* plasma glass */
GLOBAL_LIST_INIT(pglass_recipes, list ( \
new/datum/stack_recipe("directional window", /obj/structure/window/plasma/unanchored, on_floor = TRUE, window_checks = TRUE), \
new/datum/stack_recipe("fulltile window", /obj/structure/window/plasma/fulltile/unanchored, 2, on_floor = TRUE, window_checks = TRUE) \
new/datum/stack_recipe("fulltile window", /obj/structure/window/plasma/fulltile/unanchored, 2, on_floor = TRUE, window_checks = TRUE), \
new/datum/stack_recipe("plasma glass tile", /obj/item/stack/tile/glass/plasma, 1, 4, 20) \
))

STACKSIZE_MACRO(/obj/item/stack/sheet/plasmaglass)
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/items/stacks/tiles/light.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
else
return ..()

/obj/item/stack/tile/light/place_tile(turf/open/T)
/obj/item/stack/tile/light/place_tile(turf/open/target_plating, mob/user)
. = ..()
var/turf/open/floor/light/F = .
F?.state = state
var/turf/open/floor/light/floor = .
floor?.state = state

/obj/item/stack/tile/light/cyborg
custom_materials = null
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/items/stacks/tiles/tile_mineral.dm
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@
icon_state = "tile_titanium_purple"
merge_type = /obj/item/stack/tile/mineral/titanium/purple

/* alt titanium tiles */

/obj/item/stack/tile/mineral/titanium/tiled
name = "tiled titanium tile"
singular_name = "tiled titanium floor tile"
Expand Down
Loading

0 comments on commit 6ebd1bb

Please sign in to comment.