mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
Change pride tiles to generic holiday tiles, add Tramstation support (#75665)
## About The Pull Request - Rewrites the Pride Week rainbow tiles coloring into a more generic 'Holiday' tile coloring proc so that it can be used by any holiday - Adds support for different color patterns - Adds support for the trimline decal subtype Tramstation uses - Adds stack types for tram tiles so that if you pull them up you can put them back - Fixes naming of tile decals ## Why It's Good For The Game - The generic proc allows us to specify a different color set for each holiday (think red white blue for July 4, or red/white/green for Christmas) - Players now have a way to put back tram platform tiles that have been pulled up - Tramstation gets colored tiles like the other maps  ## Changelog 🆑 LT3 fix: Tram platform tiles now have proper stack types refactor: Pride week tile coloring refactored into a generic holiday decal system spellcheck: Tile decals are no longer all named 'corner' /🆑
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user