mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-09 16:05:07 +00:00
[MIRROR] Restores drone holiday headwear and extends it to assistants [MDB IGNORE] (#23813)
* Restores drone holiday headwear and extends it to assistants (#78347) ## About The Pull Request drone_hat defined a piece of headwear that drones would spawn with when the corresponding holiday is active. While peeking at holiday code for my own amusement, I noticed that it wasn't actually used anywhere and must have become deprecated at some point. I have re-implemented that functionality, and extended it to assistants. Now, all drones/assistants spawning without headwear during a holiday will receive the holiday's defined holiday_hat (if there is one). This modifies a few of the holiday_hat entries, particularly the mask entries since the new system is head-only, and adds a few more in there as well.  There's probably some balance implications to, say, spawning all the assistants with fire helmets or pirate bandanas, but I see that as being balanced out by the infrequency of these cases. ## Why It's Good For The Game Restores an piece of drone code that fell off the wagon somewhere amongst the removals and reworks. As for implementing it for assistants, seeing assistants in funny hats makes me laugh a lil bit :) ## Changelog 🆑 Rhials qol: Restores holiday hats for drones. qol: Extends holiday hat behavior to assistants. Get festive! /🆑 * Restores drone holiday headwear and extends it to assistants --------- Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com>
This commit is contained in:
1
code/__DEFINES/holiday.dm
Normal file
1
code/__DEFINES/holiday.dm
Normal file
@@ -0,0 +1 @@
|
||||
#define HOLIDAY_HAT_CHANCE 20
|
||||
@@ -18,8 +18,8 @@
|
||||
var/year_offset = 0
|
||||
///Timezones this holiday is celebrated in (defaults to three timezones spanning a 50 hour window covering all timezones)
|
||||
var/list/timezones = list(TIMEZONE_LINT, TIMEZONE_UTC, TIMEZONE_ANYWHERE_ON_EARTH)
|
||||
///If this is defined, drones without a default hat will spawn with this one during the holiday; check drones_as_items.dm to see this used
|
||||
var/obj/item/drone_hat
|
||||
///If this is defined, drones/assistants without a default hat will spawn with this item in their head clothing slot.
|
||||
var/obj/item/holiday_hat
|
||||
///When this holiday is active, does this prevent mail from arriving to cargo? Try not to use this for longer holidays.
|
||||
var/mail_holiday = FALSE
|
||||
var/poster_name = "generic celebration poster"
|
||||
@@ -109,6 +109,7 @@
|
||||
name = "Fleet Day"
|
||||
begin_month = JANUARY
|
||||
begin_day = 19
|
||||
holiday_hat = /obj/item/clothing/head/mothcap
|
||||
|
||||
/datum/holiday/fleet_day/greet()
|
||||
return "This day commemorates another year of successful survival aboard the Mothic Grand Nomad Fleet. Moths galaxywide are encouraged to eat, drink, and be merry."
|
||||
@@ -155,7 +156,7 @@
|
||||
name = "Birthday of Space Station 13"
|
||||
begin_day = 16
|
||||
begin_month = FEBRUARY
|
||||
drone_hat = /obj/item/clothing/head/costume/festive
|
||||
holiday_hat = /obj/item/clothing/head/costume/festive
|
||||
poster_name = "station birthday poster"
|
||||
poster_desc = "A poster celebrating another year of the station's operation. Why anyone would be happy to be here is byond you."
|
||||
poster_icon = "holiday_cake" // is a lie
|
||||
@@ -220,7 +221,7 @@
|
||||
name = "St. Patrick's Day"
|
||||
begin_day = 17
|
||||
begin_month = MARCH
|
||||
drone_hat = /obj/item/clothing/head/soft/green
|
||||
holiday_hat = /obj/item/clothing/head/soft/green
|
||||
|
||||
/datum/holiday/no_this_is_patrick/getStationPrefix()
|
||||
return pick("Blarney","Green","Leprechaun","Booze")
|
||||
@@ -235,6 +236,7 @@
|
||||
begin_month = APRIL
|
||||
begin_day = 1
|
||||
end_day = 2
|
||||
holiday_hat = /obj/item/clothing/head/chameleon/broken
|
||||
|
||||
/datum/holiday/april_fools/celebrate()
|
||||
. = ..()
|
||||
@@ -252,7 +254,7 @@
|
||||
name = "Cosmonautics Day"
|
||||
begin_day = 12
|
||||
begin_month = APRIL
|
||||
drone_hat = /obj/item/clothing/head/syndicatefake
|
||||
holiday_hat = /obj/item/clothing/head/syndicatefake
|
||||
|
||||
/datum/holiday/spess/greet()
|
||||
return "On this day over 600 years ago, Comrade Yuri Gagarin first ventured into space!"
|
||||
@@ -261,6 +263,7 @@
|
||||
name = "Four-Twenty"
|
||||
begin_day = 20
|
||||
begin_month = APRIL
|
||||
holiday_hat = /obj/item/clothing/head/rasta
|
||||
|
||||
/datum/holiday/fourtwenty/getStationPrefix()
|
||||
return pick("Snoop","Blunt","Toke","Dank","Cheech","Chong")
|
||||
@@ -283,7 +286,7 @@
|
||||
timezones = list(TIMEZONE_TKT, TIMEZONE_TOT, TIMEZONE_NZST, TIMEZONE_NFT, TIMEZONE_LHST, TIMEZONE_AEST, TIMEZONE_ACST, TIMEZONE_ACWST, TIMEZONE_AWST, TIMEZONE_CXT, TIMEZONE_CCT, TIMEZONE_CKT, TIMEZONE_NUT)
|
||||
begin_day = 25
|
||||
begin_month = APRIL
|
||||
drone_hat = /obj/item/food/grown/poppy
|
||||
holiday_hat = /obj/item/food/grown/poppy
|
||||
|
||||
/datum/holiday/anz/getStationPrefix()
|
||||
return pick("Australian","New Zealand","Poppy", "Southern Cross")
|
||||
@@ -294,7 +297,7 @@
|
||||
name = "Labor Day"
|
||||
begin_day = 1
|
||||
begin_month = MAY
|
||||
drone_hat = /obj/item/clothing/head/utility/hardhat
|
||||
holiday_hat = /obj/item/clothing/head/utility/hardhat
|
||||
mail_holiday = TRUE
|
||||
|
||||
//Draconic Day is celebrated on May 3rd, the date on which the Draconic language was merged (#26780)
|
||||
@@ -313,7 +316,7 @@
|
||||
name = "Firefighter's Day"
|
||||
begin_day = 4
|
||||
begin_month = MAY
|
||||
drone_hat = /obj/item/clothing/head/utility/hardhat/red
|
||||
holiday_hat = /obj/item/clothing/head/utility/hardhat/red
|
||||
|
||||
/datum/holiday/firefighter/getStationPrefix()
|
||||
return pick("Burning","Blazing","Plasma","Fire")
|
||||
@@ -322,7 +325,6 @@
|
||||
name = "Bee Day"
|
||||
begin_day = 20
|
||||
begin_month = MAY
|
||||
drone_hat = /obj/item/clothing/mask/animal/small/bee
|
||||
|
||||
/datum/holiday/bee/getStationPrefix()
|
||||
return pick("Bee","Honey","Hive","Africanized","Mead","Buzz")
|
||||
@@ -355,6 +357,7 @@
|
||||
name = "Summer Solstice"
|
||||
begin_day = 21
|
||||
begin_month = JUNE
|
||||
holiday_hat = /obj/item/clothing/head/costume/garland
|
||||
|
||||
/datum/holiday/pride_week
|
||||
name = PRIDE_WEEK
|
||||
@@ -377,13 +380,13 @@
|
||||
name = "Doctor's Day"
|
||||
begin_day = 1
|
||||
begin_month = JULY
|
||||
drone_hat = /obj/item/clothing/head/costume/nursehat
|
||||
holiday_hat = /obj/item/clothing/head/costume/nursehat
|
||||
|
||||
/datum/holiday/ufo
|
||||
name = "UFO Day"
|
||||
begin_day = 2
|
||||
begin_month = JULY
|
||||
drone_hat = /obj/item/clothing/mask/facehugger/dead
|
||||
holiday_hat = /obj/item/clothing/head/collectable/xenom
|
||||
|
||||
/datum/holiday/ufo/getStationPrefix() //Is such a thing even possible?
|
||||
return pick("Ayy","Truth","Tsoukalos","Mulder","Scully") //Yes it is!
|
||||
@@ -394,6 +397,7 @@
|
||||
begin_day = 4
|
||||
begin_month = JULY
|
||||
mail_holiday = TRUE
|
||||
holiday_hat = /obj/item/clothing/head/cowboy/brown
|
||||
|
||||
/datum/holiday/usa/getStationPrefix()
|
||||
return pick("Independent","American","Burger","Bald Eagle","Star-Spangled", "Fireworks")
|
||||
@@ -408,7 +412,7 @@
|
||||
timezones = list(TIMEZONE_CEST)
|
||||
begin_day = 14
|
||||
begin_month = JULY
|
||||
drone_hat = /obj/item/clothing/head/beret
|
||||
holiday_hat = /obj/item/clothing/head/beret
|
||||
mail_holiday = TRUE
|
||||
|
||||
/datum/holiday/france/getStationPrefix()
|
||||
@@ -430,7 +434,7 @@
|
||||
name = "Wizard's Day"
|
||||
begin_month = JULY
|
||||
begin_day = 27
|
||||
drone_hat = /obj/item/clothing/head/wizard
|
||||
holiday_hat = /obj/item/clothing/head/wizard
|
||||
|
||||
/datum/holiday/wizards_day/getStationPrefix()
|
||||
return pick("Dungeon", "Elf", "Magic", "D20", "Edition")
|
||||
@@ -470,6 +474,7 @@
|
||||
name = "Tiziran Unification Day"
|
||||
begin_month = SEPTEMBER
|
||||
begin_day = 1
|
||||
holiday_hat = /obj/item/clothing/head/costume/lizard
|
||||
|
||||
/datum/holiday/tiziran_unification/greet()
|
||||
return "On this day over 400 years ago, Lizardkind first united under a single banner, ready to face the stars as one unified people."
|
||||
@@ -493,7 +498,7 @@
|
||||
name = "Talk-Like-a-Pirate Day"
|
||||
begin_day = 19
|
||||
begin_month = SEPTEMBER
|
||||
drone_hat = /obj/item/clothing/head/costume/pirate
|
||||
holiday_hat = /obj/item/clothing/head/costume/pirate
|
||||
|
||||
/datum/holiday/pirate/greet()
|
||||
return "Ye be talkin' like a pirate today or else ye'r walkin' tha plank, matey!"
|
||||
@@ -523,13 +528,13 @@
|
||||
name = "Smiling Day"
|
||||
begin_day = 7
|
||||
begin_month = OCTOBER
|
||||
drone_hat = /obj/item/clothing/head/costume/papersack/smiley
|
||||
holiday_hat = /obj/item/clothing/head/costume/papersack/smiley
|
||||
|
||||
/datum/holiday/boss
|
||||
name = "Boss' Day"
|
||||
begin_day = 16
|
||||
begin_month = OCTOBER
|
||||
drone_hat = /obj/item/clothing/head/hats/tophat
|
||||
holiday_hat = /obj/item/clothing/head/hats/tophat
|
||||
|
||||
/datum/holiday/un_day
|
||||
name = "Anniversary of the Foundation of the United Nations"
|
||||
@@ -578,7 +583,7 @@
|
||||
name = "Remembrance Day"
|
||||
begin_month = NOVEMBER
|
||||
begin_day = 11
|
||||
drone_hat = /obj/item/food/grown/poppy
|
||||
holiday_hat = /obj/item/food/grown/poppy
|
||||
|
||||
/datum/holiday/remembrance_day/getStationPrefix()
|
||||
return pick("Peace", "Armistice", "Poppy")
|
||||
@@ -600,7 +605,7 @@
|
||||
name = "Flowers Day"
|
||||
begin_day = 19
|
||||
begin_month = NOVEMBER
|
||||
drone_hat = /obj/item/food/grown/moonflower
|
||||
holiday_hat = /obj/item/food/grown/moonflower
|
||||
|
||||
/datum/holiday/hello
|
||||
name = "Saying-'Hello' Day"
|
||||
@@ -629,7 +634,7 @@
|
||||
begin_day = 1
|
||||
begin_month = DECEMBER
|
||||
end_day = 31
|
||||
drone_hat = /obj/item/clothing/head/costume/santa
|
||||
holiday_hat = /obj/item/clothing/head/costume/santa
|
||||
|
||||
/datum/holiday/festive_season/greet()
|
||||
return "Have a nice festive season!"
|
||||
@@ -643,20 +648,18 @@
|
||||
name = MONKEYDAY
|
||||
begin_day = 14
|
||||
begin_month = DECEMBER
|
||||
drone_hat = /obj/item/clothing/mask/gas/monkeymask
|
||||
|
||||
/datum/holiday/doomsday
|
||||
name = "Mayan Doomsday Anniversary"
|
||||
begin_day = 21
|
||||
begin_month = DECEMBER
|
||||
drone_hat = /obj/item/clothing/mask/animal/small/tribal
|
||||
|
||||
/datum/holiday/xmas
|
||||
name = CHRISTMAS
|
||||
begin_day = 23
|
||||
begin_month = DECEMBER
|
||||
end_day = 27
|
||||
drone_hat = /obj/item/clothing/head/costume/santa
|
||||
holiday_hat = /obj/item/clothing/head/costume/santa
|
||||
mail_holiday = TRUE
|
||||
|
||||
/datum/holiday/xmas/getStationPrefix()
|
||||
@@ -693,7 +696,7 @@
|
||||
begin_month = DECEMBER
|
||||
end_day = 2
|
||||
end_month = JANUARY
|
||||
drone_hat = /obj/item/clothing/head/costume/festive
|
||||
holiday_hat = /obj/item/clothing/head/costume/festive
|
||||
mail_holiday = TRUE
|
||||
|
||||
/datum/holiday/new_year/getStationPrefix()
|
||||
@@ -808,7 +811,7 @@
|
||||
|
||||
/datum/holiday/easter
|
||||
name = EASTER
|
||||
drone_hat = /obj/item/clothing/head/costume/rabbitears
|
||||
holiday_hat = /obj/item/clothing/head/costume/rabbitears
|
||||
var/const/days_early = 1 //to make editing the holiday easier
|
||||
var/const/days_extra = 1
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
begin_week = 4
|
||||
begin_month = NOVEMBER
|
||||
begin_weekday = THURSDAY
|
||||
drone_hat = /obj/item/clothing/head/hats/tophat //This is the closest we can get to a pilgrim's hat
|
||||
holiday_hat = /obj/item/clothing/head/hats/tophat //This is the closest we can get to a pilgrim's hat
|
||||
|
||||
/datum/holiday/nth_week/thanksgiving/canada
|
||||
name = "Thanksgiving in Canada"
|
||||
|
||||
@@ -48,6 +48,12 @@ Assistant
|
||||
|
||||
/datum/outfit/job/assistant/pre_equip(mob/living/carbon/human/target)
|
||||
..()
|
||||
for(var/holidayname in GLOB.holidays)
|
||||
var/datum/holiday/holiday_today = GLOB.holidays[holidayname]
|
||||
var/obj/item/special_hat = holiday_today.holiday_hat
|
||||
if(prob(HOLIDAY_HAT_CHANCE) && !isnull(special_hat) && isnull(head))
|
||||
head = special_hat
|
||||
|
||||
give_jumpsuit(target)
|
||||
|
||||
/datum/outfit/job/assistant/proc/give_jumpsuit(mob/living/carbon/human/target)
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
/// Default [/mob/living/simple_animal/drone/var/internal_storage] item
|
||||
var/obj/item/default_storage = /obj/item/storage/drone_tools
|
||||
/// Default [/mob/living/simple_animal/drone/var/head] item
|
||||
var/obj/item/default_hatmask
|
||||
var/obj/item/default_headwear
|
||||
/**
|
||||
* icon_state of drone from icons/mobs/drone.dmi
|
||||
*
|
||||
@@ -181,9 +181,16 @@
|
||||
if(default_storage)
|
||||
var/obj/item/I = new default_storage(src)
|
||||
equip_to_slot_or_del(I, ITEM_SLOT_DEX_STORAGE)
|
||||
if(default_hatmask)
|
||||
var/obj/item/I = new default_hatmask(src)
|
||||
equip_to_slot_or_del(I, ITEM_SLOT_HEAD)
|
||||
|
||||
for(var/holiday_name in GLOB.holidays)
|
||||
var/datum/holiday/holiday_today = GLOB.holidays[holiday_name]
|
||||
var/obj/item/potential_hat = holiday_today.holiday_hat
|
||||
if(!isnull(potential_hat) && isnull(default_headwear)) //If our drone type doesn't start with a hat, we take the holiday one.
|
||||
default_headwear = potential_hat
|
||||
|
||||
if(default_headwear)
|
||||
var/obj/item/new_hat = new default_headwear(src)
|
||||
equip_to_slot_or_del(new_hat, ITEM_SLOT_HEAD)
|
||||
|
||||
ADD_TRAIT(access_card, TRAIT_NODROP, ABSTRACT_ITEM_TRAIT)
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"2. Kill.\n"+\
|
||||
"3. Destroy."
|
||||
default_storage = /obj/item/uplink
|
||||
default_hatmask = /obj/item/clothing/head/helmet/swat
|
||||
default_headwear = /obj/item/clothing/head/helmet/swat
|
||||
hacked = TRUE
|
||||
shy = FALSE
|
||||
flavortext = null
|
||||
@@ -49,7 +49,7 @@
|
||||
W.implant(src, force = TRUE)
|
||||
|
||||
/mob/living/simple_animal/drone/snowflake
|
||||
default_hatmask = /obj/item/clothing/head/chameleon/drone
|
||||
default_headwear = /obj/item/clothing/head/chameleon/drone
|
||||
|
||||
/mob/living/simple_animal/drone/snowflake/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
/mob/living/simple_animal/drone/polymorphed
|
||||
default_storage = null
|
||||
default_hatmask = null
|
||||
default_headwear = null
|
||||
picked = TRUE
|
||||
flavortext = null
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
/mob/living/simple_animal/drone/derelict
|
||||
name = "derelict drone"
|
||||
default_hatmask = /obj/item/clothing/head/costume/ushanka
|
||||
default_headwear = /obj/item/clothing/head/costume/ushanka
|
||||
laws = \
|
||||
"1. You may not involve yourself in the matters of another sentient being outside the station that housed your activation, even if such matters conflict with Law Two or Law Three, unless the other being is another Drone.\n"+\
|
||||
"2. You may not harm any sentient being, regardless of intent or circumstance.\n"+\
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
#include "code\__DEFINES\ghost.dm"
|
||||
#include "code\__DEFINES\gravity.dm"
|
||||
#include "code\__DEFINES\guardian_defines.dm"
|
||||
#include "code\__DEFINES\holiday.dm"
|
||||
#include "code\__DEFINES\holopads.dm"
|
||||
#include "code\__DEFINES\hud.dm"
|
||||
#include "code\__DEFINES\icon_smoothing.dm"
|
||||
|
||||
Reference in New Issue
Block a user