mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:49:19 +00:00
* sync (#3) * shuttle auto call * Merge /vore into /master (#39) * progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why * Subsystem 12/21 Most Recent TG subsystem folder * globalvars 12/21 Tossed out the flavor_misc and parallax files * Onclick 12/21 as well as .dme updates * _defines 12/21 ommited old _MC.dm * _HELPERS 12/21 Preserved snowflake placement of furry sprites * _defeines/genetics reapplied narkism holdover for snowflake races. * Oops forgot mutant colors * modules porting 12/21 + Sounds/icons Admin, Client and most of mob life files ommitted * enviroment file * Admin optimizations ahelp log system kept * Mob ports 12/21 Flavor text preserved * datums ported 12/21 * Game ported 12/21 * batch of duplicate fixes/dogborg work Dogborgs need to be modernized to refractored borg standards. * moar fixes * Maps and futher compile fixes
76 lines
2.3 KiB
Plaintext
76 lines
2.3 KiB
Plaintext
/datum/round_event_control/alien_infestation
|
|
name = "Alien Infestation"
|
|
typepath = /datum/round_event/ghost_role/alien_infestation
|
|
weight = 5
|
|
|
|
min_players = 10
|
|
max_occurrences = 1
|
|
|
|
/datum/round_event/ghost_role/alien_infestation
|
|
announceWhen = 400
|
|
|
|
minimum_required = 1
|
|
role_name = "alien larva"
|
|
|
|
// 50% chance of being incremented by one
|
|
var/spawncount = 1
|
|
var/successSpawn = 0 //So we don't make a command report if nothing gets spawned.
|
|
|
|
|
|
/datum/round_event/ghost_role/alien_infestation/setup()
|
|
announceWhen = rand(announceWhen, announceWhen + 50)
|
|
if(prob(50))
|
|
spawncount++
|
|
|
|
/datum/round_event/ghost_role/alien_infestation/kill()
|
|
if(!successSpawn && control)
|
|
// This never happened, so let's not deny the future of this round
|
|
// some xenolovin
|
|
control.occurrences--
|
|
return ..()
|
|
|
|
/datum/round_event/ghost_role/alien_infestation/announce()
|
|
if(successSpawn)
|
|
priority_announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", 'sound/AI/aliens.ogg')
|
|
|
|
|
|
/datum/round_event/ghost_role/alien_infestation/spawn_role()
|
|
var/list/vents = list()
|
|
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in machines)
|
|
if(qdeleted(temp_vent))
|
|
continue
|
|
if(temp_vent.loc.z == ZLEVEL_STATION && !temp_vent.welded)
|
|
var/datum/pipeline/temp_vent_parent = temp_vent.PARENT1
|
|
//Stops Aliens getting stuck in small networks.
|
|
//See: Security, Virology
|
|
if(temp_vent_parent.other_atmosmch.len > 20)
|
|
vents += temp_vent
|
|
|
|
if(!vents.len)
|
|
message_admins("An event attempted to spawn an alien but no suitable vents were found. Shutting down.")
|
|
return MAP_ERROR
|
|
|
|
var/list/candidates = get_candidates("alien", null, ROLE_ALIEN)
|
|
|
|
if(!candidates.len)
|
|
return NOT_ENOUGH_PLAYERS
|
|
|
|
while(spawncount > 0 && vents.len && candidates.len)
|
|
var/obj/vent = pick_n_take(vents)
|
|
var/client/C = pick_n_take(candidates)
|
|
|
|
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
|
|
new_xeno.key = C.key
|
|
|
|
spawncount--
|
|
successSpawn = TRUE
|
|
message_admins("[new_xeno.key] has been made into an alien by an event.")
|
|
log_game("[new_xeno.key] was spawned as an alien by an event.")
|
|
spawned_mobs += new_xeno
|
|
|
|
if(successSpawn)
|
|
return SUCCESSFUL_SPAWN
|
|
else
|
|
// Like how did we get here?
|
|
return FALSE
|