From 17654c608aaa307875825ac03cf1b482ea4f75d0 Mon Sep 17 00:00:00 2001 From: Ron Date: Sun, 14 May 2017 16:37:06 -0400 Subject: [PATCH] More Holidays (#2265) Adds more holidays and removes old ones. Also adds a little fun thing for Easter. --- baystation12.dme | 1 + code/game/gamemodes/events/holidays/Easter.dm | 18 ++++- .../gamemodes/events/holidays/Holidays.dm | 66 ++++++++----------- .../reagent_containers/food/snacks.dm | 15 +++++ 4 files changed, 59 insertions(+), 41 deletions(-) diff --git a/baystation12.dme b/baystation12.dme index 17eac17015a..f73d37e0116 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -394,6 +394,7 @@ #include "code\game\gamemodes\events\power_failure.dm" #include "code\game\gamemodes\events\wormholes.dm" #include "code\game\gamemodes\events\holidays\Christmas.dm" +#include "code\game\gamemodes\events\holidays\Easter.dm" #include "code\game\gamemodes\events\holidays\Holidays.dm" #include "code\game\gamemodes\events\holidays\Other.dm" #include "code\game\gamemodes\extended\extended.dm" diff --git a/code/game/gamemodes/events/holidays/Easter.dm b/code/game/gamemodes/events/holidays/Easter.dm index 2b4a1008ff1..5a662f3e313 100644 --- a/code/game/gamemodes/events/holidays/Easter.dm +++ b/code/game/gamemodes/events/holidays/Easter.dm @@ -1 +1,17 @@ -//placeholder for holiday stuff \ No newline at end of file +/proc/Easter_Game_Start() + Random_Egg() + +//Random egg +/proc/Random_Egg() + world << "

There is a golden egg hidden somewhere on the station...

" + var/list/Floorlist = list() + for(var/turf/simulated/floor/T in turfs) + if(T.contents) + Floorlist += T + var/turf/simulated/floor/F = Floorlist[rand(1,Floorlist.len)] + Floorlist = null + var/obj/structure/closet/C = locate(/obj/structure/closet) in F + if (C) + new /obj/item/weapon/reagent_containers/food/snacks/goldenegg(C) + else + new /obj/item/weapon/reagent_containers/food/snacks/goldenegg(F) diff --git a/code/game/gamemodes/events/holidays/Holidays.dm b/code/game/gamemodes/events/holidays/Holidays.dm index 1675a9aaee5..15f3b7ffb4d 100644 --- a/code/game/gamemodes/events/holidays/Holidays.dm +++ b/code/game/gamemodes/events/holidays/Holidays.dm @@ -31,36 +31,33 @@ var/global/Holiday = null if(1) //Jan switch(DD) if(1) Holiday = "New Year's Day" + if(10) Holiday = "Houseplant Appreciation Day" + if(25) Holiday = "Opposite Day" if(2) //Feb switch(DD) if(2) Holiday = "Groundhog Day" if(14) Holiday = "Valentine's Day" if(17) Holiday = "Random Acts of Kindness Day" + if(29) Holiday = "Leap Day" + if(3) //Mar switch(DD) if(14) Holiday = "Pi Day" if(17) Holiday = "St. Patrick's Day" - if(27) - if(YY == 16) - Holiday = "Easter" - if(31) - if(YY == 13) - Holiday = "Easter" + if(20) Holiday = "Spring Vernal Equinox" if(4) //Apr switch(DD) - if(1) + if(1) Holiday = "April Fool's Day" if(YY == 18 && prob(50)) Holiday = "Easter" - if(5) - if(YY == 15) Holiday = "Easter" - if(16) - if(YY == 17) Holiday = "Easter" - if(20) - Holiday = "Four-Twenty" - if(YY == 14 && prob(50)) Holiday = "Easter" + if(12) + if(YY == 20) Holiday = "Easter" + if(20) Holiday = "Four-Twenty" + if(21) + if(YY == 19) Holiday = "Easter" if(22) Holiday = "Earth Day" if(5) //May @@ -70,17 +67,29 @@ var/global/Holiday = null if(12) Holiday = "Owl and Pussycat Day" //what a dumb day of observence...but we -do- have costumes already :3 if(6) //Jun - + switch(DD) + if(1) Holiday = "Flip a Coin Day" + if(8) Holiday = "Best Friends Day" + if(20) + if(YY == 20) Holiday = "Summer Solstice" + if(21) + if(YY == (18 || 19)) Holiday = "Summer Solstice" + if(7) //Jul switch(DD) if(1) Holiday = "Doctor's Day" if(2) Holiday = "UFO Day" + if(5) Holiday = "National Bikini Day" if(8) Holiday = "Writer's Day" + if(22) Holiday = "Hammock Day" if(30) Holiday = "Friendship Day" if(8) //Aug switch(DD) + if(3) Holiday = "Watermelon day" if(5) Holiday = "Beer Day" + if(10) Holiday = "National S'mores Day'" + if(13) Holiday = "Left Hander's Day" if(9) //Sep switch(DD) @@ -105,7 +114,6 @@ var/global/Holiday = null switch(DD) if(10) Holiday = "Human-Rights Day" if(14) Holiday = "Monkey Day" - if(21) if(YY==12) Holiday = "End of the World" if(22) Holiday = "Orgasming Day" //lol. These all actually exist if(24) Holiday = "Christmas Eve" if(25) Holiday = "Christmas" @@ -144,39 +152,17 @@ var/global/Holiday = null world << "

Happy [Holiday] Everybody!

" switch(Holiday) //special holidays if("Easter") - //do easter stuff + Easter_Game_Start() if("Christmas Eve","Christmas") Christmas_Game_Start() return -//Nested in the random events loop. Will be triggered every 2 minutes +//Nested in the random events loop. Will be triggered every 2 minutes. /proc/Holiday_Random_Event() switch(Holiday) //special holidays if("",null) //no Holiday today! Back to work! return - - if("Easter") //I'll make this into some helper procs at some point -/* var/list/turf/simulated/floor/Floorlist = list() - for(var/turf/simulated/floor/T) - if(T.contents) - Floorlist += T - var/turf/simulated/floor/F = Floorlist[rand(1,Floorlist.len)] - Floorlist = null - var/obj/structure/closet/C = locate(/obj/structure/closet) in F - var/obj/item/weapon/reagent_containers/food/snacks/chocolateegg/wrapped/Egg - if( C ) Egg = new(C) - else Egg = new(F) -*/ -/* var/list/obj/containers = list() - for(var/obj/item/weapon/storage/S in world) - if(isNotStationLevel(S.z)) continue - containers += S - - message_admins("DEBUG: Event: Egg spawned at [Egg.loc] ([Egg.x],[Egg.y],[Egg.z])")*/ - if("End of the World") - if(prob(eventchance)) GameOver() - if("Christmas","Christmas Eve") if(prob(eventchance)) ChristmasEvent() diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 10f6fbcb830..5161efb7882 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -530,6 +530,21 @@ reagents.add_reagent("coco", 2) bitesize = 2 +//a random egg that can spawn only on easter. It has really good food values because it's rare +/obj/item/weapon/reagent_containers/food/snacks/goldenegg + name = "golden egg" + desc = "It's the golden egg!" + icon_state = "goldenegg" + filling_color = "#7D5F46" + center_of_mass = list("x"=16, "y"=13) + +/obj/item/weapon/reagent_containers/food/snacks/goldenegg/New() + ..() + reagents.add_reagent("nutriment", 12) + reagents.add_reagent("sugar", 7) + reagents.add_reagent("coco", 3) + bitesize = 6 + /obj/item/weapon/reagent_containers/food/snacks/donut name = "donut" desc = "Goes great with Robust Coffee."