mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 14:07:51 +01:00
Merge pull request #5893 from Fox-McCloud/event-cleanup
Removes Event Procs
This commit is contained in:
@@ -1,59 +0,0 @@
|
||||
/proc/alien_infestation(var/spawncount = 1) // -- TLE
|
||||
//command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg')
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
|
||||
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
|
||||
if(temp_vent.parent.other_atmosmch.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology
|
||||
vents += temp_vent
|
||||
|
||||
spawn()
|
||||
var/list/candidates = pollCandidates("Do you want to play as an alien?", ROLE_ALIEN, 1)
|
||||
|
||||
if(prob(40)) spawncount++ //sometimes, have two larvae spawn instead of one
|
||||
while((spawncount >= 1) && vents.len && candidates.len)
|
||||
|
||||
var/obj/vent = pick(vents)
|
||||
var/mob/candidate = pick(candidates)
|
||||
var/client/C = candidate.client
|
||||
if(C)
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
|
||||
new_xeno.key = C
|
||||
respawnable_list -= C
|
||||
candidates -= C
|
||||
vents -= vent
|
||||
spawncount--
|
||||
|
||||
spawn(rand(5000, 6000)) //Delayed announcements to keep the crew on their toes.
|
||||
command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg')
|
||||
for(var/mob/M in player_list)
|
||||
M << sound('sound/AI/aliens.ogg')
|
||||
|
||||
/proc/lightsout(isEvent = 0, lightsoutAmount = 1,lightsoutRange = 25) //leave lightsoutAmount as 0 to break ALL lights
|
||||
if(isEvent)
|
||||
command_announcement.Announce("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert")
|
||||
|
||||
if(lightsoutAmount)
|
||||
var/list/epicentreList = list()
|
||||
|
||||
for(var/i=1,i<=lightsoutAmount,i++)
|
||||
var/list/possibleEpicentres = list()
|
||||
for(var/obj/effect/landmark/newEpicentre in landmarks_list)
|
||||
if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList))
|
||||
possibleEpicentres += newEpicentre
|
||||
if(possibleEpicentres.len)
|
||||
epicentreList += pick(possibleEpicentres)
|
||||
else
|
||||
break
|
||||
|
||||
if(!epicentreList.len)
|
||||
return
|
||||
|
||||
for(var/obj/effect/landmark/epicentre in epicentreList)
|
||||
for(var/obj/machinery/power/apc/apc in range(epicentre,lightsoutRange))
|
||||
apc.overload_lighting()
|
||||
|
||||
else
|
||||
for(var/obj/machinery/power/apc/apc in apcs)
|
||||
apc.overload_lighting()
|
||||
|
||||
return
|
||||
@@ -2486,18 +2486,20 @@
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","LO")
|
||||
message_admins("[key_name_admin(usr)] has broke a lot of lights", 1)
|
||||
lightsout(1,2)
|
||||
var/datum/event/electrical_storm/E = new /datum/event/electrical_storm
|
||||
E.lightsoutAmount = 2
|
||||
if("blackout")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","BO")
|
||||
message_admins("[key_name_admin(usr)] broke all lights", 1)
|
||||
lightsout(0,0)
|
||||
for(var/obj/machinery/light/L in machines)
|
||||
L.broken()
|
||||
if("whiteout")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","WO")
|
||||
for(var/obj/machinery/light/L in world)
|
||||
L.fix()
|
||||
message_admins("[key_name_admin(usr)] fixed all lights", 1)
|
||||
for(var/obj/machinery/light/L in machines)
|
||||
L.fix()
|
||||
if("floorlava")
|
||||
feedback_inc("admin_secrets_fun_used", 1)
|
||||
feedback_add_details("admin_secrets_fun_used", "LF")
|
||||
|
||||
@@ -269,8 +269,12 @@ client/proc/one_click_antag()
|
||||
return 1
|
||||
|
||||
/datum/admins/proc/makeAliens()
|
||||
alien_infestation(3)
|
||||
return 1
|
||||
var/datum/event/alien_infestation/E = new /datum/event/alien_infestation
|
||||
E.spawncount = 3
|
||||
// TODO The fact we have to do this rather than just have events start
|
||||
// when we ask them to, is bad.
|
||||
E.processing = TRUE
|
||||
return TRUE
|
||||
|
||||
/*
|
||||
/datum/admins/proc/makeSpaceNinja()
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/var/global/sent_aliens_to_station = 0
|
||||
|
||||
/datum/event/alien_infestation
|
||||
announceWhen = 400
|
||||
var/spawncount = 1
|
||||
@@ -7,8 +5,8 @@
|
||||
|
||||
/datum/event/alien_infestation/setup()
|
||||
announceWhen = rand(announceWhen, announceWhen + 50)
|
||||
spawncount = rand(1, 2)
|
||||
sent_aliens_to_station = 1
|
||||
if(prob(50))
|
||||
spawncount++
|
||||
|
||||
/datum/event/alien_infestation/announce()
|
||||
if(successSpawn)
|
||||
|
||||
@@ -358,7 +358,6 @@
|
||||
#include "code\game\dna\genes\vg_powers.dm"
|
||||
#include "code\game\gamemodes\antag_hud.dm"
|
||||
#include "code\game\gamemodes\antag_spawner.dm"
|
||||
#include "code\game\gamemodes\events.dm"
|
||||
#include "code\game\gamemodes\factions.dm"
|
||||
#include "code\game\gamemodes\game_mode.dm"
|
||||
#include "code\game\gamemodes\gameticker.dm"
|
||||
|
||||
Reference in New Issue
Block a user