diff --git a/code/__HELPERS/names.dm b/code/__HELPERS/names.dm index 4d2edb75a77..22fd40c3764 100644 --- a/code/__HELPERS/names.dm +++ b/code/__HELPERS/names.dm @@ -70,9 +70,9 @@ GLOBAL_VAR(command_name) random = 999999999 //ridiculously long name in written numbers // Prefix - var/holiday_name = pick(SSevents.holidays) + var/holiday_name = length(GLOB.holidays) && pick(GLOB.holidays) if(holiday_name) - var/datum/holiday/holiday = SSevents.holidays[holiday_name] + var/datum/holiday/holiday = GLOB.holidays[holiday_name] if(istype(holiday, /datum/holiday/friday_thirteenth)) random = 13 name = holiday.getStationPrefix() diff --git a/code/controllers/subsystem/communications.dm b/code/controllers/subsystem/communications.dm index 1ff2c5065eb..ddb058b5f79 100644 --- a/code/controllers/subsystem/communications.dm +++ b/code/controllers/subsystem/communications.dm @@ -42,7 +42,7 @@ SUBSYSTEM_DEF(communications) * * user - Mob who called the meeting */ /datum/controller/subsystem/communications/proc/can_make_emergency_meeting(mob/living/user) - if(!(SSevents.holidays && SSevents.holidays[APRIL_FOOLS])) + if(!check_holidays(APRIL_FOOLS)) return FALSE else if(COOLDOWN_FINISHED(src, emergency_meeting_cooldown)) return TRUE diff --git a/code/controllers/subsystem/events.dm b/code/controllers/subsystem/events.dm index c1adcf733f3..3fceab8f2b9 100644 --- a/code/controllers/subsystem/events.dm +++ b/code/controllers/subsystem/events.dm @@ -11,7 +11,6 @@ SUBSYSTEM_DEF(events) var/frequency_lower = 1800 //3 minutes lower bound. var/frequency_upper = 6000 //10 minutes upper bound. Basically an event will happen every 3 to 10 minutes. - var/list/holidays //List of all holidays occuring today or null if no holidays var/wizardmode = FALSE /datum/controller/subsystem/events/Initialize() @@ -21,7 +20,9 @@ SUBSYSTEM_DEF(events) continue //don't want this one! leave it for the garbage collector control += E //add it to the list of all events (controls) reschedule() - getHoliday() + // Instantiate our holidays list if it hasn't been already + if(isnull(GLOB.holidays)) + fill_holidays() return SS_INIT_SUCCESS @@ -92,33 +93,58 @@ SUBSYSTEM_DEF(events) else if(. == EVENT_READY) E.runEvent(random = TRUE) -/* -////////////// -// HOLIDAYS // -////////////// -//Uncommenting ALLOW_HOLIDAYS in config.txt will enable holidays -//It's easy to add stuff. Just add a holiday datum in code/modules/holiday/holidays.dm -//You can then check if it's a special day in any code in the game by doing if(SSevents.holidays["Groundhog Day"]) +/datum/controller/subsystem/events/proc/toggleWizardmode() + wizardmode = !wizardmode + message_admins("Summon Events has been [wizardmode ? "enabled, events will occur every [SSevents.frequency_lower / 600] to [SSevents.frequency_upper / 600] minutes" : "disabled"]!") + log_game("Summon Events was [wizardmode ? "enabled" : "disabled"]!") -//You can also make holiday random events easily thanks to Pete/Gia's system. -//simply make a random event normally, then assign it a holidayID string which matches the holiday's name. -//Anything with a holidayID, which isn't in the holidays list, will never occur. -//Please, Don't spam stuff up with stupid stuff (key example being april-fools Pooh/ERP/etc), -//And don't forget: CHECK YOUR CODE!!!! We don't want any zero-day bugs which happen only on holidays and never get found/fixed! +/datum/controller/subsystem/events/proc/resetFrequency() + frequency_lower = initial(frequency_lower) + frequency_upper = initial(frequency_upper) -////////////////////////////////////////////////////////////////////////////////////////////////////////// -//ALSO, MOST IMPORTANTLY: Don't add stupid stuff! Discuss bonus content with Project-Heads first please!// -////////////////////////////////////////////////////////////////////////////////////////////////////////// -*/ +/** + * HOLIDAYS + * + * Uncommenting ALLOW_HOLIDAYS in config.txt will enable holidays + * + * It's easy to add stuff. Just add a holiday datum in code/modules/holiday/holidays.dm + * You can then check if it's a special day in any code in the game by calling check_holidays("Groundhog Day") + * + * You can also make holiday random events easily thanks to Pete/Gia's system. + * simply make a random event normally, then assign it a holidayID string which matches the holiday's name. + * Anything with a holidayID, which isn't in the holidays list, will never occur. + * + * Please, Don't spam stuff up with stupid stuff (key example being april-fools Pooh/ERP/etc), + * and don't forget: CHECK YOUR CODE!!!! We don't want any zero-day bugs which happen only on holidays and never get found/fixed! + */ +GLOBAL_LIST(holidays) -//sets up the holidays and holidays list -/datum/controller/subsystem/events/proc/getHoliday() +/** + * Checks that the passed holiday is located in the global holidays list. + * + * Returns a holiday datum, or null if it's not that holiday. + */ +/proc/check_holidays(holiday_to_find) if(!CONFIG_GET(flag/allow_holidays)) return // Holiday stuff was not enabled in the config! - for(var/H in subtypesof(/datum/holiday)) - var/datum/holiday/holiday = new H() + + if(isnull(GLOB.holidays) && !fill_holidays()) + return // Failed to generate holidays, for some reason + + return GLOB.holidays[holiday_to_find] + +/** + * Fills the holidays list if applicable, or leaves it an empty list. + */ +/proc/fill_holidays() + if(!CONFIG_GET(flag/allow_holidays)) + return FALSE // Holiday stuff was not enabled in the config! + + GLOB.holidays = list() + for(var/holiday_type in subtypesof(/datum/holiday)) + var/datum/holiday/holiday = new holiday_type() var/delete_holiday = TRUE for(var/timezone in holiday.timezones) var/time_in_timezone = world.realtime + timezone HOURS @@ -130,24 +156,16 @@ SUBSYSTEM_DEF(events) if(holiday.shouldCelebrate(DD, MM, YYYY, DDD)) holiday.celebrate() - LAZYSET(holidays, holiday.name, holiday) + GLOB.holidays[holiday.name] = holiday delete_holiday = FALSE break if(delete_holiday) qdel(holiday) - if(holidays) - holidays = shuffle(holidays) + if(GLOB.holidays.len) + shuffle_inplace(GLOB.holidays) // regenerate station name because holiday prefixes. set_station_name(new_station_name()) world.update_status() -/datum/controller/subsystem/events/proc/toggleWizardmode() - wizardmode = !wizardmode - message_admins("Summon Events has been [wizardmode ? "enabled, events will occur every [SSevents.frequency_lower / 600] to [SSevents.frequency_upper / 600] minutes" : "disabled"]!") - log_game("Summon Events was [wizardmode ? "enabled" : "disabled"]!") - - -/datum/controller/subsystem/events/proc/resetFrequency() - frequency_lower = initial(frequency_lower) - frequency_upper = initial(frequency_upper) + return TRUE diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 812e41ff416..5689314e319 100755 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -272,10 +272,10 @@ SUBSYSTEM_DEF(ticker) current_state = GAME_STATE_PLAYING Master.SetRunLevel(RUNLEVEL_GAME) - if(SSevents.holidays) + if(length(GLOB.holidays)) to_chat(world, span_notice("and...")) - for(var/holidayname in SSevents.holidays) - var/datum/holiday/holiday = SSevents.holidays[holidayname] + for(var/holidayname in GLOB.holidays) + var/datum/holiday/holiday = GLOB.holidays[holidayname] to_chat(world, "

[holiday.greet()]

") PostSetup() diff --git a/code/game/machinery/computer/arcade/arcade.dm b/code/game/machinery/computer/arcade/arcade.dm index 8e3458f6913..c05f6de3a4b 100644 --- a/code/game/machinery/computer/arcade/arcade.dm +++ b/code/game/machinery/computer/arcade/arcade.dm @@ -226,17 +226,17 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list( var/name_part1 var/name_part2 - if(SSevents.holidays && SSevents.holidays[HALLOWEEN]) + if(check_holidays(HALLOWEEN)) name_action = pick_list(ARCADE_FILE, "rpg_action_halloween") name_part1 = pick_list(ARCADE_FILE, "rpg_adjective_halloween") name_part2 = pick_list(ARCADE_FILE, "rpg_enemy_halloween") weapons = strings(ARCADE_FILE, "rpg_weapon_halloween") - else if(SSevents.holidays && SSevents.holidays[CHRISTMAS]) + else if(check_holidays(CHRISTMAS)) name_action = pick_list(ARCADE_FILE, "rpg_action_xmas") name_part1 = pick_list(ARCADE_FILE, "rpg_adjective_xmas") name_part2 = pick_list(ARCADE_FILE, "rpg_enemy_xmas") weapons = strings(ARCADE_FILE, "rpg_weapon_xmas") - else if(SSevents.holidays && SSevents.holidays[VALENTINES]) + else if(check_holidays(VALENTINES)) name_action = pick_list(ARCADE_FILE, "rpg_action_valentines") name_part1 = pick_list(ARCADE_FILE, "rpg_adjective_valentines") name_part2 = pick_list(ARCADE_FILE, "rpg_enemy_valentines") diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 183e6249bfd..96c18d1080b 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -220,7 +220,7 @@ return LAZYREMOVE(messages, LAZYACCESS(messages, message_index)) if ("emergency_meeting") - if(!(SSevents.holidays && SSevents.holidays[APRIL_FOOLS])) + if(!check_holidays(APRIL_FOOLS)) return if (!authenticated_as_silicon_or_captain(usr)) return @@ -530,7 +530,7 @@ data["importantActionReady"] = COOLDOWN_FINISHED(src, important_action_cooldown) data["shuttleCalled"] = FALSE data["shuttleLastCalled"] = FALSE - data["aprilFools"] = SSevents.holidays && SSevents.holidays[APRIL_FOOLS] + data["aprilFools"] = check_holidays(APRIL_FOOLS) data["alertLevel"] = SSsecurity_level.get_current_level_as_text() data["authorizeName"] = authorize_name data["canLogOut"] = !issilicon(user) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index d24939d5f05..d6a9e4785ba 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -81,7 +81,7 @@ var/mob/living/carbon/human/human = M if(!(human.mob_biotypes & (MOB_ROBOTIC|MOB_MINERAL|MOB_UNDEAD|MOB_SPIRIT))) var/datum/species/species_to_transform = /datum/species/fly - if(SSevents.holidays && SSevents.holidays[MOTH_WEEK]) + if(check_holidays(MOTH_WEEK)) species_to_transform = /datum/species/moth if(human.dna && human.dna.species.id != initial(species_to_transform.id)) to_chat(M, span_hear("You hear a buzzing in your ears.")) diff --git a/code/game/objects/effects/decals/turfdecal/tilecoloring.dm b/code/game/objects/effects/decals/turfdecal/tilecoloring.dm index a2ff0fed26b..67642d0c637 100644 --- a/code/game/objects/effects/decals/turfdecal/tilecoloring.dm +++ b/code/game/objects/effects/decals/turfdecal/tilecoloring.dm @@ -7,16 +7,15 @@ #define PRIDE_ALPHA 60 /obj/effect/turf_decal/tile/Initialize(mapload) - if(SSevents.holidays) - if (SSevents.holidays[APRIL_FOOLS]) - color = "#[random_short_color()]" - else if (SSevents.holidays[PRIDE_WEEK]) - var/datum/holiday/pride_week/pride_week = SSevents.holidays[PRIDE_WEEK] - color = pride_week.get_floor_tile_color(src) + 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 + // 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 @@ -580,7 +579,7 @@ icon_state = "trimline_box" /obj/effect/turf_decal/trimline/Initialize(mapload) - if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS]) + if(check_holidays(APRIL_FOOLS)) color = "#[random_short_color()]" . = ..() diff --git a/code/game/objects/items/food/pastries.dm b/code/game/objects/items/food/pastries.dm index 3f4215fb0e3..71cd1e59b33 100644 --- a/code/game/objects/items/food/pastries.dm +++ b/code/game/objects/items/food/pastries.dm @@ -204,7 +204,7 @@ /obj/item/food/cookie/sugar/Initialize(mapload) . = ..() - if(SSevents.holidays && SSevents.holidays[FESTIVE_SEASON]) + if(check_holidays(FESTIVE_SEASON)) var/shape = pick("tree", "bear", "santa", "stocking", "present", "cane") desc = "A sugar cookie in the shape of a [shape]. I hope Santa likes it!" icon_state = "sugarcookie_[shape]" diff --git a/code/game/objects/items/implants/implant_mindshield.dm b/code/game/objects/items/implants/implant_mindshield.dm index 240c83c793f..33bfafbbbdd 100644 --- a/code/game/objects/items/implants/implant_mindshield.dm +++ b/code/game/objects/items/implants/implant_mindshield.dm @@ -28,7 +28,7 @@ qdel(src) return TRUE if(SEND_SIGNAL(target.mind, COMSIG_MINDSHIELD_IMPLANTED, user) & COMPONENT_MINDSHIELD_DECONVERTED) - if(prob(1) || SSevents.holidays && SSevents.holidays[APRIL_FOOLS]) + if(prob(1) || check_holidays(APRIL_FOOLS)) target.say("I'm out! I quit! Whose kidneys are these?", forced = "They're out! They quit! Whose kidneys do they have?") ADD_TRAIT(target, TRAIT_MINDSHIELD, IMPLANT_TRAIT) diff --git a/code/game/objects/structures/signs/signs_interactive.dm b/code/game/objects/structures/signs/signs_interactive.dm index 3e017a6ebd6..74bc08eb898 100644 --- a/code/game/objects/structures/signs/signs_interactive.dm +++ b/code/game/objects/structures/signs/signs_interactive.dm @@ -20,9 +20,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/sign/calendar, 32) /obj/structure/sign/calendar/examine(mob/user) . = ..() . += span_info("The current date is: [time2text(world.realtime, "DDD, MMM DD")], [CURRENT_STATION_YEAR].") - if(SSevents.holidays) + if(length(GLOB.holidays)) . += span_info("Events:") - for(var/holidayname in SSevents.holidays) + for(var/holidayname in GLOB.holidays) . += span_info("[holidayname]") /** diff --git a/code/game/turfs/closed/minerals.dm b/code/game/turfs/closed/minerals.dm index ba66138f955..f44d67e68df 100644 --- a/code/game/turfs/closed/minerals.dm +++ b/code/game/turfs/closed/minerals.dm @@ -180,7 +180,7 @@ var/mineralChance = 13 /turf/closed/mineral/random/Initialize(mapload) - if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS]) + if(check_holidays(APRIL_FOOLS)) mineralSpawnChanceList[/obj/item/stack/ore/bananium] = 3 mineralSpawnChanceList = typelist("mineralSpawnChanceList", mineralSpawnChanceList) diff --git a/code/modules/antagonists/brainwashing/brainwashing.dm b/code/modules/antagonists/brainwashing/brainwashing.dm index 96d807207ea..6f87930b818 100644 --- a/code/modules/antagonists/brainwashing/brainwashing.dm +++ b/code/modules/antagonists/brainwashing/brainwashing.dm @@ -22,7 +22,7 @@ var/end_message = "." var/rendered = begin_message + obj_message + end_message deadchat_broadcast(rendered, "[L]", follow_target = L, turf_target = get_turf(L), message_type=DEADCHAT_ANNOUNCEMENT) - if(prob(1) || SSevents.holidays && SSevents.holidays[APRIL_FOOLS]) + if(prob(1) || check_holidays(APRIL_FOOLS)) L.say("You son of a bitch! I'm in.", forced = "That son of a bitch! They're in.") /datum/antagonist/brainwashed diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm index 8370560ef7d..8d582d39c5b 100644 --- a/code/modules/antagonists/cult/runes.dm +++ b/code/modules/antagonists/cult/runes.dm @@ -281,7 +281,7 @@ structure_check() searches for nearby cultist structures required for the invoca H.remove_status_effect(/datum/status_effect/speech/slurring/cult) H.remove_status_effect(/datum/status_effect/speech/stutter) - if(prob(1) || SSevents.holidays && SSevents.holidays[APRIL_FOOLS]) + if(prob(1) || check_holidays(APRIL_FOOLS)) H.say("You son of a bitch! I'm in.", forced = "That son of a bitch! They're in.") if(isshade(convertee)) convertee.icon_state = "shade_cult" diff --git a/code/modules/antagonists/slaughter/slaughter.dm b/code/modules/antagonists/slaughter/slaughter.dm index 9e277f970e3..02fb5d52bfa 100644 --- a/code/modules/antagonists/slaughter/slaughter.dm +++ b/code/modules/antagonists/slaughter/slaughter.dm @@ -220,7 +220,7 @@ /mob/living/simple_animal/hostile/imp/slaughter/laughter/Initialize(mapload) . = ..() - if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS]) + if(check_holidays(APRIL_FOOLS)) icon_state = "honkmon" /mob/living/simple_animal/hostile/imp/slaughter/laughter/ex_act(severity) diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index 20a42234c2f..b2415b3069c 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -298,7 +298,7 @@ //If this proc fires the mob must be a revhead var/datum/antagonist/rev/head/converter = aggressor.mind.has_antag_datum(/datum/antagonist/rev/head) if(converter.add_revolutionary(victim.mind)) - if(prob(1) || SSevents.holidays && SSevents.holidays[APRIL_FOOLS]) + if(prob(1) || check_holidays(APRIL_FOOLS)) victim.say("You son of a bitch! I'm in.", forced = "That son of a bitch! They're in.") times_used -- //Flashes less likely to burn out for headrevs when used for conversion else diff --git a/code/modules/clothing/suits/ghostsheet.dm b/code/modules/clothing/suits/ghostsheet.dm index 46538931f32..e99d838dc50 100644 --- a/code/modules/clothing/suits/ghostsheet.dm +++ b/code/modules/clothing/suits/ghostsheet.dm @@ -13,12 +13,12 @@ /obj/item/clothing/suit/costume/ghost_sheet/Initialize(mapload) . = ..() - if(SSevents.holidays && SSevents.holidays[HALLOWEEN]) + if(check_holidays(HALLOWEEN)) update_icon(UPDATE_OVERLAYS) /obj/item/clothing/suit/costume/ghost_sheet/worn_overlays(mutable_appearance/standing, isinhands, icon_file) . = ..() - if(SSevents.holidays && SSevents.holidays[HALLOWEEN]) + if(check_holidays(HALLOWEEN)) if(!isinhands) . += emissive_appearance('icons/mob/simple/mob.dmi', "ghost", offset_spokesman = src, alpha = src.alpha) diff --git a/code/modules/events/_event.dm b/code/modules/events/_event.dm index 29945487944..8c42c2c88ce 100644 --- a/code/modules/events/_event.dm +++ b/code/modules/events/_event.dm @@ -51,7 +51,7 @@ return FALSE if(players_amt < min_players) return FALSE - if(holidayID && (!SSevents.holidays || !SSevents.holidays[holidayID])) + if(holidayID && !check_holidays(holidayID)) return FALSE if(EMERGENCY_ESCAPED_OR_ENDGAMED) return FALSE diff --git a/code/modules/events/aurora_caelus.dm b/code/modules/events/aurora_caelus.dm index 33dbc87bf26..0abcee3b408 100644 --- a/code/modules/events/aurora_caelus.dm +++ b/code/modules/events/aurora_caelus.dm @@ -37,7 +37,7 @@ if(istype(affected_area, /area/station/service/kitchen)) for(var/turf/open/kitchen in affected_area) kitchen.set_light(1, 0.75) - if(!prob(1) && !SSevents.holidays?[APRIL_FOOLS]) + if(!prob(1) && !check_holidays(APRIL_FOOLS)) continue var/obj/machinery/oven/roast_ruiner = locate() in affected_area if(roast_ruiner) diff --git a/code/modules/events/holiday/xmas.dm b/code/modules/events/holiday/xmas.dm index 5fb5feda3f1..547a6f8b4df 100644 --- a/code/modules/events/holiday/xmas.dm +++ b/code/modules/events/holiday/xmas.dm @@ -56,9 +56,9 @@ /obj/effect/spawner/xmastree/Initialize(mapload) . = ..() - if((CHRISTMAS in SSevents.holidays) && christmas_tree) + if(check_holidays(CHRISTMAS) && christmas_tree) new christmas_tree(get_turf(src)) - else if((FESTIVE_SEASON in SSevents.holidays) && festive_tree) + else if(check_holidays(FESTIVE_SEASON) && festive_tree) new festive_tree(get_turf(src)) /obj/effect/spawner/xmastree/rdrod diff --git a/code/modules/events/meteor_wave.dm b/code/modules/events/meteor_wave.dm index 68a0bc2582c..d9f0e31a4c8 100644 --- a/code/modules/events/meteor_wave.dm +++ b/code/modules/events/meteor_wave.dm @@ -34,7 +34,7 @@ if("threatening") wave_type = GLOB.meteors_threatening if("catastrophic") - if(SSevents.holidays && SSevents.holidays[HALLOWEEN]) + if(check_holidays(HALLOWEEN)) wave_type = GLOB.meteorsSPOOKY else wave_type = GLOB.meteors_catastrophic diff --git a/code/modules/jobs/job_types/head_of_personnel.dm b/code/modules/jobs/job_types/head_of_personnel.dm index 60f9c490f48..164eee68f1d 100644 --- a/code/modules/jobs/job_types/head_of_personnel.dm +++ b/code/modules/jobs/job_types/head_of_personnel.dm @@ -73,7 +73,7 @@ /datum/outfit/job/hop/pre_equip(mob/living/carbon/human/H) ..() - if(locate(/datum/holiday/ianbirthday) in SSevents.holidays) + if(check_holidays("Ian's Birthday")) undershirt = /datum/sprite_accessory/undershirt/ian //only pet worth reviving diff --git a/code/modules/jobs/job_types/janitor.dm b/code/modules/jobs/job_types/janitor.dm index 042288cdf60..6b4415cc66b 100644 --- a/code/modules/jobs/job_types/janitor.dm +++ b/code/modules/jobs/job_types/janitor.dm @@ -43,12 +43,12 @@ /datum/outfit/job/janitor/pre_equip(mob/living/carbon/human/H, visualsOnly) . = ..() - if(GARBAGEDAY in SSevents.holidays) + if(check_holidays(GARBAGEDAY)) backpack_contents += list(/obj/item/gun/ballistic/revolver) r_pocket = /obj/item/ammo_box/a357 /datum/outfit/job/janitor/get_types_to_preload() . = ..() - if(GARBAGEDAY in SSevents.holidays) + if(check_holidays(GARBAGEDAY)) . += /obj/item/gun/ballistic/revolver . += /obj/item/ammo_box/a357 diff --git a/code/modules/mapping/mapping_helpers.dm b/code/modules/mapping/mapping_helpers.dm index e85fd09070f..d622e205247 100644 --- a/code/modules/mapping/mapping_helpers.dm +++ b/code/modules/mapping/mapping_helpers.dm @@ -548,7 +548,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava) var/balloon_clusters = 2 /obj/effect/mapping_helpers/ianbirthday/LateInitialize() - if(locate(/datum/holiday/ianbirthday) in SSevents.holidays) + if(check_holidays("Ian's Birthday")) birthday() qdel(src) @@ -616,7 +616,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava) icon_state = "iansnewyrshelper" /obj/effect/mapping_helpers/iannewyear/LateInitialize() - if(SSevents.holidays && SSevents.holidays[NEW_YEAR]) + if(check_holidays(NEW_YEAR)) fireworks() qdel(src) diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm index e24fd5ab3e8..80a16b603a3 100644 --- a/code/modules/mob/living/blood.dm +++ b/code/modules/mob/living/blood.dm @@ -277,7 +277,7 @@ /mob/living/carbon/human/get_blood_id() if(HAS_TRAIT(src, TRAIT_HUSK)) return - if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS] && is_clown_job(mind?.assigned_role)) + if(check_holidays(APRIL_FOOLS) && is_clown_job(mind?.assigned_role)) return /datum/reagent/colorful_reagent if(dna.species.exotic_blood) return dna.species.exotic_blood diff --git a/code/modules/mob/living/carbon/human/species_types/dullahan.dm b/code/modules/mob/living/carbon/human/species_types/dullahan.dm index cb60c98d494..46779b48187 100644 --- a/code/modules/mob/living/carbon/human/species_types/dullahan.dm +++ b/code/modules/mob/living/carbon/human/species_types/dullahan.dm @@ -25,7 +25,7 @@ /datum/species/dullahan/check_roundstart_eligible() - if(SSevents.holidays && SSevents.holidays[HALLOWEEN]) + if(check_holidays(HALLOWEEN)) return TRUE return ..() diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm index 1325884895a..625e8344b80 100644 --- a/code/modules/mob/living/carbon/human/species_types/golems.dm +++ b/code/modules/mob/living/carbon/human/species_types/golems.dm @@ -811,7 +811,7 @@ ..() /datum/species/golem/cloth/check_roundstart_eligible() - if(SSevents.holidays && SSevents.holidays[HALLOWEEN]) + if(check_holidays(HALLOWEEN)) return TRUE return ..() diff --git a/code/modules/mob/living/carbon/human/species_types/monkeys.dm b/code/modules/mob/living/carbon/human/species_types/monkeys.dm index d54e28d1ca8..4e8583b9b50 100644 --- a/code/modules/mob/living/carbon/human/species_types/monkeys.dm +++ b/code/modules/mob/living/carbon/human/species_types/monkeys.dm @@ -115,7 +115,7 @@ return ..() /datum/species/monkey/check_roundstart_eligible() - if(SSevents.holidays && SSevents.holidays[MONKEYDAY]) + if(check_holidays(MONKEYDAY)) return TRUE return ..() diff --git a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm index 1d2e5eb21a2..4b5ef78cbf4 100644 --- a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm @@ -29,7 +29,7 @@ ) /datum/species/shadow/check_roundstart_eligible() - if(SSevents.holidays && SSevents.holidays[HALLOWEEN]) + if(check_holidays(HALLOWEEN)) return TRUE return ..() diff --git a/code/modules/mob/living/carbon/human/species_types/skeletons.dm b/code/modules/mob/living/carbon/human/species_types/skeletons.dm index cc8ff3adc69..6fa56030c15 100644 --- a/code/modules/mob/living/carbon/human/species_types/skeletons.dm +++ b/code/modules/mob/living/carbon/human/species_types/skeletons.dm @@ -49,7 +49,7 @@ C.set_safe_hunger_level() /datum/species/skeleton/check_roundstart_eligible() - if(SSevents.holidays && SSevents.holidays[HALLOWEEN]) + if(check_holidays(HALLOWEEN)) return TRUE return ..() diff --git a/code/modules/mob/living/carbon/human/species_types/vampire.dm b/code/modules/mob/living/carbon/human/species_types/vampire.dm index 78e20570d0b..36ff24cb5ed 100644 --- a/code/modules/mob/living/carbon/human/species_types/vampire.dm +++ b/code/modules/mob/living/carbon/human/species_types/vampire.dm @@ -34,7 +34,7 @@ var/info_text = "You are a Vampire. You will slowly but constantly lose blood if outside of a coffin. If inside a coffin, you will slowly heal. You may gain more blood by grabbing a live victim and using your drain ability." /datum/species/vampire/check_roundstart_eligible() - if(SSevents.holidays && SSevents.holidays[HALLOWEEN]) + if(check_holidays(HALLOWEEN)) return TRUE return ..() diff --git a/code/modules/mob/living/carbon/human/species_types/zombies.dm b/code/modules/mob/living/carbon/human/species_types/zombies.dm index bffa7217a76..54095f9a6e9 100644 --- a/code/modules/mob/living/carbon/human/species_types/zombies.dm +++ b/code/modules/mob/living/carbon/human/species_types/zombies.dm @@ -48,7 +48,7 @@ return /datum/species/zombie/check_roundstart_eligible() - if(SSevents.holidays && SSevents.holidays[HALLOWEEN]) + if(check_holidays(HALLOWEEN)) return TRUE return ..() diff --git a/code/modules/mod/modules/modules_antag.dm b/code/modules/mod/modules/modules_antag.dm index f0b0fda395e..d3a9e606f72 100644 --- a/code/modules/mod/modules/modules_antag.dm +++ b/code/modules/mod/modules/modules_antag.dm @@ -261,7 +261,7 @@ /obj/item/mod/module/springlock/bite_of_87/on_suit_activation() ..() - if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS] || prob(1)) + if(check_holidays(APRIL_FOOLS) || prob(1)) mod.set_mod_color("#b17f00") mod.wearer.remove_atom_colour(WASHABLE_COLOUR_PRIORITY) // turns purple guy purple mod.wearer.add_atom_colour("#704b96", FIXED_COLOUR_PRIORITY) diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 1a50f4cbace..8a1665014f7 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -42,7 +42,7 @@ /// Returns a fresh piece of paper /obj/item/paper_bin/proc/generate_paper() var/obj/item/paper/paper = new papertype - if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS]) + if(check_holidays(APRIL_FOOLS)) if(prob(30)) paper.add_raw_text("HONK HONK HONK HONK HONK HONK HONK
HOOOOOOOOOOOOOOOOOOOOOONK
APRIL FOOLS
") paper.AddElement(/datum/element/honkspam) diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index a22c18aaf86..7a7c1c3928d 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -49,7 +49,7 @@ /obj/structure/reagent_dispensers/Initialize(mapload) . = ..() - if(icon_state == "water" && SSevents.holidays?[APRIL_FOOLS]) + if(icon_state == "water" && check_holidays(APRIL_FOOLS)) icon_state = "water_fools" /obj/structure/reagent_dispensers/examine(mob/user) @@ -246,7 +246,7 @@ /obj/structure/reagent_dispensers/fueltank/Initialize(mapload) . = ..() - if(SSevents.holidays?[APRIL_FOOLS]) + if(check_holidays(APRIL_FOOLS)) icon_state = "fuel_fools" /obj/structure/reagent_dispensers/fueltank/blob_act(obj/structure/blob/B)