mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 12:37:26 +01:00
Makes all global variables handled by the GLOB controller (#13152)
* Handlers converted, now to fix 3532 compile errors * 3532 compile fixes later, got runtimes on startup * Well the server loads now atleast * Take 2 * Oops
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
/datum/event/alien_infestation/announce()
|
||||
if(successSpawn)
|
||||
event_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')
|
||||
GLOB.event_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')
|
||||
|
||||
/datum/event/alien_infestation/start()
|
||||
var/list/vents = list()
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
setup(safety_loop)
|
||||
|
||||
/datum/event/anomaly/announce()
|
||||
event_announcement.Announce("Localized hyper-energetic flux wave detected on long range scanners. Expected location of impact: [impact_area.name].", "Anomaly Alert")
|
||||
GLOB.event_announcement.Announce("Localized hyper-energetic flux wave detected on long range scanners. Expected location of impact: [impact_area.name].", "Anomaly Alert")
|
||||
|
||||
/datum/event/anomaly/start()
|
||||
var/turf/T = pick(get_area_turfs(impact_area))
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
endWhen = 160
|
||||
|
||||
/datum/event/anomaly/anomaly_bluespace/announce()
|
||||
event_announcement.Announce("Unstable bluespace anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
|
||||
GLOB.event_announcement.Announce("Unstable bluespace anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
|
||||
|
||||
/datum/event/anomaly/anomaly_bluespace/start()
|
||||
var/turf/T = pick(get_area_turfs(impact_area))
|
||||
@@ -33,7 +33,7 @@
|
||||
var/turf/TO = get_turf(chosen) // the turf of origin we're travelling TO
|
||||
|
||||
playsound(TO, 'sound/effects/phasein.ogg', 100, 1)
|
||||
event_announcement.Announce("Massive bluespace translocation detected.", "Anomaly Alert")
|
||||
GLOB.event_announcement.Announce("Massive bluespace translocation detected.", "Anomaly Alert")
|
||||
|
||||
var/list/flashers = list()
|
||||
for(var/mob/living/carbon/C in viewers(TO, null))
|
||||
@@ -44,7 +44,7 @@
|
||||
var/x_distance = TO.x - FROM.x
|
||||
for(var/atom/movable/A in range(12, FROM )) // iterate thru list of mobs in the area
|
||||
if(istype(A, /obj/item/radio/beacon)) // don't teleport beacons because that's just insanely stupid
|
||||
continue
|
||||
continue
|
||||
if(A.anchored || A.move_resist == INFINITY)
|
||||
continue
|
||||
var/turf/newloc = locate(A.x + x_distance, A.y + y_distance, TO.z) // calculate the new place
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
endWhen = 180
|
||||
|
||||
/datum/event/anomaly/anomaly_flux/announce()
|
||||
event_announcement.Announce("Localized hyper-energetic flux wave detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
|
||||
GLOB.event_announcement.Announce("Localized hyper-energetic flux wave detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
|
||||
|
||||
/datum/event/anomaly/anomaly_flux/start()
|
||||
var/turf/T = pick(get_area_turfs(impact_area))
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
endWhen = 70
|
||||
|
||||
/datum/event/anomaly/anomaly_grav/announce()
|
||||
event_announcement.Announce("Gravitational anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
|
||||
GLOB.event_announcement.Announce("Gravitational anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
|
||||
|
||||
/datum/event/anomaly/anomaly_grav/start()
|
||||
var/turf/T = pick(get_area_turfs(impact_area))
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
endWhen = 110
|
||||
|
||||
/datum/event/anomaly/anomaly_pyro/announce()
|
||||
event_announcement.Announce("Atmospheric anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
|
||||
GLOB.event_announcement.Announce("Atmospheric anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
|
||||
|
||||
/datum/event/anomaly/anomaly_pyro/start()
|
||||
var/turf/T = pick(get_area_turfs(impact_area))
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
endWhen = 80
|
||||
|
||||
/datum/event/anomaly/anomaly_vortex/announce()
|
||||
event_announcement.Announce("Localized high-intensity vortex anomaly detected on long range scanners. Expected location: [impact_area.name]", "Anomaly Alert")
|
||||
GLOB.event_announcement.Announce("Localized high-intensity vortex anomaly detected on long range scanners. Expected location: [impact_area.name]", "Anomaly Alert")
|
||||
|
||||
/datum/event/anomaly/anomaly_vortex/start()
|
||||
var/turf/T = pick(get_area_turfs(impact_area))
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/aurora_progress = 0 //this cycles from 1 to 7, slowly changing colors from gentle green to gentle blue
|
||||
|
||||
/datum/event/aurora_caelus/announce()
|
||||
event_announcement.Announce("[station_name()]: A harmless cloud of ions is approaching your station, and will exhaust their energy battering the hull. \
|
||||
GLOB.event_announcement.Announce("[station_name()]: A harmless cloud of ions is approaching your station, and will exhaust their energy battering the hull. \
|
||||
Nanotrasen has approved a short break for all employees to relax and observe this very rare event. \
|
||||
During this time, starlight will be bright but gentle, shifting between quiet green and blue colors. \
|
||||
Any staff who would like to view these lights for themselves may proceed to the area nearest to them with viewing ports to open space. \
|
||||
@@ -41,7 +41,7 @@ We hope you enjoy the lights.", "Harmless ions approaching", new_sound = 'sound/
|
||||
if(initial(A.dynamic_lighting) == DYNAMIC_LIGHTING_IFSTARLIGHT)
|
||||
for(var/turf/space/S in A)
|
||||
fade_to_black(S)
|
||||
event_announcement.Announce("The Aurora Caelus event is now ending. Starlight conditions will slowly return to normal. \
|
||||
GLOB.event_announcement.Announce("The Aurora Caelus event is now ending. Starlight conditions will slowly return to normal. \
|
||||
When this has concluded, please return to your workplace and continue work as normal. \
|
||||
Have a pleasant shift, [station_name()], and thank you for watching with us.",
|
||||
"Harmless ions dissipating", new_sound = 'sound/misc/notice2.ogg', from = "Nanotrasen Meteorology Division")
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
endWhen = 240
|
||||
|
||||
/datum/event/blob/announce()
|
||||
event_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/AI/outbreak5.ogg')
|
||||
GLOB.event_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/AI/outbreak5.ogg')
|
||||
|
||||
/datum/event/blob/start()
|
||||
processing = FALSE //so it won't fire again in next tick
|
||||
|
||||
var/turf/T = pick(blobstart)
|
||||
var/turf/T = pick(GLOB.blobstart)
|
||||
if(!T)
|
||||
return kill()
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"You don't want to buy anything? Yeah, well I didn't want to buy your mom either.")
|
||||
|
||||
/datum/event/brand_intelligence/announce()
|
||||
event_announcement.Announce("Rampant brand intelligence has been detected aboard [station_name()], please stand-by. The origin is believed to be \a [originMachine.name].", "Machine Learning Alert")
|
||||
GLOB.event_announcement.Announce("Rampant brand intelligence has been detected aboard [station_name()], please stand-by. The origin is believed to be \a [originMachine.name].", "Machine Learning Alert")
|
||||
|
||||
/datum/event/brand_intelligence/start()
|
||||
for(var/obj/machinery/vending/V in GLOB.machines)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
announcement = "Massive migration of unknown biological entities has been detected near [station_name()], please stand-by."
|
||||
else
|
||||
announcement = "Unknown biological entities have been detected near [station_name()], please stand-by."
|
||||
event_announcement.Announce(announcement, "Lifesign Alert")
|
||||
GLOB.event_announcement.Announce(announcement, "Lifesign Alert")
|
||||
|
||||
/datum/event/carp_migration/start()
|
||||
|
||||
|
||||
@@ -12,19 +12,19 @@
|
||||
to_chat(A, "<br>")
|
||||
|
||||
if(prob(30)) //most of the time, we don't want an announcement, so as to allow AIs to fake blackouts.
|
||||
event_announcement.Announce(alert)
|
||||
GLOB.event_announcement.Announce(alert)
|
||||
|
||||
/datum/event/communications_blackout/start()
|
||||
for(var/obj/machinery/telecomms/T in telecomms_list)
|
||||
for(var/obj/machinery/telecomms/T in GLOB.telecomms_list)
|
||||
T.emp_act(1)
|
||||
|
||||
/proc/communications_blackout(var/silent = 1)
|
||||
if(!silent)
|
||||
event_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/misc/interference.ogg')
|
||||
GLOB.event_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/misc/interference.ogg')
|
||||
else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
|
||||
for(var/mob/living/silicon/ai/A in GLOB.player_list)
|
||||
to_chat(A, "<br>")
|
||||
to_chat(A, "<span class='warning'><b>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT<b></span>")
|
||||
to_chat(A, "<br>")
|
||||
for(var/obj/machinery/telecomms/T in telecomms_list)
|
||||
for(var/obj/machinery/telecomms/T in GLOB.telecomms_list)
|
||||
T.emp_act(1)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
announceWhen = rand(15, 30)
|
||||
|
||||
/datum/event/disease_outbreak/announce()
|
||||
event_announcement.Announce("Confirmed outbreak of level 7 major viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
|
||||
GLOB.event_announcement.Announce("Confirmed outbreak of level 7 major viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
|
||||
|
||||
/datum/event/disease_outbreak/start()
|
||||
if(prob(25))
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
var/starty = 0
|
||||
var/endy = 0
|
||||
var/endx = 0
|
||||
var/startside = pick(cardinal)
|
||||
var/startside = pick(GLOB.cardinal)
|
||||
|
||||
switch(startside)
|
||||
if(NORTH)
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
var/lightsoutRange = 25
|
||||
|
||||
/datum/event/electrical_storm/announce()
|
||||
event_announcement.Announce("An electrical storm has been detected in your area, please repair potential electronic overloads.", "Electrical Storm Alert")
|
||||
|
||||
GLOB.event_announcement.Announce("An electrical storm has been detected in your area, please repair potential electronic overloads.", "Electrical Storm Alert")
|
||||
|
||||
/datum/event/electrical_storm/start()
|
||||
var/list/epicentreList = list()
|
||||
|
||||
@@ -24,4 +24,4 @@
|
||||
for(var/obj/effect/landmark/epicentre in epicentreList)
|
||||
for(var/obj/machinery/power/apc/apc in range(epicentre,lightsoutRange))
|
||||
apc.overload_lighting()
|
||||
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
return total_weight
|
||||
|
||||
/datum/event_meta/alien/get_weight(var/list/active_with_role)
|
||||
if(aliens_allowed)
|
||||
if(GLOB.aliens_allowed)
|
||||
return ..(active_with_role)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
#define ASSIGNMENT_SCIENTIST "Scientist"
|
||||
#define ASSIGNMENT_SECURITY "Security"
|
||||
|
||||
var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT_LEVEL_MODERATE = "Moderate", EVENT_LEVEL_MAJOR = "Major")
|
||||
var/list/event_last_fired = list()
|
||||
GLOBAL_LIST_INIT(severity_to_string, list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT_LEVEL_MODERATE = "Moderate", EVENT_LEVEL_MAJOR = "Major"))
|
||||
GLOBAL_LIST_EMPTY(event_last_fired)
|
||||
|
||||
/datum/event_container
|
||||
var/severity = -1
|
||||
@@ -46,7 +46,7 @@ var/list/event_last_fired = list()
|
||||
|
||||
new next_event.event_type(next_event) // Events are added and removed from the processing queue in their New/kill procs
|
||||
|
||||
log_debug("Starting event '[next_event.name]' of severity [severity_to_string[severity]].")
|
||||
log_debug("Starting event '[next_event.name]' of severity [GLOB.severity_to_string[severity]].")
|
||||
next_event = null // When set to null, a random event will be selected next time
|
||||
else
|
||||
// If not, wait for one minute, instead of one tick, before checking again.
|
||||
@@ -65,7 +65,7 @@ var/list/event_last_fired = list()
|
||||
possible_events[EM] = event_weight
|
||||
|
||||
for(var/event_meta in last_event_time) if(possible_events[event_meta])
|
||||
var/time_passed = world.time - event_last_fired[event_meta]
|
||||
var/time_passed = world.time - GLOB.event_last_fired[event_meta]
|
||||
var/weight_modifier = max(0, (config.expected_round_length - time_passed) / 300)
|
||||
var/new_weight = max(possible_events[event_meta] - weight_modifier, 0)
|
||||
|
||||
@@ -113,7 +113,7 @@ var/list/event_last_fired = list()
|
||||
var/event_delay = rand(config.event_delay_lower[severity], config.event_delay_upper[severity]) * playercount_modifier
|
||||
next_event_time = world.time + event_delay
|
||||
|
||||
log_debug("Next event of severity [severity_to_string[severity]] in [(next_event_time - world.time)/600] minutes.")
|
||||
log_debug("Next event of severity [GLOB.severity_to_string[severity]] in [(next_event_time - world.time)/600] minutes.")
|
||||
|
||||
/datum/event_container/proc/SelectEvent()
|
||||
var/datum/event_meta/EM = input("Select an event to queue up.", "Event Selection", null) as null|anything in available_events
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
var/list/event_areas = list()
|
||||
|
||||
for(var/areapath in the_station_areas)
|
||||
for(var/areapath in GLOB.the_station_areas)
|
||||
event_areas += typesof(areapath)
|
||||
for(var/areapath in safe_areas)
|
||||
event_areas -= typesof(areapath)
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "security robot module")
|
||||
active_with_role["Security"]++
|
||||
if(M.mind.assigned_role in security_positions)
|
||||
if(M.mind.assigned_role in GLOB.security_positions)
|
||||
active_with_role["Security"]++
|
||||
|
||||
if(M.mind.assigned_role in list("Research Director", "Scientist"))
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
/datum/event/spawn_floor_cluwne/start()
|
||||
|
||||
if(!xeno_spawn)
|
||||
if(!GLOB.xeno_spawn)
|
||||
message_admins("No valid spawn locations found, aborting...")
|
||||
return kill()
|
||||
|
||||
var/turf/T = get_turf(pick(xeno_spawn))
|
||||
var/turf/T = get_turf(pick(GLOB.xeno_spawn))
|
||||
var/mob/living/simple_animal/hostile/floor_cluwne/S = new(T)
|
||||
playsound(S, 'sound/spookoween/scary_horn.ogg', 50, 1, -1)
|
||||
message_admins("A floor cluwne has been spawned at [COORD(T)][ADMIN_JMP(T)]")
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
SEND_SOUND(M, S)
|
||||
|
||||
/datum/event/grid_check/announce()
|
||||
event_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Automated Grid Check", new_sound = 'sound/AI/poweroff.ogg')
|
||||
GLOB.event_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Automated Grid Check", new_sound = 'sound/AI/poweroff.ogg')
|
||||
|
||||
/datum/event/grid_check/end()
|
||||
power_restore()
|
||||
|
||||
/proc/power_failure(var/announce = 1)
|
||||
if(announce)
|
||||
event_announcement.Announce("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", new_sound = 'sound/AI/poweroff.ogg')
|
||||
GLOB.event_announcement.Announce("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", new_sound = 'sound/AI/poweroff.ogg')
|
||||
|
||||
var/list/skipped_areas = list(/area/turret_protected/ai)
|
||||
var/list/skipped_areas_apc = list(/area/engine/engineering)
|
||||
@@ -51,7 +51,7 @@
|
||||
var/list/skipped_areas_apc = list(/area/engine/engineering)
|
||||
|
||||
if(announce)
|
||||
event_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
|
||||
GLOB.event_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/apc/C in GLOB.apcs)
|
||||
var/area/current_area = get_area(C)
|
||||
if((current_area.type in skipped_areas_apc) || !is_station_level(C.z))
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
/proc/power_restore_quick(var/announce = 1)
|
||||
if(announce)
|
||||
event_announcement.Announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
|
||||
GLOB.event_announcement.Announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/smes/S in GLOB.machines)
|
||||
if(!is_station_level(S.z))
|
||||
continue
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/datum/event/headcrabs/start()
|
||||
var/list/availableareas = list()
|
||||
for(var/area/maintenance/A in world)
|
||||
availableareas += A
|
||||
availableareas += A
|
||||
var/area/randomarea = pick(availableareas)
|
||||
var/list/turf/simulated/floor/turfs = list()
|
||||
for(var/turf/simulated/floor/F in randomarea)
|
||||
@@ -23,7 +23,7 @@
|
||||
var/list/spawn_types = list()
|
||||
var/max_number
|
||||
headcrab_type = rand(0, 5)
|
||||
switch(headcrab_type)
|
||||
switch(headcrab_type)
|
||||
if(HEADCRAB_NORMAL)
|
||||
spawn_types = list(/mob/living/simple_animal/hostile/headcrab)
|
||||
max_number = 6
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
|
||||
/datum/event/headcrabs/announce()
|
||||
event_announcement.Announce("Bioscans indicate that headcrabs have been breeding on the station. Clear them out, before this starts to affect productivity", "Lifesign Alert")
|
||||
GLOB.event_announcement.Announce("Bioscans indicate that headcrabs have been breeding on the station. Clear them out, before this starts to affect productivity", "Lifesign Alert")
|
||||
|
||||
#undef HEADCRAB_NORMAL
|
||||
#undef HEADCRAB_FASTMIX
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
//Uncommenting ALLOW_HOLIDAYS in config.txt will enable Holidays
|
||||
var/global/Holiday = null
|
||||
GLOBAL_VAR_INIT(Holiday) // I didnt update the rest of this code because this file hasnt been ticked in years, and holiday code got overhauled
|
||||
// If it really needs fixing, yell at me, -aa
|
||||
|
||||
//Just thinking ahead! Here's the foundations to a more robust Holiday event system.
|
||||
//It's easy as hell to add stuff. Just set Holiday to something using the switch(or something else)
|
||||
|
||||
@@ -11,10 +11,10 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
|
||||
announceWhen = 5
|
||||
|
||||
/datum/event/immovable_rod/announce()
|
||||
event_announcement.Announce("What the fuck was that?!", "General Alert")
|
||||
GLOB.event_announcement.Announce("What the fuck was that?!", "General Alert")
|
||||
|
||||
/datum/event/immovable_rod/start()
|
||||
var/startside = pick(cardinal)
|
||||
var/startside = pick(GLOB.cardinal)
|
||||
var/turf/startT = spaceDebrisStartLoc(startside, 1)
|
||||
var/turf/endT = spaceDebrisFinishLoc(startside, 1)
|
||||
new /obj/effect/immovablerod/event(startT, endT)
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
|
||||
/datum/event/infestation/announce()
|
||||
event_announcement.Announce("Bioscans indicate that [vermstring] have been breeding in [locstring]. Clear them out, before this starts to affect productivity.", "Lifesign Alert")
|
||||
GLOB.event_announcement.Announce("Bioscans indicate that [vermstring] have been breeding in [locstring]. Clear them out, before this starts to affect productivity.", "Lifesign Alert")
|
||||
|
||||
#undef LOC_KITCHEN
|
||||
#undef LOC_ATMOS
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
/datum/event/ion_storm/announce()
|
||||
if(announceEvent == ION_ANNOUNCE || (announceEvent == ION_RANDOM && prob(ionAnnounceChance)))
|
||||
event_announcement.Announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", 'sound/AI/ionstorm.ogg')
|
||||
GLOB.event_announcement.Announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", 'sound/AI/ionstorm.ogg')
|
||||
|
||||
|
||||
/datum/event/ion_storm/start()
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
H.AdjustHallucinate(rand(50, 100))
|
||||
|
||||
/datum/event/mass_hallucination/announce()
|
||||
event_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage")
|
||||
GLOB.event_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/event/meteor_wave/gore/announce()
|
||||
event_announcement.Announce("Unknown biological debris have been detected near [station_name()], please stand-by.", "Debris Alert")
|
||||
GLOB.event_announcement.Announce("Unknown biological debris have been detected near [station_name()], please stand-by.", "Debris Alert")
|
||||
|
||||
/datum/event/meteor_wave/gore/setup()
|
||||
waves = 3
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
/datum/event/meteor_wave/gore/tick()
|
||||
if(waves && activeFor >= next_meteor)
|
||||
spawn() spawn_meteors(rand(5,8), meteors_gore)
|
||||
spawn() spawn_meteors(rand(5,8), GLOB.meteors_gore)
|
||||
next_meteor += rand(15, 30)
|
||||
waves--
|
||||
endWhen = (waves ? next_meteor + 1 : activeFor + 15)
|
||||
|
||||
|
||||
/datum/event/meteor_wave/gore/end()
|
||||
event_announcement.Announce("The station has cleared the debris.", "Debris Alert")
|
||||
GLOB.event_announcement.Announce("The station has cleared the debris.", "Debris Alert")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/event/meteor_wave/goreop/announce()
|
||||
var/meteor_declaration = "MeteorOps have declared their intent to utterly destroy [station_name()] with their own bodies, and dares the crew to try and stop them."
|
||||
event_announcement.Announce(meteor_declaration, "Declaration of 'War'", 'sound/effects/siren.ogg')
|
||||
GLOB.event_announcement.Announce(meteor_declaration, "Declaration of 'War'", 'sound/effects/siren.ogg')
|
||||
|
||||
/datum/event/meteor_wave/goreop/setup()
|
||||
waves = 3
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
/datum/event/meteor_wave/goreop/tick()
|
||||
if(waves && activeFor >= next_meteor)
|
||||
spawn() spawn_meteors(5, meteors_ops)
|
||||
spawn() spawn_meteors(5, GLOB.meteors_ops)
|
||||
next_meteor += rand(15, 30)
|
||||
waves--
|
||||
endWhen = (waves ? next_meteor + 1 : activeFor + 15)
|
||||
@@ -16,4 +16,4 @@
|
||||
|
||||
|
||||
/datum/event/meteor_wave/goreop/end()
|
||||
event_announcement.Announce("All MeteorOps are dead. Major Station Victory.", "MeteorOps")
|
||||
GLOB.event_announcement.Announce("All MeteorOps are dead. Major Station Victory.", "MeteorOps")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/datum/event/dust/meaty/announce()
|
||||
if(prob(16))
|
||||
event_announcement.Announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
|
||||
GLOB.event_announcement.Announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
|
||||
else
|
||||
event_announcement.Announce("Meaty ores have been detected on collision course with the station.", "Meaty Ore Alert", new_sound = 'sound/AI/meteors.ogg')
|
||||
GLOB.event_announcement.Announce("Meaty ores have been detected on collision course with the station.", "Meaty Ore Alert", new_sound = 'sound/AI/meteors.ogg')
|
||||
|
||||
/datum/event/dust/meaty/setup()
|
||||
qnty = rand(45,125)
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
/datum/event/meteor_wave/announce()
|
||||
switch(severity)
|
||||
if(EVENT_LEVEL_MAJOR)
|
||||
event_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
|
||||
GLOB.event_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
|
||||
else
|
||||
event_announcement.Announce("The station is now in a meteor shower.", "Meteor Alert")
|
||||
GLOB.event_announcement.Announce("The station is now in a meteor shower.", "Meteor Alert")
|
||||
|
||||
//meteor showers are lighter and more common,
|
||||
/datum/event/meteor_wave/tick()
|
||||
@@ -25,15 +25,15 @@
|
||||
/datum/event/meteor_wave/end()
|
||||
switch(severity)
|
||||
if(EVENT_LEVEL_MAJOR)
|
||||
event_announcement.Announce("The station has cleared the meteor storm.", "Meteor Alert")
|
||||
GLOB.event_announcement.Announce("The station has cleared the meteor storm.", "Meteor Alert")
|
||||
else
|
||||
event_announcement.Announce("The station has cleared the meteor shower", "Meteor Alert")
|
||||
GLOB.event_announcement.Announce("The station has cleared the meteor shower", "Meteor Alert")
|
||||
|
||||
/datum/event/meteor_wave/proc/get_meteors()
|
||||
switch(severity)
|
||||
if(EVENT_LEVEL_MAJOR)
|
||||
return meteors_catastrophic
|
||||
return GLOB.meteors_catastrophic
|
||||
if(EVENT_LEVEL_MODERATE)
|
||||
return meteors_threatening
|
||||
return GLOB.meteors_threatening
|
||||
else
|
||||
return meteors_normal
|
||||
return GLOB.meteors_normal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#define MINIMUM_PERCENTAGE_LOSS 0.5
|
||||
#define VARIABLE_LOSS 2 // Invariant: 1 - VARIABLE_LOSS/10 >= MINIMUM_PERCENTAGE_LOSS
|
||||
|
||||
/var/global/account_hack_attempted = 0
|
||||
GLOBAL_VAR_INIT(account_hack_attempted, 0)
|
||||
|
||||
/datum/event/money_hacker
|
||||
var/datum/money_account/affected_account
|
||||
@@ -10,10 +10,10 @@
|
||||
|
||||
/datum/event/money_hacker/setup()
|
||||
end_time = world.time + 6000
|
||||
if(all_money_accounts.len)
|
||||
affected_account = pick(all_money_accounts)
|
||||
if(GLOB.all_money_accounts.len)
|
||||
affected_account = pick(GLOB.all_money_accounts)
|
||||
|
||||
account_hack_attempted = 1
|
||||
GLOB.account_hack_attempted = 1
|
||||
else
|
||||
kill()
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
var/purpose = pick("Ne$ ---ount fu%ds init*&lisat@*n","PAY BACK YOUR MUM","Funds withdrawal","pWnAgE","l33t hax","liberationez")
|
||||
var/date1 = "31 December, 1999"
|
||||
var/date2 = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], [rand(1000,3000)]"
|
||||
var/date = pick("", current_date_string, date1, date2)
|
||||
var/date = pick("", GLOB.current_date_string, date1, date2)
|
||||
var/time1 = rand(0, 99999999)
|
||||
var/time2 = "[round(time1 / 36000)+12]:[(time1 / 600 % 60) < 10 ? add_zero(time1 / 600 % 60, 1) : time1 / 600 % 60]"
|
||||
var/time = pick("", station_time_timestamp(), time2)
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
/datum/event/money_lotto/start()
|
||||
winner_sum = pick(5000, 10000, 50000, 100000, 500000, 1000000, 1500000)
|
||||
if(all_money_accounts.len)
|
||||
var/datum/money_account/D = pick(all_money_accounts)
|
||||
if(GLOB.all_money_accounts.len)
|
||||
var/datum/money_account/D = pick(GLOB.all_money_accounts)
|
||||
winner_name = D.owner_name
|
||||
|
||||
D.credit(winner_sum, "Winner!", "Biesel TCD Terminal #[rand(111,333)]", "Nyx Daily Grand Slam -Stellar- Lottery")
|
||||
@@ -21,10 +21,10 @@
|
||||
if(!deposit_success)
|
||||
newMsg.body += "<br>Unfortunately, we were unable to verify the account details provided, so we were unable to transfer the money. Send a cheque containing the sum of $500 to ND 'Stellar Slam' office on the Nyx gateway containing updated details, and your winnings'll be re-sent within the month."
|
||||
|
||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||
for(var/datum/feed_channel/FC in GLOB.news_network.network_channels)
|
||||
if(FC.channel_name == "Nyx Daily")
|
||||
FC.messages += newMsg
|
||||
break
|
||||
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allNewscasters)
|
||||
NEWSCASTER.newsAlert("Nyx Daily")
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
pick_message_server()
|
||||
|
||||
/datum/event/pda_spam/proc/pick_message_server()
|
||||
if(message_servers)
|
||||
for(var/obj/machinery/message_server/MS in message_servers)
|
||||
if(GLOB.message_servers)
|
||||
for(var/obj/machinery/message_server/MS in GLOB.message_servers)
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
@@ -28,7 +28,7 @@
|
||||
if(prob(5))
|
||||
// /obj/machinery/message_server/proc/send_pda_message(var/recipient = "",var/sender = "",var/message = "")
|
||||
var/list/viables = list()
|
||||
for(var/obj/item/pda/check_pda in PDAs)
|
||||
for(var/obj/item/pda/check_pda in GLOB.PDAs)
|
||||
var/datum/data/pda/app/messenger/check_m = check_pda.find_program(/datum/data/pda/app/messenger)
|
||||
|
||||
if(!check_m || !check_m.can_receive())
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/datum/event/prison_break/announce()
|
||||
if(areas && areas.len > 0)
|
||||
event_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] [(eventDept == "Security")? "imprisonment":"containment"] subroutines. Secure any compromised areas immediately. Station AI involvement is recommended.", "[eventDept] Alert")
|
||||
GLOB.event_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] [(eventDept == "Security")? "imprisonment":"containment"] subroutines. Secure any compromised areas immediately. Station AI involvement is recommended.", "[eventDept] Alert")
|
||||
|
||||
/datum/event/prison_break/start()
|
||||
for(var/area/A in world)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
announceWhen = 1
|
||||
|
||||
/datum/event/radiation_storm/announce()
|
||||
priority_announcement.Announce("High levels of radiation detected near the station. Maintenance is best shielded from radiation.", "Anomaly Alert", 'sound/AI/radiation.ogg')
|
||||
GLOB.priority_announcement.Announce("High levels of radiation detected near the station. Maintenance is best shielded from radiation.", "Anomaly Alert", 'sound/AI/radiation.ogg')
|
||||
//sound not longer matches the text, but an audible warning is probably good
|
||||
|
||||
/datum/event/radiation_storm/start()
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
msg = "Contact has been lost with a combat drone wing operating out of the NSV Icarus. If any are sighted in the area, approach with caution."
|
||||
else
|
||||
msg = "Unidentified hackers have targetted a combat drone wing deployed from the NSV Icarus. If any are sighted in the area, approach with caution."
|
||||
event_announcement.Announce(msg, "Rogue drone alert")
|
||||
GLOB.event_announcement.Announce(msg, "Rogue drone alert")
|
||||
|
||||
/datum/event/rogue_drone/tick()
|
||||
return
|
||||
@@ -46,6 +46,6 @@
|
||||
num_recovered++
|
||||
|
||||
if(num_recovered > drones_list.len * 0.75)
|
||||
event_announcement.Announce("Icarus drone control reports the malfunctioning wing has been recovered safely.", "Rogue drone alert")
|
||||
GLOB.event_announcement.Announce("Icarus drone control reports the malfunctioning wing has been recovered safely.", "Rogue drone alert")
|
||||
else
|
||||
event_announcement.Announce("Icarus drone control registers disappointment at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert")
|
||||
GLOB.event_announcement.Announce("Icarus drone control registers disappointment at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert")
|
||||
|
||||
@@ -656,7 +656,7 @@
|
||||
buckle_mob(V, 1)
|
||||
|
||||
/obj/structure/spacevine/proc/spread()
|
||||
var/list/dir_list = cardinal.Copy()
|
||||
var/list/dir_list = GLOB.cardinal.Copy()
|
||||
var/spread_search = FALSE // Whether to exhaustive search all 4 cardinal dirs for an open direction
|
||||
for(var/datum/spacevine_mutation/SM in mutations)
|
||||
spread_search |= SM.on_search(src)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/var/global/sent_spiders_to_station = 0
|
||||
GLOBAL_VAR_INIT(sent_spiders_to_station, 0)
|
||||
|
||||
/datum/event/spider_infestation
|
||||
announceWhen = 400
|
||||
@@ -7,10 +7,10 @@
|
||||
/datum/event/spider_infestation/setup()
|
||||
announceWhen = rand(announceWhen, announceWhen + 50)
|
||||
spawncount = round(num_players() * 0.8)
|
||||
sent_spiders_to_station = 1
|
||||
GLOB.sent_spiders_to_station = 1
|
||||
|
||||
/datum/event/spider_infestation/announce()
|
||||
event_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')
|
||||
GLOB.event_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')
|
||||
|
||||
/datum/event/spider_infestation/start()
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
spawncount = 1
|
||||
|
||||
/datum/event/spider_terror/announce()
|
||||
command_announcement.Announce("Confirmed outbreak of level 3 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/effects/siren-spooky.ogg')
|
||||
GLOB.command_announcement.Announce("Confirmed outbreak of level 3 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/effects/siren-spooky.ogg')
|
||||
|
||||
/datum/event/spider_terror/start()
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var/obj/effect/tear/TE
|
||||
|
||||
/datum/event/tear/announce()
|
||||
event_announcement.Announce("A tear in the fabric of space and time has opened. Expected location: [impact_area.name].", "Anomaly Alert")
|
||||
GLOB.event_announcement.Announce("A tear in the fabric of space and time has opened. Expected location: [impact_area.name].", "Anomaly Alert")
|
||||
|
||||
/datum/event/tear/start()
|
||||
var/turf/T = pick(get_area_turfs(impact_area))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
var/obj/effect/tear/honk/HE //i could just inherit but its being finicky.
|
||||
|
||||
/datum/event/tear/honk/announce()
|
||||
event_announcement.Announce("A Honknomoly has opened. Expected location: [impact_area.name].", "Honknomoly Alert", 'sound/items/airhorn.ogg')
|
||||
GLOB.event_announcement.Announce("A Honknomoly has opened. Expected location: [impact_area.name].", "Honknomoly Alert", 'sound/items/airhorn.ogg')
|
||||
|
||||
/datum/event/tear/honk/start()
|
||||
var/turf/T = pick(get_area_turfs(impact_area))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/global/list/unused_trade_stations = list("sol")
|
||||
GLOBAL_LIST_INIT(unused_trade_stations, list("sol"))
|
||||
|
||||
// Traders event.
|
||||
// Heavily copy-pasted from "heist" gamemode.
|
||||
@@ -10,14 +10,14 @@ var/global/list/unused_trade_stations = list("sol")
|
||||
var/list/trader_objectives = list()
|
||||
|
||||
/datum/event/traders/setup()
|
||||
if(unused_trade_stations.len)
|
||||
station = pick_n_take(unused_trade_stations)
|
||||
if(GLOB.unused_trade_stations.len)
|
||||
station = pick_n_take(GLOB.unused_trade_stations)
|
||||
|
||||
/datum/event/traders/start()
|
||||
if(!station) // If there are no unused stations, just no.
|
||||
return
|
||||
if(seclevel2num(get_security_level()) >= SEC_LEVEL_RED)
|
||||
event_announcement.Announce("A trading shuttle from Jupiter Station has been denied docking permission due to the heightened security alert aboard [station_name()].", "Trader Shuttle Docking Request Refused")
|
||||
GLOB.event_announcement.Announce("A trading shuttle from Jupiter Station has been denied docking permission due to the heightened security alert aboard [station_name()].", "Trader Shuttle Docking Request Refused")
|
||||
// if the docking request was refused, fire another major event in 60 seconds
|
||||
var/list/datum/event_container/EC = SSevents.event_containers[EVENT_LEVEL_MAJOR]
|
||||
EC.next_event_time = world.time + (60 * 10)
|
||||
@@ -54,9 +54,9 @@ var/global/list/unused_trade_stations = list("sol")
|
||||
greet_trader(M)
|
||||
success_spawn = 1
|
||||
if(success_spawn)
|
||||
event_announcement.Announce("A trading shuttle from Jupiter Station has been granted docking permission at [station_name()] arrivals port 4.", "Trader Shuttle Docking Request Accepted")
|
||||
GLOB.event_announcement.Announce("A trading shuttle from Jupiter Station has been granted docking permission at [station_name()] arrivals port 4.", "Trader Shuttle Docking Request Accepted")
|
||||
else
|
||||
unused_trade_stations += station // Return the station to the list of usable stations.
|
||||
GLOB.unused_trade_stations += station // Return the station to the list of usable stations.
|
||||
|
||||
/datum/event/traders/proc/greet_trader(var/mob/living/carbon/human/M)
|
||||
to_chat(M, "<span class='boldnotice'>You are a trader!</span>")
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/list/vents = list()
|
||||
|
||||
/datum/event/vent_clog/announce()
|
||||
event_announcement.Announce("The scrubbers network is experiencing a backpressure surge. Some ejection of contents may occur.", "Atmospherics alert")
|
||||
GLOB.event_announcement.Announce("The scrubbers network is experiencing a backpressure surge. Some ejection of contents may occur.", "Atmospherics alert")
|
||||
|
||||
/datum/event/vent_clog/setup()
|
||||
endWhen = rand(25, 100)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
endWhen = announceWhen + 1
|
||||
|
||||
/datum/event/wallrot/announce()
|
||||
event_announcement.Announce("Harmful fungi detected on station. Station structures may be contaminated.", "Biohazard Alert")
|
||||
GLOB.event_announcement.Announce("Harmful fungi detected on station. Station structures may be contaminated.", "Biohazard Alert")
|
||||
|
||||
/datum/event/wallrot/start()
|
||||
spawn()
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
wormholes += new /obj/effect/portal/wormhole(T, null, null, -1)
|
||||
|
||||
/datum/event/wormholes/announce()
|
||||
event_announcement.Announce("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert", new_sound = 'sound/AI/spanomalies.ogg')
|
||||
GLOB.event_announcement.Announce("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert", new_sound = 'sound/AI/spanomalies.ogg')
|
||||
|
||||
/datum/event/wormholes/tick()
|
||||
if(activeFor % shift_frequency == 0)
|
||||
@@ -57,7 +57,7 @@
|
||||
if(P && isturf(P.loc))
|
||||
target = P.loc
|
||||
|
||||
if(!target)
|
||||
if(!target)
|
||||
return FALSE
|
||||
|
||||
if(!do_teleport(M, target, 1, TRUE)) ///You will appear adjacent to the beacon
|
||||
|
||||
Reference in New Issue
Block a user