Files
vgstation13/code/game/gamemodes/events/holidays/Holidays.dm
D3athrow 01d2471fc9 Merge branch 'color_replace_2_electric_boogaloo' into Bleeding-Edge
Conflicts:
	code/ATMOSPHERICS/pipe/pipe_dispenser.dm
	code/game/machinery/computer/HolodeckControl.dm
	code/game/machinery/embedded_controller/embedded_controller_base.dm
	code/modules/mining/money_bag.dm
	code/modules/mob/living/carbon/carbon.dm
	code/modules/mob/living/silicon/mommi/mommi.dm
	code/modules/mob/living/simple_animal/friendly/farm_animals.dm
	code/modules/research/destructive_analyzer.dm
	code/modules/research/rdconsole.dm
	code/modules/research/xenoarchaeology/machinery/analysis_base.dm
	code/modules/research/xenoarchaeology/machinery/artifact_harvester.dm
	code/modules/research/xenoarchaeology/tools/ano_device_battery.dm
2015-04-12 16:40:59 -05:00

228 lines
6.3 KiB
Plaintext

//Uncommenting ALLOW_HOLIDAYS in config.txt will enable Holidays
var/global/Holiday = null
//Just thinking ahead! Here's the foundations to a more robust Holiday event system.
//It's easy as hell to add stuff. Just set Holiday to something using the switch (or something else)
//then use if(Holiday == "MyHoliday") to make stuff happen on that specific day only
//Please, Don't spam stuff up with easter eggs, I'd rather somebody just delete this than people cause
//the game to lag even more in the name of one-day content.
//////////////////////////////////////////////////////////////////////////////////////////////////////////
//ALSO, MOST IMPORTANTLY: Don't add stupid stuff! Discuss bonus content with Project-Heads first please!//
//////////////////////////////////////////////////////////////////////////////////////////////////////////
// ~Carn
// sets up the Holiday global variable. Shouldbe called on game configuration or something.
/proc/Get_Holiday()
if(!Holiday) // Holiday stuff was not enabled in the config!
return
Holiday = null // reset our switch now so we can recycle it as our Holiday name
var/YY = text2num(time2text(world.timeofday, "YY")) // get the current year
var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
// Main switch. If any of these are too dumb/inappropriate, or you have better ones, feel free to change whatever
switch(MM)
if(1) // Jan
switch(DD)
if(1)
Holiday = "New Year's 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(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(4) // Apr
switch(DD)
if(1)
Holiday = "April Fool's Day"
if(YY == 18 && prob(50))
Holiday = "Easter"
if(2)
Holiday = "Autism Awareness Day"
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(22)
Holiday = "Earth Day"
if(5) // May
switch(DD)
if(1)
Holiday = "Labour Day"
if(4)
Holiday = "FireFighter's Day"
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(18)
Holiday = "International Picnic Day"
if(21)
Holiday = "Summer Solstice" // its not always the 21 but sue me
if(7) // Jul
switch(DD)
if(1)
Holiday = "Doctor's Day"
if(2)
Holiday = "UFO Day"
if(8)
Holiday = "Writer's Day"
if(30)
Holiday = "Friendship Day"
if(8) // Aug
switch(DD)
if(5)
Holiday = "Beer Day"
if(9) // Sep
switch(DD)
if(19)
Holiday = "Talk-Like-a-Pirate Day"
if(28)
Holiday = "Stupid-Questions Day"
if(10) // Oct
switch(DD)
if(4)
Holiday = "Animal's Day"
if(7)
Holiday = "Smiling Day"
if(16)
Holiday = "Boss' Day"
if(31)
Holiday = "Halloween"
if(11) // Nov
switch(DD)
if(1)
Holiday = "Vegan Day"
if(13)
Holiday = "Kindness Day"
if(19)
Holiday = "Flowers Day"
if(21)
Holiday = "Saying-'Hello' Day"
if(12) // Dec
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"
if(26)
Holiday = "Boxing Day"
if(31)
Holiday = "New Year's Eve"
if(!Holiday)
// Friday the 13th
if(DD == 13)
if(time2text(world.timeofday, "DDD") == "Fri")
Holiday = "Friday the 13th"
//Allows GA and GM to set the Holiday variable
/client/proc/Set_Holiday(T as text|null)
set name = ".Set Holiday"
set category = "Fun"
set desc = "Force-set the Holiday variable to make the game think it's a certain day."
if(!check_rights(R_SERVER))
return
Holiday = T
//get a new station name
station_name = null
station_name()
//update our hub status
world.update_status()
Holiday_Game_Start()
message_admins("<span class='notice'>ADMIN: Event: [key_name(src)] force-set Holiday to \"[Holiday]\"</span>")
log_admin("[key_name(src)] force-set Holiday to \"[Holiday]\"")
// Run at the start of a round
/proc/Holiday_Game_Start()
if(Holiday)
world << "<font color='blue'>and...</font>"
if(Holiday == "Autism Awareness Day")
world << "<h4>Happy <span class='sans'>Autism Awareness Day</span> Everybody!</h4>" // Together we can finish the puzzle.
else
world << "<h4>Happy [Holiday] Everybody!</h4>"
switch(Holiday) // special holidays
if("Easter")
//do easter stuff
if("Christmas Eve","Christmas")
Christmas_Game_Start()
return
// 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(S.z != 1) continue
containers += S
message_admins("<span class='notice'>DEBUG: Event: Egg spawned at [Egg.loc] ([Egg.x],[Egg.y],[Egg.z])</span>")*/
if("End of the World")
if(prob(eventchance)) GameOver()
if("Christmas","Christmas Eve")
if(prob(eventchance)) ChristmasEvent()