diff --git a/code/modules/clothing/outfits/event.dm b/code/modules/clothing/outfits/event.dm new file mode 100644 index 0000000000..72edf7a358 --- /dev/null +++ b/code/modules/clothing/outfits/event.dm @@ -0,0 +1,31 @@ +/datum/outfit/santa //ho ho ho! + name = "Santa Claus" + + uniform = /obj/item/clothing/under/color/red + shoes = /obj/item/clothing/shoes/sneakers/red + suit = /obj/item/clothing/suit/space/santa + head = /obj/item/clothing/head/santa + back = /obj/item/storage/backpack/santabag + mask = /obj/item/clothing/mask/breath + r_pocket = /obj/item/device/flashlight + gloves = /obj/item/clothing/gloves/color/red + belt = /obj/item/tank/internals/emergency_oxygen/double + id = /obj/item/card/id/gold + +/datum/outfit/santa/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + if(visualsOnly) + return + H.fully_replace_character_name(H.real_name, "Santa Claus") + H.mind.assigned_role = "Santa" + H.mind.special_role = "Santa" + + H.hair_style = "Long Hair" + H.facial_hair_style = "Full Beard" + H.hair_color = "FFF" + H.facial_hair_color = "FFF" + + var/obj/item/storage/backpack/bag = H.back + var/obj/item/a_gift/gift = new(H) + while(bag.can_be_inserted(gift, 1)) + bag.handle_item_insertion(gift, 1) + gift = new(H) diff --git a/code/modules/events/holiday/xmas.dm b/code/modules/events/holiday/xmas.dm index bc2b3c2666..df3fc518d0 100644 --- a/code/modules/events/holiday/xmas.dm +++ b/code/modules/events/holiday/xmas.dm @@ -109,58 +109,24 @@ priority_announce("Santa is coming to town!", "Unknown Transmission") /datum/round_event/santa/start() - for(var/mob/M in GLOB.dead_mob_list) - spawn(0) - var/response = alert(M, "Santa is coming to town! Do you want to be santa?", "Ho ho ho!", "Yes", "No") - if(response == "Yes" && M && M.client && M.stat == DEAD && !santa) - santa = new /mob/living/carbon/human(pick(GLOB.blobstart)) - santa.key = M.key - qdel(M) + var/list/candidates = pollGhostCandidates("Santa is coming to town! Do you want to be santa?", poll_time=150) + if(LAZYLEN(candidates)) + var/mob/dead/observer/Z = pick(candidates) + santa = new /mob/living/carbon/human(pick(GLOB.blobstart)) + santa.key = Z.key + qdel(Z) - santa.real_name = "Santa Claus" - santa.name = "Santa Claus" - santa.mind.name = "Santa Claus" - santa.mind.assigned_role = "Santa" - santa.mind.special_role = "Santa" + santa.equipOutfit(/datum/outfit/santa) + santa.update_icons() - santa.hair_style = "Long Hair" - santa.facial_hair_style = "Full Beard" - santa.hair_color = "FFF" - santa.facial_hair_color = "FFF" + var/datum/objective/santa_objective = new() + santa_objective.explanation_text = "Bring joy and presents to the station!" + santa_objective.completed = 1 //lets cut our santas some slack. + santa_objective.owner = santa.mind + santa.mind.objectives += santa_objective + santa.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/presents) + var/obj/effect/proc_holder/spell/targeted/area_teleport/teleport/telespell = new(santa) + telespell.clothes_req = 0 //santa robes aren't actually magical. + santa.mind.AddSpell(telespell) //does the station have chimneys? WHO KNOWS! - santa.equip_to_slot_or_del(new /obj/item/clothing/under/color/red, slot_w_uniform) - santa.equip_to_slot_or_del(new /obj/item/clothing/suit/space/santa, slot_wear_suit) - santa.equip_to_slot_or_del(new /obj/item/clothing/head/santa, slot_head) - santa.equip_to_slot_or_del(new /obj/item/clothing/mask/breath, slot_wear_mask) - santa.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/red, slot_gloves) - santa.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/red, slot_shoes) - santa.equip_to_slot_or_del(new /obj/item/tank/internals/emergency_oxygen/double, slot_belt) - santa.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain, slot_ears) - santa.equip_to_slot_or_del(new /obj/item/storage/backpack/santabag, slot_back) - santa.equip_to_slot_or_del(new /obj/item/device/flashlight, slot_r_store) //most blob spawn locations are really dark. - - var/obj/item/card/id/gold/santacard = new(santa) - santacard.update_label("Santa Claus", "Santa") - var/datum/job/captain/J = new/datum/job/captain - santacard.access = J.get_access() - santa.equip_to_slot_or_del(santacard, slot_wear_id) - - santa.update_icons() - - var/obj/item/storage/backpack/bag = santa.back - var/obj/item/a_gift/gift = new(santa) - while(bag.can_be_inserted(gift, 1)) - bag.handle_item_insertion(gift, 1) - gift = new(santa) - - var/datum/objective/santa_objective = new() - santa_objective.explanation_text = "Bring joy and presents to the station!" - santa_objective.completed = 1 //lets cut our santas some slack. - santa_objective.owner = santa.mind - santa.mind.objectives += santa_objective - santa.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/presents) - var/obj/effect/proc_holder/spell/targeted/area_teleport/teleport/telespell = new(santa) - telespell.clothes_req = 0 //santa robes aren't actually magical. - santa.mind.AddSpell(telespell) //does the station have chimneys? WHO KNOWS! - - to_chat(santa, "You are Santa! Your objective is to bring joy to the people on this station. You can conjure more presents using a spell, and there are several presents in your bag.") + to_chat(santa, "You are Santa! Your objective is to bring joy to the people on this station. You can conjure more presents using a spell, and there are several presents in your bag.") diff --git a/tgstation.dme b/tgstation.dme index bf2aaf2732..383f6aab9b 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -1275,6 +1275,7 @@ #include "code\modules\clothing\masks\vg_masks.dm" #include "code\modules\clothing\neck\neck.dm" #include "code\modules\clothing\outfits\ert.dm" +#include "code\modules\clothing\outfits\event.dm" #include "code\modules\clothing\outfits\standard.dm" #include "code\modules\clothing\shoes\bananashoes.dm" #include "code\modules\clothing\shoes\colour.dm"