Adds Morph Spawn event

This commit is contained in:
Heroman
2020-01-11 20:15:10 +10:00
parent 24da40a882
commit 43760db7dd
14 changed files with 281 additions and 127 deletions
+1
View File
@@ -49,6 +49,7 @@
var/isRunning = 1 //If this event is currently running. You should not change this.
var/startedAt = 0 //When this event started.
var/endedAt = 0 //When this event ended.
var/processing_active = TRUE //VOREStation Addition
var/datum/event_meta/event_meta = null
/datum/event/nothing
+2 -1
View File
@@ -81,7 +81,8 @@
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 30, list(ASSIGNMENT_SECURITY = 30), 1),
//Evil grubs that drain station power slightly
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grub Infestation", /datum/event/grub_infestation, 0, list(ASSIGNMENT_SECURITY = 10, ASSIGNMENT_ENGINEER = 30), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Drone Pod Drop", /datum/event/drone_pod_drop, 10, list(ASSIGNMENT_SCIENTIST = 40), 1)
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Drone Pod Drop", /datum/event/drone_pod_drop, 10, list(ASSIGNMENT_SCIENTIST = 40), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Morph Spawn", /datum/event/morph_spawn, 75, list(ASSIGNMENT_SECURITY = 35), 1)
)
add_disabled_events(list(
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Appendicitis", /datum/event/spontaneous_appendicitis, 0, list(ASSIGNMENT_MEDICAL = 30), 1),
+46
View File
@@ -0,0 +1,46 @@
/datum/event/morph_spawn
startWhen = 1
announceWhen = 15
var/announceProb = 50
/datum/event/morph_spawn/start()
processing_active = FALSE
var/obj/effect/landmark/spawnspot = null
var/list/possibleSpawnspots = list()
for(var/obj/effect/landmark/newSpawnspot in landmarks_list)
if(newSpawnspot.name == "morphspawn")
possibleSpawnspots += newSpawnspot
if(possibleSpawnspots.len)
spawnspot = pick(possibleSpawnspots)
else
break
if(!spawnspot)
processing_active = TRUE
return
var/datum/ghost_query/Q = new /datum/ghost_query/morph()
var/list/winner = Q.query()
if(winner.len)
var/mob/living/simple_mob/vore/hostile/morph/newMorph = new /mob/living/simple_mob/vore/hostile/morph(get_turf(spawnspot))
var/mob/observer/dead/D = winner[1]
if(D.mind)
D.mind.transfer_to(newMorph)
to_chat(D, "<span class='notice'>You are a <b>Morph</b>, somehow having gotten aboard the station in your wandering. \
You are wary of environment around you, but your primal hunger still calls for you to find prey. Seek a convincing disguise, \
using your amorphous form to traverse vents to find and consume weak prey.</span>")
to_chat(D, "<span class='notice'>You can use shift + click on objects to disguise yourself as them, but your strikes are nearly useless when you are disguised. \
You can undisguise yourself by shift + clicking yourself, but disguise being switched, or turned on and off has a short cooldown.</span>")
newMorph.ckey = D.ckey
newMorph.visible_message("<span class='warning'>A morph appears to crawl out of somewhere.</span>")
else
processing_active = TRUE
return
processing_active = TRUE
/datum/event/morph_spawn/announce()
if(announceProb)
command_announcement.Announce("Unknown entitity detected boarding [station_name()]. Exercise extra caution.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg')