diff --git a/baystation12.dme b/baystation12.dme index cc4c98ac73f..b6f36cb6811 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -31,6 +31,7 @@ #define FILE_DIR "code/game/asteroid" #define FILE_DIR "code/game/events" #define FILE_DIR "code/game/events/EventProcs" +#define FILE_DIR "code/game/events/EventProcs/holidays" #define FILE_DIR "code/game/events/Events" #define FILE_DIR "code/game/gamemodes" #define FILE_DIR "code/game/gamemodes/autotraitor" @@ -405,6 +406,7 @@ #include "code\game\events\EventProcs\space_ninja.dm" #include "code\game\events\EventProcs\spacevines.dm" #include "code\game\events\EventProcs\wormholes.dm" +#include "code\game\events\EventProcs\holidays\Holidays.dm" #include "code\game\events\Events\AlienInfestation.dm" #include "code\game\events\Events\Appendicitis.dm" #include "code\game\events\Events\ElectricalStorm.dm" diff --git a/code/datums/configuration.dm b/code/datums/configuration.dm index 59c5c6543d9..733fd925b41 100644 --- a/code/datums/configuration.dm +++ b/code/datums/configuration.dm @@ -285,6 +285,10 @@ if("popup_admin_pm") config.popup_admin_pm = 1 + + if("allow_holidays") + Holiday = 1 + if("useircbot") useircbot = 1 diff --git a/code/defines/procs/station_name.dm b/code/defines/procs/station_name.dm index 4e230f315e3..5b9fab8d86b 100644 --- a/code/defines/procs/station_name.dm +++ b/code/defines/procs/station_name.dm @@ -3,15 +3,60 @@ return station_name var/name = "NSS Exodus" +/* + var/random = rand(1,5) + var/name = "" - station_name = name + //Rare: Pre-Prefix + if (prob(10)) + name = pick("Imperium", "Heretical", "Cuban", "Psychic", "Elegant", "Common", "Uncommon", "Rare", "Unique", "Houseruled", "Religious", "Atheist", "Traditional", "Houseruled", "Mad", "Super", "Ultra", "Secret", "Top Secret", "Deep", "Death", "Zybourne", "Central", "Main", "Government", "Uoi", "Fat", "Automated", "Experimental", "Augmented") + station_name = name + " " + + // Prefix + switch(Holiday) + //get normal name + if(null,"",0) + name = pick("", "Stanford", "Dorf", "Alium", "Prefix", "Clowning", "Aegis", "Ishimura", "Scaredy", "Death-World", "Mime", "Honk", "Rogue", "MacRagge", "Ultrameens", "Safety", "Paranoia", "Explosive", "Neckbear", "Donk", "Muppet", "North", "West", "East", "South", "Slant-ways", "Widdershins", "Rimward", "Expensive", "Procreatory", "Imperial", "Unidentified", "Immoral", "Carp", "Ork", "Pete", "Control", "Nettle", "Aspie", "Class", "Crab", "Fist","Corrogated","Skeleton","Race", "Fatguy", "Gentleman", "Capitalist", "Communist", "Bear", "Beard", "Derp", "Space", "Spess", "Star", "Moon", "System", "Mining", "Neckbeard", "Research", "Supply", "Military", "Orbital", "Battle", "Science", "Asteroid", "Home", "Production", "Transport", "Delivery", "Extraplanetary", "Orbital", "Correctional", "Robot", "Hats", "Pizza") + if(name) + station_name += name + " " + + //For special days like christmas, easter, new-years etc ~Carn + if("Friday the 13th") + name = pick("Mike","Friday","Evil","Myers","Murder","Deathly","Stabby") + station_name += name + " " + random = 13 + else + //get the first word of the Holiday and use that + var/i = findtext(Holiday," ",1,0) + name = copytext(Holiday,1,i) + station_name += name + " " + + // Suffix + name = pick("Station", "Fortress", "Frontier", "Suffix", "Death-trap", "Space-hulk", "Lab", "Hazard","Spess Junk", "Fishery", "No-Moon", "Tomb", "Crypt", "Hut", "Monkey", "Bomb", "Trade Post", "Fortress", "Village", "Town", "City", "Edition", "Hive", "Complex", "Base", "Facility", "Depot", "Outpost", "Installation", "Drydock", "Observatory", "Array", "Relay", "Monitor", "Platform", "Construct", "Hangar", "Prison", "Center", "Port", "Waystation", "Factory", "Waypoint", "Stopover", "Hub", "HQ", "Office", "Object", "Fortification", "Colony", "Planet-Cracker", "Roost", "Fat Camp") + station_name += name + " " + + // ID Number + switch(random) + if(1) + station_name += "[rand(1, 99)]" + if(2) + station_name += pick("Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta", "Iota", "Kappa", "Lambda", "Mu", "Nu", "Xi", "Omicron", "Pi", "Rho", "Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega") + if(3) + station_name += pick("II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV", "XV", "XVI", "XVII", "XVIII", "XIX", "XX") + if(4) + station_name += pick("Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel", "India", "Juliet", "Kilo", "Lima", "Mike", "November", "Oscar", "Papa", "Quebec", "Romeo", "Sierra", "Tango", "Uniform", "Victor", "Whiskey", "X-ray", "Yankee", "Zulu") + if(5) + station_name += pick("One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen") + if(13) + station_name += pick("13","XIII","Thirteen") +*/ if (config && config.server_name) world.name = "[config.server_name]: [name]" else world.name = "Baystation12" - return name + return station_name /proc/world_name(var/name) diff --git a/code/game/cellautomata.dm b/code/game/cellautomata.dm index b05d22e526d..5d5bbcc4d8a 100644 --- a/code/game/cellautomata.dm +++ b/code/game/cellautomata.dm @@ -88,6 +88,7 @@ if (config.usewhitelist) load_whitelist() LoadBansjob() + Get_Holiday() //~Carn, needs to be here when the station is named so :P src.update_status() makepowernets() diff --git a/code/game/events/EventProcs/holidays/AprilFools.dm b/code/game/events/EventProcs/holidays/AprilFools.dm new file mode 100644 index 00000000000..2b4a1008ff1 --- /dev/null +++ b/code/game/events/EventProcs/holidays/AprilFools.dm @@ -0,0 +1 @@ +//placeholder for holiday stuff \ No newline at end of file diff --git a/code/game/events/EventProcs/holidays/Christmas.dm b/code/game/events/EventProcs/holidays/Christmas.dm new file mode 100644 index 00000000000..2b4a1008ff1 --- /dev/null +++ b/code/game/events/EventProcs/holidays/Christmas.dm @@ -0,0 +1 @@ +//placeholder for holiday stuff \ No newline at end of file diff --git a/code/game/events/EventProcs/holidays/Easter.dm b/code/game/events/EventProcs/holidays/Easter.dm new file mode 100644 index 00000000000..2b4a1008ff1 --- /dev/null +++ b/code/game/events/EventProcs/holidays/Easter.dm @@ -0,0 +1 @@ +//placeholder for holiday stuff \ No newline at end of file diff --git a/code/game/events/EventProcs/holidays/Holidays.dm b/code/game/events/EventProcs/holidays/Holidays.dm new file mode 100644 index 00000000000..c9731d986b4 --- /dev/null +++ b/code/game/events/EventProcs/holidays/Holidays.dm @@ -0,0 +1,178 @@ +//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) return // Holiday stuff was not enabled in the config! + + 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(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(5) + if(YY == 15) Holiday = "Easter" + if(14) Holiday = "Pi Day" + 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 + + 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(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( !holder || !(holder.rank in list("Game Master","Game Admin")) ) + src << "Error: Set_Holiday: You hold insufficient rank to perform this action." + return + + if(!T) 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("\blue ADMIN: Event: [key_name(src)] force-set Holiday to \"[Holiday]\"") + log_admin("[key_name(src)] force-set Holiday to \"[Holiday]\"") + + +//Run at the start of a round +/proc/Holiday_Game_Start() + if(Holiday) + world << "and..." + world << "

Happy [Holiday] Everybody!

" + switch(Holiday) //special holidays + if("Easter") + //do easter stuff + if("Christmas ") + //do christmas stuff + else + //etc. you get what I'm getting at + 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("\blue DEBUG: Event: Egg spawned at [Egg.loc] ([Egg.x],[Egg.y],[Egg.z])")*/ \ No newline at end of file diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index dc2fe2e28cd..bd97bd3dae8 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -113,6 +113,8 @@ var/datum/roundinfo/roundinfo = new() spawn(-1) world << "Enjoy the game!" world << sound('welcome.ogg') // Skie + //Holiday Round-start stuff ~Carn + Holiday_Game_Start() spawn() supply_ticker() // Added to kick-off the supply shuttle regenerating points -- TLE diff --git a/code/game/objects/tank.dm b/code/game/objects/tank.dm index 883234bdb9a..beaa3b21a08 100644 --- a/code/game/objects/tank.dm +++ b/code/game/objects/tank.dm @@ -33,9 +33,9 @@ examine() set src in usr ..() - if(air_contents.oxygen < 1) + if(air_contents.oxygen < 1 && loc==usr) usr << text("\red The meter on the [src.name] indicates you are almost out of air!") - playsound(usr, 'alert.ogg', 50, 1) + usr << sound('alert.ogg') /obj/item/weapon/tank/plasma diff --git a/code/game/objects/tanks/emergency.dm b/code/game/objects/tanks/emergency.dm index fbadf6fca8e..0d767fd2700 100644 --- a/code/game/objects/tanks/emergency.dm +++ b/code/game/objects/tanks/emergency.dm @@ -18,10 +18,9 @@ examine() set src in usr ..() - if(air_contents.oxygen < 0.4) + if(air_contents.oxygen < 0.2 && loc==usr) usr << text("\red The meter on the [src.name] indicates you are almost out of air!") - playsound(usr, 'alert.ogg', 50, 1) - + usr << sound('alert.ogg') /obj/item/weapon/tank/emergency_oxygen/engi icon_state = "emergency_engi" diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 38e63dea1b0..b275958f043 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -256,6 +256,7 @@ verbs += /client/proc/toggle_gravity_off verbs += /client/proc/toggle_random_events verbs += /client/proc/deadmin_self + verbs += /client/proc/Set_Holiday //Force-set a Holiday //verbs += /client/proc/cmd_mass_modify_object_variables --Merged with view variables //verbs += /client/proc/cmd_admin_explosion --Merged with view variables //verbs += /client/proc/cmd_admin_emp --Merged with view variables @@ -416,6 +417,7 @@ verbs -= /client/proc/deadmin_self verbs -= /client/proc/jumptocoord verbs -= /client/proc/everyone_random + verbs -= /client/proc/Set_Holiday verbs -= /client/proc/cmd_admin_change_custom_event verbs -= /client/proc/admin_invis verbs -= /client/proc/callprocgen diff --git a/config/config.txt b/config/config.txt index c5c4c3fc147..cd1e8601b4a 100644 --- a/config/config.txt +++ b/config/config.txt @@ -143,5 +143,8 @@ GUEST_JOBBAN 1 ## The intention is to make adminPMs more visible. (although I fnd popups annoying so this defaults to off) #POPUP_ADMIN_PM +## Remove the # to allow special 'Easter-egg' events on special holidays such as seasonal holidays and stuff like 'Talk Like a Pirate Day' :3 YAARRR +#ALLOW_HOLIDAYS + ##What address should banned people appeal ther ban at? Remember to escape the characters, if needed! # APPEAL_ADDRESS -->APPEAL ADDRESS HERE<-- \ No newline at end of file