mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 06:57:42 +01:00
minor tweaks and cleanup with events, readded meteor shower and grid check events, removed most unused event files (left some interesting ones)
Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -46,13 +46,15 @@
|
||||
possibleEvents["Meteor"] = 80 * engineer_count
|
||||
possibleEvents["Blob"] = 30 * engineer_count
|
||||
possibleEvents["Spacevine"] = 30 * engineer_count
|
||||
possibleEvents["Grid Check"] = 10 * engineer_count
|
||||
if(medical_count >= 1)
|
||||
possibleEvents["Radiation"] = medical_count * 100
|
||||
possibleEvents["Virus"] = medical_count * 50
|
||||
possibleEvents["Appendicitis"] = medical_count * 50
|
||||
if(security_count >= 1)
|
||||
possibleEvents["Prison Break"] = security_count * 50
|
||||
//possibleEvents["Space Ninja"] = security_count * 10 // very low chance for space ninja event
|
||||
/*if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)
|
||||
possibleEvents["Space Ninja"] = security_count * 10*/
|
||||
|
||||
var/picked_event = pick(possibleEvents)
|
||||
var/chance = possibleEvents[picked_event]
|
||||
@@ -79,8 +81,7 @@
|
||||
switch(picked_event)
|
||||
if("Space Ninja")
|
||||
//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
|
||||
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)
|
||||
space_ninja_arrival()
|
||||
space_ninja_arrival()
|
||||
if("Radiation")
|
||||
high_radiation_event()
|
||||
if("Virus")
|
||||
@@ -101,6 +102,10 @@
|
||||
spacevine_infestation()
|
||||
if("Communications")
|
||||
communications_blackout()
|
||||
if("Grid Check")
|
||||
grid_check()
|
||||
if("Meteor")
|
||||
meteor_shower()
|
||||
|
||||
return 1
|
||||
|
||||
@@ -116,8 +121,9 @@
|
||||
for(var/obj/machinery/telecomms/T in telecomms_list)
|
||||
T.emp_act(1)
|
||||
|
||||
/proc/power_failure()
|
||||
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure")
|
||||
/proc/power_failure(var/is_grid_check = 0)
|
||||
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", is_grid_check ? "Automated Grid Check" : "Critical Power Failure")
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
M << sound('sound/AI/poweroff.ogg')
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
@@ -577,10 +583,28 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
|
||||
world << "Ion Storm Main Done"
|
||||
*/
|
||||
|
||||
/proc/meteor_shower()
|
||||
command_alert("The station is now in a meteor shower", "Meteor Alert")
|
||||
|
||||
spawn(0)
|
||||
var/waves = rand(1,4)
|
||||
while(waves > 0)
|
||||
sleep(rand(20,100))
|
||||
spawn_meteors(rand(1,3))
|
||||
waves--
|
||||
|
||||
command_alert("The station has cleared the meteor shower", "Meteor Alert")
|
||||
|
||||
/proc/grid_check()
|
||||
spawn(0)
|
||||
power_failure(1)
|
||||
sleep(rand(100,600))
|
||||
power_restore()
|
||||
|
||||
// Returns how many characters are currently active(not logged out, not AFK for more than 10 minutes)
|
||||
// with a specific role.
|
||||
// Note that this isn't sorted by department, because e.g. having a roboticist shouldn't make meteors spawn.
|
||||
proc/number_active_with_role(role)
|
||||
/proc/number_active_with_role(role)
|
||||
var/count = 0
|
||||
for(var/mob/M in player_list)
|
||||
if(!M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
/area/var/radsafe = 0
|
||||
/area/maintenance/radsafe = 1
|
||||
/area/ai_monitored/maintenance/radsafe = 1
|
||||
/area/centcom/radsafe = 1
|
||||
/area/admin/radsafe = 1
|
||||
/area/adminsafety/radsafe = 1
|
||||
/area/shuttle/radsafe = 1
|
||||
/area/syndicate_station/radsafe = 1
|
||||
/area/asteroid/radsafe = 1
|
||||
/area/crew_quarters/sleeping/radsafe = 1
|
||||
|
||||
/datum/event/blowout
|
||||
Lifetime = 150
|
||||
Announce()
|
||||
if(!forced && prob(90))
|
||||
ActiveEvent = null
|
||||
SpawnEvent()
|
||||
del src
|
||||
return
|
||||
command_alert("Warning: station approaching high-density radiation cloud. Seek cover immediately.")
|
||||
Tick()
|
||||
if(ActiveFor == 50)
|
||||
command_alert("Station has entered radiation cloud. Do not leave cover until it has passed.")
|
||||
if(ActiveFor == 100 || ActiveFor == 150) //1/2 and 2/2 f the way after it start proper make peope be half dead mostly
|
||||
for(var/mob/living/carbon/M in world)
|
||||
var/area = get_area(M)
|
||||
if(area:radsafe)
|
||||
continue
|
||||
if(!M.stat)
|
||||
M.radiate(100)
|
||||
Die()
|
||||
command_alert("The station has cleared the radiation cloud. It is now safe to leave cover.")
|
||||
@@ -1,88 +0,0 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
|
||||
|
||||
/datum/event/electricalstorm
|
||||
var/list/obj/machinery/light/Lights = list( )
|
||||
var/list/obj/machinery/light/APCs = list( )
|
||||
var/list/obj/machinery/light/Doors = list( )
|
||||
var/list/obj/machinery/light/Comms = list( )
|
||||
|
||||
Announce()
|
||||
// command_alert("The station is flying through an electrical storm. Radio communications may be disrupted", "Anomaly Alert")
|
||||
|
||||
for(var/obj/machinery/light/Light in world)
|
||||
if(Light.z == 1 && Light.status != 0)
|
||||
Lights += Light
|
||||
|
||||
for(var/obj/machinery/power/apc/APC in world)
|
||||
if(APC.z == 1 && !APC.crit)
|
||||
APCs += APC
|
||||
|
||||
for(var/obj/machinery/door/airlock/Door in world)
|
||||
if(Door.z == 1 && !istype(Door,/obj/machinery/door/airlock/secure))
|
||||
Doors += Door
|
||||
|
||||
for(var/obj/machinery/telecomms/processor/T in world)
|
||||
if(prob(90) && !(T.stat & (BROKEN|NOPOWER)))
|
||||
T.stat |= BROKEN
|
||||
Comms |= T
|
||||
|
||||
Tick()
|
||||
for(var/x = 0; x < 3; x++)
|
||||
if (prob(30))
|
||||
BlowLight()
|
||||
if (prob(10))
|
||||
DisruptAPC()
|
||||
if (prob(10))
|
||||
DisableDoor()
|
||||
|
||||
|
||||
Die()
|
||||
command_alert("The station has cleared the electrical storm. Radio communications restored", "Anomaly Alert")
|
||||
for(var/obj/machinery/telecomms/processor/T in Comms)
|
||||
T.stat &= ~BROKEN
|
||||
Comms = list()
|
||||
|
||||
proc
|
||||
BlowLight() //Blow out a light fixture
|
||||
var/obj/machinery/light/Light = null
|
||||
var/failed_attempts = 0
|
||||
while (Light == null || Light.status != 0)
|
||||
Light = pick(Lights)
|
||||
failed_attempts++
|
||||
if (failed_attempts >= 10)
|
||||
return
|
||||
|
||||
spawn(0) //Overload the light, spectacularly.
|
||||
//Light.sd_SetLuminosity(10)
|
||||
//sleep(2)
|
||||
Light.on = 1
|
||||
Light.broken()
|
||||
Lights -= Light
|
||||
|
||||
DisruptAPC()
|
||||
var/failed_attempts = 0
|
||||
var/obj/machinery/power/apc/APC
|
||||
while (!APC || !APC.operating)
|
||||
APC = pick(APCs)
|
||||
failed_attempts++
|
||||
if (failed_attempts >= 10)
|
||||
return
|
||||
|
||||
if (prob(40))
|
||||
APC.operating = 0 //Blow its breaker
|
||||
if (prob(8))
|
||||
APC.set_broken()
|
||||
APCs -= APC
|
||||
|
||||
DisableDoor()
|
||||
var/obj/machinery/door/airlock/Airlock
|
||||
while (!Airlock || Airlock.z != 1)
|
||||
Airlock = pick(Doors)
|
||||
Airlock.pulse(airlockIndexToWireColor[4])
|
||||
for (var/x = 0; x < 2; x++)
|
||||
var/Wire = 0
|
||||
while(!Wire || Wire == 4)
|
||||
Wire = rand(1, 9)
|
||||
Airlock.pulse(airlockIndexToWireColor[Wire])
|
||||
Airlock.update_icon()
|
||||
Doors -= Airlock
|
||||
@@ -1,10 +0,0 @@
|
||||
/datum/event/gravitationalanomaly
|
||||
|
||||
Announce()
|
||||
|
||||
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
|
||||
world << sound('granomalies.ogg')
|
||||
var/turf/T = pick(blobstart)
|
||||
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
|
||||
spawn(rand(50, 300))
|
||||
del(bh)
|
||||
@@ -1,5 +0,0 @@
|
||||
/datum/event/immovablerod
|
||||
|
||||
Announce()
|
||||
|
||||
immovablerod()
|
||||
@@ -1,11 +0,0 @@
|
||||
/datum/event/meteorstorm
|
||||
|
||||
Announce()
|
||||
command_alert("The station is now in a meteor shower", "Meteor Alert")
|
||||
|
||||
Tick()
|
||||
if (prob(20))
|
||||
meteor_wave()
|
||||
|
||||
Die()
|
||||
command_alert("The station has cleared the meteor shower", "Meteor Alert")
|
||||
@@ -1,16 +0,0 @@
|
||||
/datum/event/power_offline
|
||||
Announce()
|
||||
for(var/obj/machinery/power/apc/a in world)
|
||||
if(!a.crit && a.z == 1)
|
||||
if(istype(a.area, /area/ai_monitored/storage/eva) || istype(a.area, /area/engine)\
|
||||
|| istype(a.area, /area/toxins/xenobiology) || istype(a.area, /area/turret_protected/ai))
|
||||
continue
|
||||
a.eventoff = 1
|
||||
a.update()
|
||||
|
||||
Die()
|
||||
command_alert("The station has finished an automated power system grid check, thank you.", "Maintenance alert")
|
||||
for(var/obj/machinery/power/apc/a in world)
|
||||
if(!a.crit)
|
||||
a.eventoff = 0
|
||||
a.update()
|
||||
@@ -1,30 +0,0 @@
|
||||
/datum/event/prisonbreak
|
||||
|
||||
Announce()
|
||||
|
||||
for (var/obj/machinery/power/apc/temp_apc in world)
|
||||
if(istype(get_area(temp_apc), /area/security/prison))
|
||||
temp_apc.overload_lighting()
|
||||
if(istype(get_area(temp_apc), /area/security/brig))
|
||||
temp_apc.overload_lighting()
|
||||
// for (var/obj/machinery/computer/prison_shuttle/temp_shuttle in world)
|
||||
// temp_shuttle.prison_break()
|
||||
for (var/obj/structure/closet/secure_closet/brig/temp_closet in world)
|
||||
if(istype(get_area(temp_closet), /area/security/prison))
|
||||
temp_closet.locked = 0
|
||||
temp_closet.icon_state = temp_closet.icon_closed
|
||||
for (var/obj/machinery/door/airlock/security/temp_airlock in world)
|
||||
if(istype(get_area(temp_airlock), /area/security/prison))
|
||||
temp_airlock.prison_open()
|
||||
if(istype(get_area(temp_airlock), /area/security/brig))
|
||||
temp_airlock.prison_open()
|
||||
for (var/obj/machinery/door/airlock/glass/glass_security/temp_glassairlock in world)
|
||||
if(istype(get_area(temp_glassairlock), /area/security/prison))
|
||||
temp_glassairlock.prison_open()
|
||||
if(istype(get_area(temp_glassairlock), /area/security/brig))
|
||||
temp_glassairlock.prison_open()
|
||||
for (var/obj/machinery/door_timer/temp_timer in world)
|
||||
if(istype(get_area(temp_timer), /area/security/brig))
|
||||
temp_timer.releasetime = 1
|
||||
sleep(150)
|
||||
command_alert("Glitch in imprisonment subroutines detected on [station_name()]. Recommend station AI involvement.", "Security Alert")
|
||||
@@ -1,27 +0,0 @@
|
||||
/datum/event/radiation
|
||||
var/current_iteration = 0
|
||||
|
||||
// 50 - 20 (grace period) seconds lifetime
|
||||
Lifetime = 50
|
||||
Announce()
|
||||
command_alert("The station is now travelling through a radiation belt. Take shelter in the maintenance tunnels, or in the crew quarters!", "Medical Alert")
|
||||
|
||||
Tick()
|
||||
current_iteration++
|
||||
|
||||
// start radiating after 20 seconds grace period
|
||||
if(current_iteration > 20)
|
||||
for(var/mob/living/carbon/L in world)
|
||||
// check whether they're in a safe place
|
||||
// if they are, do not radiate
|
||||
var/turf/T = get_turf(L)
|
||||
if(T && ( istype(T.loc, /area/maintenance) || istype(T.loc, /area/crew_quarters) ))
|
||||
continue
|
||||
|
||||
if (istype(L, /mob/living/carbon/monkey)) // So as to stop monkeys from dying in their pens
|
||||
L.apply_effect(rand(3,4), IRRADIATE)
|
||||
else
|
||||
L.apply_effect(rand(4,10), IRRADIATE)
|
||||
|
||||
Die()
|
||||
command_alert("The station has cleared the radiation belt", "Medical Alert")
|
||||
@@ -1,14 +0,0 @@
|
||||
/datum/event/spacecarp
|
||||
|
||||
Announce()
|
||||
|
||||
for(var/obj/effect/landmark/C in world)
|
||||
if(C.name == "carpspawn")
|
||||
if(prob(99))
|
||||
new /mob/living/simple_animal/carp(C.loc)
|
||||
else
|
||||
new /mob/living/simple_animal/carp/elite(C.loc)
|
||||
//sleep(100)
|
||||
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
|
||||
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
|
||||
world << sound('commandreport.ogg')
|
||||
@@ -1,6 +0,0 @@
|
||||
/datum/event/spaceninja
|
||||
|
||||
Announce()
|
||||
|
||||
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
|
||||
space_ninja_arrival()//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
|
||||
@@ -1,7 +0,0 @@
|
||||
/datum/traitorinfo
|
||||
var/starting_objective = ""
|
||||
var/starting_player_count = 0
|
||||
var/starting_occupation = ""
|
||||
var/starting_name = ""
|
||||
var/ckey = ""
|
||||
var/list/spawnlist = list()
|
||||
Reference in New Issue
Block a user