[MIRROR] Change pride tiles to generic holiday tiles, add Tramstation support [MDB IGNORE] (#21693)
* Change pride tiles to generic holiday tiles, add Tramstation support * skyrat edits * Update floors.dmi --------- Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
@@ -94,3 +94,14 @@
|
||||
#define TURF_PATHING_PASS_PROC 1
|
||||
/// Turf is never passable
|
||||
#define TURF_PATHING_PASS_NO 2
|
||||
|
||||
/// Define the alpha for holiday/colored tile decals
|
||||
#define DECAL_ALPHA 60
|
||||
/// Generate horizontal striped color turf decals
|
||||
#define PATTERN_DEFAULT "default"
|
||||
/// Generate vertical striped color turf decals
|
||||
#define PATTERN_VERTICAL_STRIPE "vertical"
|
||||
/// Generate random color turf decals
|
||||
#define PATTERN_RANDOM "random"
|
||||
/// Generate rainbow color turf decals
|
||||
#define PATTERN_RAINBOW "rainbow"
|
||||
|
||||
@@ -45,6 +45,10 @@
|
||||
plane = FLOOR_PLANE
|
||||
layer = TURF_DECAL_LAYER
|
||||
anchored = TRUE
|
||||
/// Does this decal change colors on holidays
|
||||
var/use_holiday_colors = FALSE
|
||||
/// The pattern used when recoloring the decal
|
||||
var/pattern = PATTERN_DEFAULT
|
||||
|
||||
// This is with the intent of optimizing mapload
|
||||
// See spawners for more details since we use the same pattern
|
||||
@@ -55,6 +59,13 @@
|
||||
stack_trace("Warning: [src]([type]) initialized multiple times!")
|
||||
flags_1 |= INITIALIZED_1
|
||||
|
||||
// If the tile uses holiday colors, apply them here
|
||||
if(use_holiday_colors)
|
||||
var/current_holiday_color = request_holiday_colors(src, pattern)
|
||||
if(current_holiday_color)
|
||||
color = current_holiday_color
|
||||
alpha = DECAL_ALPHA
|
||||
|
||||
var/turf/T = loc
|
||||
if(!istype(T)) //you know this will happen somehow
|
||||
CRASH("Turf decal initialized in an object/nullspace")
|
||||
|
||||
@@ -3,22 +3,10 @@
|
||||
icon_state = "tile_corner"
|
||||
layer = TURF_PLATING_DECAL_LAYER
|
||||
alpha = 110
|
||||
use_holiday_colors = TRUE
|
||||
|
||||
#define PRIDE_ALPHA 60
|
||||
|
||||
/obj/effect/turf_decal/tile/Initialize(mapload)
|
||||
if (check_holidays(APRIL_FOOLS))
|
||||
color = "#[random_short_color()]"
|
||||
else if (check_holidays(PRIDE_WEEK))
|
||||
var/datum/holiday/pride_week/pride_week = GLOB.holidays[PRIDE_WEEK]
|
||||
color = pride_week.get_floor_tile_color(src)
|
||||
|
||||
// It looks garish at different alphas, and it's not possible to get a
|
||||
// consistent color palette without this.
|
||||
alpha = PRIDE_ALPHA
|
||||
return ..()
|
||||
|
||||
#undef PRIDE_ALPHA
|
||||
/obj/effect/turf_decal/tile/neutral/tram
|
||||
pattern = PATTERN_VERTICAL_STRIPE
|
||||
|
||||
/// Automatically generates all subtypes for a decal with the given path.
|
||||
#define TILE_DECAL_SUBTYPE_HELPER(path)\
|
||||
@@ -48,18 +36,21 @@
|
||||
}\
|
||||
##path/diagonal_edge {\
|
||||
icon_state = "diagonal_edge";\
|
||||
}\
|
||||
##path/tram {\
|
||||
icon_state = "tile_tram";\
|
||||
}
|
||||
|
||||
/// Blue tiles
|
||||
/obj/effect/turf_decal/tile/blue
|
||||
name = "blue corner"
|
||||
name = "blue tile decal"
|
||||
color = "#52B4E9"
|
||||
|
||||
TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/blue)
|
||||
|
||||
/// Dark blue tiles
|
||||
/obj/effect/turf_decal/tile/dark_blue
|
||||
name = "dark blue corner"
|
||||
name = "dark blue tile decal"
|
||||
color = "#486091"
|
||||
|
||||
TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/dark_blue)
|
||||
@@ -67,7 +58,7 @@ TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/dark_blue)
|
||||
/// Green tiles
|
||||
|
||||
/obj/effect/turf_decal/tile/green
|
||||
name = "green corner"
|
||||
name = "green tile decal"
|
||||
color = "#9FED58"
|
||||
|
||||
TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/green)
|
||||
@@ -75,7 +66,7 @@ TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/green)
|
||||
/// Dark green tiles
|
||||
|
||||
/obj/effect/turf_decal/tile/dark_green
|
||||
name = "dark green corner"
|
||||
name = "dark green tile decal"
|
||||
color = "#439C1E"
|
||||
|
||||
TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/dark_green)
|
||||
@@ -83,7 +74,7 @@ TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/dark_green)
|
||||
/// Yellow tiles
|
||||
|
||||
/obj/effect/turf_decal/tile/yellow
|
||||
name = "yellow corner"
|
||||
name = "yellow tile decal"
|
||||
color = "#EFB341"
|
||||
|
||||
TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/yellow)
|
||||
@@ -91,15 +82,15 @@ TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/yellow)
|
||||
/// Red tiles
|
||||
|
||||
/obj/effect/turf_decal/tile/red
|
||||
name = "red corner"
|
||||
color = "#486091" //SKYRAT EDIT CHANGE
|
||||
name = "red tile decal"
|
||||
color = "#486091" // SKYRAT EDIT CHANGE
|
||||
|
||||
TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/red)
|
||||
|
||||
/// Dark red tiles
|
||||
|
||||
/obj/effect/turf_decal/tile/dark_red
|
||||
name = "dark red corner"
|
||||
name = "dark red tile decal"
|
||||
color = "#B11111"
|
||||
|
||||
TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/dark_red)
|
||||
@@ -107,7 +98,7 @@ TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/dark_red)
|
||||
/// Bar tiles
|
||||
|
||||
/obj/effect/turf_decal/tile/bar
|
||||
name = "bar corner"
|
||||
name = "bar tile decal"
|
||||
color = "#791500"
|
||||
alpha = 130
|
||||
|
||||
@@ -116,7 +107,7 @@ TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/bar)
|
||||
/// Purple tiles
|
||||
|
||||
/obj/effect/turf_decal/tile/purple
|
||||
name = "purple corner"
|
||||
name = "purple tile decal"
|
||||
color = "#D381C9"
|
||||
|
||||
TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/purple)
|
||||
@@ -124,7 +115,7 @@ TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/purple)
|
||||
/// Brown tiles
|
||||
|
||||
/obj/effect/turf_decal/tile/brown
|
||||
name = "brown corner"
|
||||
name = "brown tile decal"
|
||||
color = "#A46106"
|
||||
|
||||
TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/brown)
|
||||
@@ -132,7 +123,7 @@ TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/brown)
|
||||
/// Neutral tiles
|
||||
|
||||
/obj/effect/turf_decal/tile/neutral
|
||||
name = "neutral corner"
|
||||
name = "neutral tile decal"
|
||||
color = "#D4D4D4"
|
||||
alpha = 50
|
||||
|
||||
@@ -141,23 +132,36 @@ TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/neutral)
|
||||
/// Dark tiles
|
||||
|
||||
/obj/effect/turf_decal/tile/dark
|
||||
name = "dark corner"
|
||||
name = "dark tile decal"
|
||||
color = "#0e0f0f"
|
||||
|
||||
TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/dark)
|
||||
|
||||
/// Random tiles
|
||||
/// Date-specific tiles
|
||||
/obj/effect/turf_decal/tile/holiday
|
||||
name = "ERROR tile decal"
|
||||
color = "#FF0000"
|
||||
|
||||
/obj/effect/turf_decal/tile/random // so many colors
|
||||
name = "colorful corner"
|
||||
color = "#E300FF" //bright pink as default for mapping
|
||||
|
||||
TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/random)
|
||||
|
||||
/obj/effect/turf_decal/tile/random/Initialize(mapload)
|
||||
color = "#[random_short_color()]"
|
||||
/obj/effect/turf_decal/tile/holiday/Initialize(mapload)
|
||||
color = request_holiday_colors(src, pattern)
|
||||
alpha = DECAL_ALPHA
|
||||
return ..()
|
||||
|
||||
/// Pattern tiles
|
||||
/obj/effect/turf_decal/tile/holiday/rainbow
|
||||
name = "rainbow tile decal"
|
||||
color = "#75C9EB" //bright blue as default for mapping
|
||||
pattern = PATTERN_RAINBOW
|
||||
|
||||
TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/holiday/rainbow)
|
||||
|
||||
/obj/effect/turf_decal/tile/holiday/random // so many colors
|
||||
name = "colorful tile decal"
|
||||
color = "#E300FF" //bright pink as default for mapping
|
||||
pattern = PATTERN_RANDOM
|
||||
|
||||
TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/holiday/random)
|
||||
|
||||
#undef TILE_DECAL_SUBTYPE_HELPER
|
||||
|
||||
/// Trimlines
|
||||
@@ -165,10 +169,29 @@ TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/random)
|
||||
layer = TURF_PLATING_DECAL_LAYER
|
||||
alpha = 110
|
||||
icon_state = "trimline_box"
|
||||
use_holiday_colors = TRUE
|
||||
|
||||
/obj/effect/turf_decal/trimline/Initialize(mapload)
|
||||
if(check_holidays(APRIL_FOOLS))
|
||||
color = "#[random_short_color()]"
|
||||
/obj/effect/turf_decal/trimline/tram
|
||||
pattern = PATTERN_VERTICAL_STRIPE
|
||||
|
||||
/obj/effect/turf_decal/trimline/tram/filled/corner/Initialize(mapload)
|
||||
if(use_holiday_colors)
|
||||
var/current_holiday_color = request_holiday_colors(src, pattern)
|
||||
if(current_holiday_color)
|
||||
color = current_holiday_color
|
||||
alpha = DECAL_ALPHA
|
||||
else
|
||||
color = "#ffc875"
|
||||
return ..()
|
||||
|
||||
/obj/effect/turf_decal/trimline/tram/filled/line/Initialize(mapload)
|
||||
if(use_holiday_colors)
|
||||
var/current_holiday_color = request_holiday_colors(src, pattern)
|
||||
if(current_holiday_color)
|
||||
color = current_holiday_color
|
||||
alpha = DECAL_ALPHA
|
||||
else
|
||||
color = "#ffc875"
|
||||
return ..()
|
||||
|
||||
/// Automatically generates all trimlines for a decal with the given path.
|
||||
@@ -296,6 +319,13 @@ TRIMLINE_SUBTYPE_HELPER(/obj/effect/turf_decal/trimline/brown)
|
||||
|
||||
TRIMLINE_SUBTYPE_HELPER(/obj/effect/turf_decal/trimline/neutral)
|
||||
|
||||
/// Tram trimlines
|
||||
/obj/effect/turf_decal/trimline/tram
|
||||
color = "#D4D4D4"
|
||||
alpha = 50
|
||||
|
||||
TRIMLINE_SUBTYPE_HELPER(/obj/effect/turf_decal/trimline/tram)
|
||||
|
||||
/// Dark trimlines
|
||||
/obj/effect/turf_decal/trimline/dark
|
||||
color = "#0e0f0f"
|
||||
@@ -303,3 +333,4 @@ TRIMLINE_SUBTYPE_HELPER(/obj/effect/turf_decal/trimline/neutral)
|
||||
TRIMLINE_SUBTYPE_HELPER(/obj/effect/turf_decal/trimline/dark)
|
||||
|
||||
#undef TRIMLINE_SUBTYPE_HELPER
|
||||
#undef DECAL_ALPHA
|
||||
|
||||
@@ -1021,6 +1021,33 @@
|
||||
/obj/item/stack/tile/noslip/thirty
|
||||
amount = 30
|
||||
|
||||
/obj/item/stack/tile/noslip/tram
|
||||
name = "high-traction platform tile"
|
||||
singular_name = "high-traction platform tile"
|
||||
desc = "A titanium-aluminium induction plate that powers the tram."
|
||||
icon_state = "tile_noslip"
|
||||
inhand_icon_state = "tile-noslip"
|
||||
turf_type = /turf/open/floor/noslip/tram
|
||||
merge_type = /obj/item/stack/tile/noslip/tram
|
||||
|
||||
/obj/item/stack/tile/noslip/tram_platform
|
||||
name = "tram platform tiles"
|
||||
singular_name = "tram platform"
|
||||
desc = "A tile used for tram platforms."
|
||||
icon_state = "darkiron_catwalk"
|
||||
inhand_icon_state = "tile-neon"
|
||||
turf_type = /turf/open/floor/noslip/tram_platform
|
||||
merge_type = /obj/item/stack/tile/noslip/tram_platform
|
||||
|
||||
/obj/item/stack/tile/noslip/tram_plate
|
||||
name = "high-traction platform tile"
|
||||
singular_name = "high-traction platform tile"
|
||||
desc = "A high-traction tile used for tram platforms."
|
||||
icon_state = "darkiron_plate"
|
||||
inhand_icon_state = "tile-neon"
|
||||
turf_type = /turf/open/floor/noslip/tram_plate
|
||||
merge_type = /obj/item/stack/tile/noslip/tram_plate
|
||||
|
||||
//Circuit
|
||||
/obj/item/stack/tile/circuit
|
||||
name = "blue circuit tile"
|
||||
|
||||
@@ -154,6 +154,14 @@
|
||||
/turf/open/floor/noslip/MakeSlippery(wet_setting, min_wet_time, wet_time_to_add, max_wet_time, permanent)
|
||||
return
|
||||
|
||||
/turf/open/floor/noslip/tram/Initialize(mapload)
|
||||
. = ..()
|
||||
var/current_holiday_color = request_holiday_colors(src, PATTERN_VERTICAL_STRIPE)
|
||||
if(current_holiday_color)
|
||||
color = current_holiday_color
|
||||
else
|
||||
color = "#EFB341"
|
||||
|
||||
/turf/open/floor/oldshuttle
|
||||
icon = 'icons/turf/shuttleold.dmi'
|
||||
icon_state = "floor"
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
var/poster_name = "generic celebration poster"
|
||||
var/poster_desc = "A poster for celebrating some holiday. Unfortunately, its unfinished, so you can't see what the holiday is."
|
||||
var/poster_icon = "holiday_unfinished"
|
||||
/// Color scheme for this holiday
|
||||
var/list/holiday_colors
|
||||
|
||||
// This proc gets run before the game starts when the holiday is activated. Do festive shit here.
|
||||
/datum/holiday/proc/celebrate()
|
||||
@@ -75,6 +77,29 @@
|
||||
|
||||
return FALSE
|
||||
|
||||
/// Procs to return holiday themed colors for recoloring atoms
|
||||
/datum/holiday/proc/get_holiday_colors(atom/thing_to_color, pattern = PATTERN_DEFAULT)
|
||||
if(!holiday_colors)
|
||||
return
|
||||
switch(pattern)
|
||||
if(PATTERN_DEFAULT)
|
||||
return holiday_colors[(thing_to_color.y % holiday_colors.len) + 1]
|
||||
if(PATTERN_VERTICAL_STRIPE)
|
||||
return holiday_colors[(thing_to_color.x % holiday_colors.len) + 1]
|
||||
|
||||
/proc/request_holiday_colors(atom/thing_to_color, pattern = PATTERN_DEFAULT)
|
||||
switch(pattern)
|
||||
if(PATTERN_RANDOM)
|
||||
return "#[random_short_color()]"
|
||||
if(PATTERN_RAINBOW)
|
||||
var/datum/holiday/pride_week/rainbow_datum = new()
|
||||
return rainbow_datum.get_holiday_colors(thing_to_color, PATTERN_DEFAULT)
|
||||
if(!length(GLOB.holidays))
|
||||
return
|
||||
for(var/holiday_key in GLOB.holidays)
|
||||
var/datum/holiday/holiday_real = GLOB.holidays[holiday_key]
|
||||
return holiday_real.get_holiday_colors(thing_to_color, pattern)
|
||||
|
||||
// The actual holidays
|
||||
|
||||
// JANUARY
|
||||
@@ -220,6 +245,9 @@
|
||||
if(P.client)
|
||||
P.client.playtitlemusic()
|
||||
|
||||
/datum/holiday/april_fools/get_holiday_colors(atom/thing_to_color)
|
||||
return "#[random_short_color()]"
|
||||
|
||||
/datum/holiday/spess
|
||||
name = "Cosmonautics Day"
|
||||
begin_day = 12
|
||||
@@ -327,27 +355,22 @@
|
||||
name = "Summer Solstice"
|
||||
begin_day = 21
|
||||
begin_month = JUNE
|
||||
|
||||
/datum/holiday/pride_week
|
||||
name = PRIDE_WEEK
|
||||
begin_month = JUNE
|
||||
// Stonewall was June 28th, this captures its week.
|
||||
begin_day = 23
|
||||
end_day = 29
|
||||
|
||||
var/static/list/rainbow_colors = list(
|
||||
COLOR_PRIDE_PURPLE,
|
||||
COLOR_PRIDE_BLUE,
|
||||
COLOR_PRIDE_GREEN,
|
||||
COLOR_PRIDE_YELLOW,
|
||||
COLOR_PRIDE_ORANGE,
|
||||
COLOR_PRIDE_RED,
|
||||
holiday_colors = list(
|
||||
COLOR_PRIDE_PURPLE,
|
||||
COLOR_PRIDE_BLUE,
|
||||
COLOR_PRIDE_GREEN,
|
||||
COLOR_PRIDE_YELLOW,
|
||||
COLOR_PRIDE_ORANGE,
|
||||
COLOR_PRIDE_RED,
|
||||
)
|
||||
|
||||
/// Given an atom, will return what color it should be to match the pride flag.
|
||||
/datum/holiday/pride_week/proc/get_floor_tile_color(atom/atom)
|
||||
var/turf/turf = get_turf(atom)
|
||||
return rainbow_colors[(turf.y % rainbow_colors.len) + 1]
|
||||
|
||||
// JULY
|
||||
|
||||
/datum/holiday/doctor
|
||||
@@ -740,7 +763,6 @@
|
||||
/datum/holiday/hebrew/passover/getStationPrefix()
|
||||
return pick("Matzah", "Moses", "Red Sea")
|
||||
|
||||
|
||||
// HOLIDAY ADDONS
|
||||
|
||||
/datum/holiday/xmas/celebrate()
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
/turf/open/floor/noslip/tram
|
||||
name = "high-traction platform"
|
||||
icon_state = "noslip_tram"
|
||||
base_icon_state = "noslip_tram"
|
||||
floor_tile = /obj/item/stack/tile/noslip/tram
|
||||
|
||||
/turf/open/floor/noslip/tram_plate
|
||||
name = "linear induction plate"
|
||||
desc = "The linear induction plate that powers the tram."
|
||||
icon_state = "tram_plate"
|
||||
base_icon_state = "tram_plate"
|
||||
floor_tile = /obj/item/stack/tile/noslip/tram_plate
|
||||
slowdown = 0
|
||||
flags_1 = NONE
|
||||
|
||||
@@ -15,9 +22,9 @@
|
||||
|
||||
/turf/open/floor/noslip/tram_platform
|
||||
name = "tram platform"
|
||||
desc = "A sturdy looking tram platform."
|
||||
icon_state = "tram_platform"
|
||||
base_icon_state = "tram_platform"
|
||||
floor_tile = /obj/item/stack/tile/noslip/tram_platform
|
||||
slowdown = 0
|
||||
|
||||
/turf/open/floor/noslip/tram_plate/broken_states()
|
||||
|
||||
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 362 KiB After Width: | Height: | Size: 366 KiB |
|
Before Width: | Height: | Size: 383 KiB After Width: | Height: | Size: 387 KiB |