Makes the santa event properly poll ghosts (#31437)

* Makes the santa event properly poll ghosts

* Update xmas.dm

* Update xmas.dm

* Create event.dm

* Update tgstation.dme

* Update xmas.dm

* Update event.dm

* Update event.dm

* Update event.dm

* Update event.dm

* Update event.dm

* Update event.dm
This commit is contained in:
MoreRobustThanYou
2017-10-10 04:15:44 -04:00
committed by CitadelStationBot
parent eb9737912c
commit b05a4ebb29
3 changed files with 50 additions and 52 deletions
+31
View File
@@ -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)
+18 -52
View File
@@ -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, "<span class='boldannounce'>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.</span>")
to_chat(santa, "<span class='boldannounce'>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.</span>")