Completes the basic random event manager.

This commit is contained in:
PsiOmega
2014-11-08 17:43:37 +01:00
parent bd885164f1
commit 574a8f5570
28 changed files with 149 additions and 84 deletions

View File

@@ -117,3 +117,7 @@ var/list/sqrtTable = list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4,
var/d = max - min
var/t = Floor((val - min) / d)
return val - (t * d)
proc/RaiseToPower(num, power)
if(!power) return 1
return (power-- > 1 ? num * RaiseToPower(num, power) : num)

View File

@@ -106,9 +106,9 @@
/obj/machinery/door/airlock/AIShiftClick() // Opens and closes doors!
if(density)
Topic("aiEnable=7", list("aiEnable"="7"), 1) // 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "aiEnable"="7"), 1) // 1 meaning no window (consistency!)
else
Topic("aiDisable=7", list("aiDisable"="7"), 1)
Topic(src, list("src"= "\ref[src]", "aiDisable"="7"), 1)
return
/atom/proc/AICtrlClick()
@@ -116,15 +116,15 @@
/obj/machinery/door/airlock/AICtrlClick() // Bolts doors
if(locked)
Topic("aiEnable=4", list("aiEnable"="4"), 1)// 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "aiEnable"="4"), 1)// 1 meaning no window (consistency!)
else
Topic("aiDisable=4", list("aiDisable"="4"), 1)
Topic(src, list("src"= "\ref[src]", "aiDisable"="4"), 1)
/obj/machinery/power/apc/AICtrlClick() // turns off/on APCs.
Topic("breaker=1", list("breaker"="1"), 1) // 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "breaker"="1"), 1) // 1 meaning no window (consistency!)
/obj/machinery/turretid/AICtrlClick() //turns off/on Turrets
Topic("toggleOn", list("toggleOn"="1", 1)) // 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "toggleOn"="1", 1)) // 1 meaning no window (consistency!)
/atom/proc/AIAltClick(var/atom/A)
AltClick(A)
@@ -132,23 +132,23 @@
/obj/machinery/door/airlock/AIAltClick() // Electrifies doors.
if(!secondsElectrified)
// permanent shock
Topic("aiEnable=6", list("aiEnable"="6"), 1) // 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "aiEnable"="6"), 1) // 1 meaning no window (consistency!)
else
// disable/6 is not in Topic; disable/5 disables both temporary and permanent shock
Topic("aiDisable=5", list("aiDisable"="5"), 1)
Topic(src, list("src"= "\ref[src]", "aiDisable"="5"), 1)
return
/obj/machinery/turretid/AIAltClick() //toggles lethal on turrets
Topic("toggleLethal", list("toggleLethal"="1", 1)) // 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "toggleLethal"="1", 1)) // 1 meaning no window (consistency!)
/atom/proc/AIMiddleClick()
return
/obj/machinery/door/airlock/AIMiddleClick() // Toggles door bolt lights.
if(!src.lights)
Topic("aiEnable=10", list("aiEnable"="10"), 1) // 1 meaning no window (consistency!)
Topic(src, list("src"= "\ref[src]", "aiEnable"="10"), 1) // 1 meaning no window (consistency!)
else
Topic("aiDisable=10", list("aiDisable"="10"), 1)
Topic(src, list("src"= "\ref[src]", "aiDisable"="10"), 1)
return
//

View File

@@ -88,7 +88,7 @@
// Add the cortical borer event
var/list/moderate_event_list = event_manager.available_events[EVENT_LEVEL_MODERATE]
var/event = new /datum/event_meta(/datum/event/borer_infestation, 400)
var/event = new /datum/event_meta(EVENT_LEVEL_MODERATE, "Borer Infestation", /datum/event/borer_infestation, 400)
moderate_event_list.Add(event)
if(chosen_atypes)

View File

@@ -1,6 +1,7 @@
/var/global/sent_aliens_to_station = 0
/datum/event/alien_infestation
name = "Alien Infestation"
announceWhen = 400
oneShot = 1

View File

@@ -1,4 +1,5 @@
/datum/event/blob
name = "Blob"
announceWhen = 12
endWhen = 120

View File

@@ -1,6 +1,7 @@
//Cortical borer spawn event - care of RobRichards1997 with minor editing by Zuhayr.
/datum/event/borer_infestation
name = "Borer Infestation"
oneShot = 1
/datum/event/borer_infestation

View File

@@ -1,4 +1,5 @@
/datum/event/brand_intelligence
name = "Brand Intelligence"
announceWhen = 21
endWhen = 1000 //Ends when all vending machines are subverted anyway.
oneShot = 1

View File

@@ -1,3 +1,6 @@
/datum/event/communications_blackout
name = "Communications Blackout"
/datum/event/communications_blackout/announce()
var/alert = pick( "Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you*%fj00)`5vc-BZZT", \
"Ionospheric anomalies detected. Temporary telecommunication failu*3mga;b4;'1v<31>-BZZZT", \

View File

@@ -1,4 +1,5 @@
/datum/event/disease_outbreak
name = "Disease Outbreak"
announceWhen = 15
oneShot = 1

View File

@@ -1,4 +1,5 @@
/datum/event/electrical_storm
name = "Electrical Storm"
var/lightsoutAmount = 1
var/lightsoutRange = 25

View File

@@ -1,4 +1,5 @@
/datum/event_meta
var/name = ""
var/weight = 1
var/min_weight = 1
var/max_weight = 1
@@ -7,7 +8,8 @@
var/list/role_weights = list()
var/datum/event/event_type
/datum/event_meta/New(var/event_severity, var/datum/event/type, var/event_weight, var/list/job_weights, var/min_event_weight, var/max_event_weight)
/datum/event_meta/New(var/event_severity, var/event_name, var/datum/event/type, var/event_weight, var/list/job_weights, var/min_event_weight, var/max_event_weight)
name = event_name
severity = event_severity
event_type = type
weight = event_weight

View File

@@ -13,50 +13,58 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
/datum/event_manager
var/list/available_events = list(
EVENT_LEVEL_MUNDANE = list(
// Severity level, even type, base weight, role weights, min weight, max weight. Last two only used if set and non-zero
new /datum/event_meta(EVENT_LEVEL_MUNDANE, /datum/event/pda_spam, 0, list(ASSIGNMENT_ANY = 4), 25, 200),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, /datum/event/money_lotto, 0, list(ASSIGNMENT_ANY = 1), 5, 50),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, /datum/event/money_hacker, 0, list(ASSIGNMENT_ANY = 4), 25, 200),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, /datum/event/economic_event, 300),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, /datum/event/trivial_news, 400),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, /datum/event/mundane_news, 300),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, /datum/event/carp_migration, 20, list(ASSIGNMENT_SECURITY = 10)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, /datum/event/brand_intelligence, 20, list(ASSIGNMENT_JANITOR = 25)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, /datum/event/infestation, 100, list(ASSIGNMENT_JANITOR = 100)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50)),
// Severity level, event name, even type, base weight, role weights, min weight, max weight. Last two only used if set and non-zero
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Nothing", /datum/event/nothing, 100),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "PDA Spam", /datum/event/pda_spam, 0, list(ASSIGNMENT_ANY = 4), 25, 200),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Money Lotto", /datum/event/money_lotto, 0, list(ASSIGNMENT_ANY = 1), 5, 50),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Money Hacker", /datum/event/money_hacker, 0, list(ASSIGNMENT_ANY = 4), 25, 200),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Economic News", /datum/event/economic_event, 300),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Trivial News", /datum/event/trivial_news, 400),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mundane News", /datum/event/mundane_news, 300),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Carp", /datum/event/carp_migration, 20, list(ASSIGNMENT_SECURITY = 10)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wall root", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Brand Intelligence", /datum/event/brand_intelligence, 20, list(ASSIGNMENT_JANITOR = 25)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Vermin Infestation", /datum/event/infestation, 100, list(ASSIGNMENT_JANITOR = 100)),
),
EVENT_LEVEL_MODERATE = list(
new /datum/event_meta(EVENT_LEVEL_MODERATE, /datum/event/nothing, 10),
new /datum/event_meta(EVENT_LEVEL_MODERATE, /datum/event/carp_migration, 20, list(ASSIGNMENT_SECURITY = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, /datum/event/rogue_drone, 5, list(ASSIGNMENT_ENGINEER = 25, ASSIGNMENT_SECURITY = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, /datum/event/spacevine, 10, list(ASSIGNMENT_ENGINEER = 5)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, /datum/event/meteor_shower, 0, list(ASSIGNMENT_ENGINEER = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, /datum/event/communications_blackout, 50, list(ASSIGNMENT_AI = 25, ASSIGNMENT_SECURITY = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, /datum/event/grid_check, 25, list(ASSIGNMENT_ENGINEER = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, /datum/event/electrical_storm, 15, list(ASSIGNMENT_ENGINEER = 5, ASSIGNMENT_JANITOR = 15)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, /datum/event/radiation_storm, 0, list(ASSIGNMENT_MEDICAL = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, /datum/event/spontaneous_appendicitis, 0, list(ASSIGNMENT_MEDICAL = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, /datum/event/spider_infestation, 5, list(ASSIGNMENT_SECURITY = 5)),
new /datum/event_meta/alien(EVENT_LEVEL_MODERATE, /datum/event/alien_infestation, 2.5,list(ASSIGNMENT_SECURITY = 1), max_event_weight = 5),
new /datum/event_meta/ninja(EVENT_LEVEL_MODERATE, /datum/event/space_ninja, 0, list(ASSIGNMENT_SECURITY = 1), max_event_weight = 5),
new /datum/event_meta(EVENT_LEVEL_MODERATE, /datum/event/ionstorm, 0, list(ASSIGNMENT_AI = 25, ASSIGNMENT_CYBORG = 25, ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SCIENTIST = 5)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Nothing", /datum/event/nothing, 10),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp Infestation", /datum/event/carp_migration, 20, list(ASSIGNMENT_SECURITY = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 5, list(ASSIGNMENT_ENGINEER = 25, ASSIGNMENT_SECURITY = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space vines", /datum/event/spacevine, 10, list(ASSIGNMENT_ENGINEER = 5)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_shower, 0, list(ASSIGNMENT_ENGINEER = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Communication Blackout", /datum/event/communications_blackout, 50, list(ASSIGNMENT_AI = 25, ASSIGNMENT_SECURITY = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 25, list(ASSIGNMENT_ENGINEER = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Electrical Storm", /datum/event/electrical_storm, 15, list(ASSIGNMENT_ENGINEER = 5, ASSIGNMENT_JANITOR = 15)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 0, list(ASSIGNMENT_MEDICAL = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Appendicitis", /datum/event/spontaneous_appendicitis, 0, list(ASSIGNMENT_MEDICAL = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation",/datum/event/spider_infestation, 5, list(ASSIGNMENT_SECURITY = 5)),
new /datum/event_meta/alien(EVENT_LEVEL_MODERATE, "Alien Infestation", /datum/event/alien_infestation, 2.5,list(ASSIGNMENT_SECURITY = 1), max_event_weight = 5),
new /datum/event_meta/ninja(EVENT_LEVEL_MODERATE, "Space Ninja", /datum/event/space_ninja, 0, list(ASSIGNMENT_SECURITY = 1), max_event_weight = 5),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, 0, list(ASSIGNMENT_AI = 25, ASSIGNMENT_CYBORG = 25, ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SCIENTIST = 5)),
),
EVENT_LEVEL_MAJOR = list(
new /datum/event_meta(EVENT_LEVEL_MAJOR, /datum/event/nothing, 100),
new /datum/event_meta(EVENT_LEVEL_MAJOR, /datum/event/carp_migration, 0, list(ASSIGNMENT_SECURITY = 10)),
new /datum/event_meta(EVENT_LEVEL_MAJOR, /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 10)),
new /datum/event_meta(EVENT_LEVEL_MAJOR, /datum/event/blob, 0, list(ASSIGNMENT_ENGINEER = 10)),
new /datum/event_meta(EVENT_LEVEL_MAJOR, /datum/event/meteor_wave, 0, list(ASSIGNMENT_ENGINEER = 10)),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Nothing", /datum/event/nothing, 100),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Carp Migration", /datum/event/carp_migration, 0, list(ASSIGNMENT_SECURITY = 10)),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 10)),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob", /datum/event/blob, 0, list(ASSIGNMENT_ENGINEER = 10)),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, 0, list(ASSIGNMENT_ENGINEER = 10)),
)
)
var/window_x = 370
var/window_y = 530
var/table_options = " align='center'"
var/row_options1 = " width='85px'"
var/row_options2 = " width='260px'"
var/list/datum/event/active_events = list()
var/list/datum/event/finished_events = list()
var/list/datum/event/allEvents
var/list/last_event_time = list()
var/list/next_event = list(EVENT_LEVEL_MUNDANE = null, EVENT_LEVEL_MODERATE = null, EVENT_LEVEL_MAJOR = null)
var/list/next_event_time = list(EVENT_LEVEL_MUNDANE = 0, EVENT_LEVEL_MODERATE = 0, EVENT_LEVEL_MAJOR = 0)
var/list/delay_modifier = list(EVENT_LEVEL_MUNDANE = 1, EVENT_LEVEL_MODERATE = 1, EVENT_LEVEL_MAJOR = 1)
@@ -68,29 +76,27 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
E.process()
for(var/i = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
if(next_event_time[i] == 0)
// Our first time running, setup start times
set_event_delay(i)
else
// Is it time to fire a new event of this severity level?
if(world.timeofday > next_event_time[i])
start_event(i)
// Is it time to fire a new event of this severity level?
if(world.timeofday > next_event_time[i])
process_event_start(i)
/datum/event_manager/proc/start_event(var/severity)
var/datum/event_meta/EM = acquire_event(available_events[severity])
if(!EM)
// If no event was available now, check again in one minute (rather than next process tick)
next_event_time[severity] = next_event_time[severity] + (60 * 10)
return
/datum/event_manager/proc/process_event_start(var/severity)
var/event = next_event[severity]
if(event)
start_event(event)
// Set when the event of this type was last fired and when to fire the next event
// Attempt to select a new event
next_event[severity] = acquire_event(available_events[severity])
if(next_event[severity]) // If we got an event, set the next delay proper
set_event_delay(severity)
else // Otherwise, wait for one minute (rather than next process tick) before checking again
next_event_time[severity] += (60 * 10)
/datum/event_manager/proc/start_event(var/datum/event_meta/EM)
// Set when the event of this type was last fired
last_event_time[EM] = world.timeofday
set_event_delay(severity)
// Remove the event meta data from the list of available events
available_events[severity] -= EM
log_debug("Starting event of severity [severity].")
log_debug("Starting event of severity [EM.severity].")
new EM.event_type(EM) // Events are added and removed from the processing queue in New/Del
/datum/event_manager/proc/acquire_event(var/list/events)
@@ -117,7 +123,9 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
if(possible_events.len == 0)
return null
// Select an event and remove it from the pool of available events
var/picked_event = pickweight(possible_events)
events -= picked_event
return picked_event
/datum/event_manager/proc/set_event_delay(var/severity)
@@ -163,8 +171,6 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
/datum/event_manager/proc/Interact(var/mob/living/user)
var/window_x = 370
var/window_y = 470
var/html = GetInteractWindow()
@@ -173,42 +179,65 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
popup.open()
/datum/event_manager/proc/GetInteractWindow()
var/table_options = " align='center'"
var/row_options1 = " width='80px'"
var/row_options2 = " width='260px'"
var html = "<A align='right' href='?src=\ref[src];refresh=1'>Refresh</A><br>"
var/html = "<div class='block'>"
html += "<h3>Event Manager</h3>"
html += "<A align='right' href='?src=\ref[src];refresh=1'>Refresh</A><br>"
html += "<div class='block'>"
html += "<h2>Event Start</h2>"
html += "<table[table_options]>"
html += "<tr><td>Severity</td><td>Time</td><td>Until start</td></tr>"
html += "<tr><td>Severity</td><td>Until start</td><td>Adjust start</td></tr>"
for(var/severity = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
var/station_time = max(0, next_event_time[severity] - world.timeofday)
var/event_time = max(0, next_event_time[severity] - world.timeofday)
html += "<tr>"
html += "<td[row_options1]>[severity_to_string[severity]]</font></td>"
html += "<td[row_options1]>[worldtime2text(station_time)]</td>"
html += "<td[row_options1]>[station_time / 600]</td>"
html += "<td[row_options1]>[event_time / 600]</td>"
html += "<td[row_options2]>"
html += "<A align='right' href='?src=\ref[src];refresh=1'>---</A>"
html += "<A align='right' href='?src=\ref[src];refresh=1'>--</A>"
html += "<A align='right' href='?src=\ref[src];refresh=1'>-</A>"
html += "<A align='right' href='?src=\ref[src];refresh=1'>+</A>"
html += "<A align='right' href='?src=\ref[src];refresh=1'>++</A>"
html += "<A align='right' href='?src=\ref[src];refresh=1'>+++</A>"
html += "<A align='right' href='?src=\ref[src];dec_timer=2;severity=[severity]'>--</A>"
html += "<A align='right' href='?src=\ref[src];dec_timer=1;severity=[severity]'>-</A>"
html += "<A align='right' href='?src=\ref[src];inc_timer=1;severity=[severity]'>+</A>"
html += "<A align='right' href='?src=\ref[src];inc_timer=2;severity=[severity]'>++</A>"
html += "</td>"
html += "</tr>"
html += "</table>"
html += "</div>"
html += "<div class='block'>"
html += "<h2>Next Event</h2>"
html += "<table[table_options]>"
html += "<tr><td>Severity</td><td>Name</td></tr>"
for(var/severity = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
var/datum/event_meta/EM = next_event[severity]
html += "<tr>"
html += "<td[row_options1]>[severity_to_string[severity]]</font></td>"
html += "<td[row_options2]><A align='right' href='?src=\ref[src];select_event=1;severity=[severity]'>[EM ? EM.name : "Nothing"]</A></td>"
html += "</tr>"
html += "</table>"
html += "</div>"
return html
/datum/event_manager/Topic(href, href_list)
if(..())
return
var/severity = text2num(href_list["severity"])
if(href_list["dec_timer"])
next_event_time[severity] -= (60 * RaiseToPower(10, text2num(href_list["dec_timer"])))
else if(href_list["inc_timer"])
next_event_time[severity] += (60 * RaiseToPower(10, text2num(href_list["inc_timer"])))
else if(href_list["select_event"])
SelectEvent(severity)
Interact(usr)
/datum/event_manager/proc/SelectEvent(var/severity)
var/datum/event_meta/EM = input("Select an event to queue up.", "Event Selection", null) as null|anything in available_events[severity]
if(!EM)
return
if(next_event[severity])
available_events[severity] += next_event[severity]
available_events[severity] -= EM
next_event[severity] = EM
/proc/debugStartEvent(var/severity)
event_manager.start_event(severity)

View File

@@ -1,4 +1,5 @@
/datum/event/grid_check //NOTE: Times are measured in master controller ticks!
name = "Grid Check"
announceWhen = 5
/datum/event/grid_check/setup()

View File

@@ -14,6 +14,7 @@
#define VERM_SPIDERS 2
/datum/event/infestation
name = "Vermin Infestation"
announceWhen = 10
endWhen = 11
var/location

View File

@@ -1,6 +1,7 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/datum/event/ionstorm
name = "Ion Storm"
var/botEmagChance = 0.5
var/list/players = list()

View File

@@ -2,6 +2,7 @@
//meteor storms are much heavier
/datum/event/meteor_wave
name = "Meteor Wave"
startWhen = 6
endWhen = 33
@@ -20,6 +21,7 @@
//
/datum/event/meteor_shower
name = "Meteor Shower"
startWhen = 5
endWhen = 7
var/next_meteor = 6

View File

@@ -1,6 +1,7 @@
/var/global/account_hack_attempted = 0
/datum/event/money_hacker
name = "Money Hacker"
var/datum/money_account/affected_account
endWhen = 100
var/end_time

View File

@@ -1,4 +1,5 @@
/datum/event/money_lotto
name = "Money Lotto"
var/winner_name = "John Smith"
var/winner_sum = 0
var/deposit_success = 0

View File

@@ -1,4 +1,5 @@
/datum/event/pda_spam
name = "PDA Spam"
endWhen = 36000
var/last_spam_time = 0
var/obj/machinery/message_server/useMS

View File

@@ -1,4 +1,5 @@
/datum/event/prison_break
name = "Prison Break"
announceWhen = 50
oneShot = 1

View File

@@ -1,4 +1,5 @@
/datum/event/radiation_storm
name = "Radiation Storm"
var/const/enterBelt = 60
var/const/leaveBelt = 170
var/const/revokeAccess = 230

View File

@@ -1,4 +1,5 @@
/datum/event/rogue_drone
name = "Rogue Drones"
startWhen = 10
endWhen = 1000
var/list/drones_list = list()

View File

@@ -1,2 +1,5 @@
/datum/event/space_ninja
name = "Space Ninja"
/datum/event/space_ninja/setup()
space_ninja_arrival()

View File

@@ -1,6 +1,7 @@
/var/global/spacevines_spawned = 0
/datum/event/spacevine
name = "Space Vines"
oneShot = 1
/datum/event/spacevine/start()

View File

@@ -1,6 +1,7 @@
/var/global/sent_spiders_to_station = 0
/datum/event/spider_infestation
name = "Large Spider Infestation"
announceWhen = 400
oneShot = 1

View File

@@ -1,3 +1,6 @@
/datum/event/spontaneous_appendicitis
name = "Communicatinos Blackout"
/datum/event/spontaneous_appendicitis/start()
for(var/mob/living/carbon/human/H in shuffle(living_mob_list)) if(H.client && H.stat != DEAD)
var/foundAlready = 0 //don't infect someone that already has the virus

View File

@@ -1,4 +1,5 @@
datum/event/viral_infection/setup()
name = "Viral Outbreak"
announceWhen = rand(0, 3000)
endWhen = announceWhen + 1

View File

@@ -1,4 +1,5 @@
datum/event/wallrot/setup()
name = "Wallroot"
announceWhen = rand(0, 300)
endWhen = announceWhen + 1