Event overhaul from Bay, atmos fixes

This commit is contained in:
Markolie
2015-01-21 23:05:59 +01:00
parent 183362eabd
commit 956f2ba703
83 changed files with 1093 additions and 8446 deletions
+12 -9
View File
@@ -63,7 +63,8 @@ var/list/admin_verbs_admin = list(
/client/proc/toggledrones,
/client/proc/man_up,
/client/proc/global_man_up,
/client/proc/delbook
/client/proc/delbook,
/client/proc/event_manager_panel
)
var/list/admin_verbs_ban = list(
/client/proc/unban_panel,
@@ -410,18 +411,20 @@ var/list/admin_verbs_mod = list(
/client/proc/give_disease2(mob/T as mob in mob_list) // -- Giacom
set category = "Event"
set category = "Fun"
set name = "Give Disease"
set desc = "Gives a Disease to a mob."
var/datum/disease2/disease/D = new /datum/disease2/disease()
var/greater = ((input("Is this a lesser or greater disease?", "Give Disease") in list("Lesser", "Greater")) == "Greater")
D.makerandom(greater)
if (!greater)
D.infectionchance = 1
var/severity = 1
var/greater = input("Is this a lesser, greater, or badmin disease?", "Give Disease") in list("Lesser", "Greater", "Badmin")
switch(greater)
if ("Lesser") severity = 1
if ("Greater") severity = 2
if ("Badmin") severity = 99
D.makerandom(severity)
D.infectionchance = input("How virulent is this disease? (1-100)", "Give Disease", D.infectionchance) as num
if(istype(T,/mob/living/carbon/human))
@@ -434,8 +437,8 @@ var/list/admin_verbs_mod = list(
infect_virus2(T,D,1)
feedback_add_details("admin_verb","GD2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] gave [key_name(T)] a [(greater)? "greater":"lesser"] disease2 with infection chance [D.infectionchance].")
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] a [(greater)? "greater":"lesser"] disease2 with infection chance [D.infectionchance].", 1)
log_admin("[key_name(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].")
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].", 1)
/client/proc/make_sound(var/obj/O in world) // -- TLE
set category = "Event"
+11 -12
View File
@@ -2,7 +2,6 @@
/datum/event/alien_infestation
announceWhen = 400
oneShot = 1
var/spawncount = 1
var/successSpawn = 0 //So we don't make a command report if nothing gets spawned.
@@ -13,6 +12,7 @@
spawncount = rand(1, 2)
sent_aliens_to_station = 1
/datum/event/alien_infestation/announce()
if(successSpawn)
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
@@ -21,21 +21,20 @@
/datum/event/alien_infestation/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology
vents += temp_vent
var/list/candidates = get_candidates(BE_ALIEN, ALIEN_AFK_BRACKET)
var/list/candidates = get_candidates(BE_ALIEN)
while(spawncount > 0 && vents.len && candidates.len)
var/obj/vent = pick(vents)
var/candidate = pick(candidates)
var/obj/vent = pick_n_take(vents)
var/client/C = pick_n_take(candidates)
if(C)
respawnable_list -= C
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
new_xeno.key = C.key
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
new_xeno.key = candidate
candidates -= candidate
vents -= vent
spawncount--
successSpawn = 1
spawncount--
successSpawn = 1
+10 -1
View File
@@ -45,15 +45,24 @@
command_alert("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [nukecode] ", "Biohazard Alert")
set_security_level("gamma")
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
if(V && V.z == 1)
V.locked = 0
V.update_icon()
for (var/mob/living/silicon/ai/aiPlayer in player_list)
if (aiPlayer.client)
var/law = "The station is under quarantine, prevent biological entities from leaving the station at all costs. The nuclear failsafe must be activated at any cost, the code is: [nukecode]."
aiPlayer.set_zeroth_law(law)
aiPlayer << "\red <b>You have detected a change in your laws information:</b>"
aiPlayer << "Laws Updated: [law]"
spawn(10)
world << sound('sound/effects/siren.ogg')
/datum/event/blob/kill()
command_alert("The level 7 biohazard aboard [station_name()] has been killed. Directive 7-10 has been lifted, and the station is no longer quarantined.", "Biohazard Update")
command_alert("The level 7 biohazard aboard [station_name()] has been eliminated. Directive 7-10 has been lifted, and the station is no longer quarantined.", "Biohazard Update")
for (var/mob/living/silicon/ai/aiPlayer in player_list)
if (aiPlayer.client)
+2 -5
View File
@@ -1,12 +1,9 @@
//Cortical borer spawn event - care of RobRichards1997 with minor editing by Zuhayr.
/datum/event/borer_infestation
oneShot = 1
/datum/event/borer_infestation
announceWhen = 400
var/spawncount = 1
var/spawncount = 5
var/successSpawn = 0 //So we don't make a command report if nothing gets spawned.
/datum/event/borer_infestation/setup()
@@ -26,7 +23,7 @@
if(temp_vent.network.normal_members.len > 50)
vents += temp_vent
var/list/candidates = get_candidates(BE_ALIEN, ALIEN_AFK_BRACKET)
var/list/candidates = get_candidates(BE_ALIEN)
while(spawncount > 0 && vents.len && candidates.len)
var/obj/vent = pick_n_take(vents)
var/client/C = pick_n_take(candidates)
+4 -7
View File
@@ -7,11 +7,9 @@
var/list/obj/machinery/vending/infectedVendingMachines = list()
var/obj/machinery/vending/originMachine
/datum/event/brand_intelligence/announce()
command_alert("Rampant brand intelligence has been detected aboard [station_name()], please stand-by.", "Machine Learning Alert")
/datum/event/brand_intelligence/start()
for(var/obj/machinery/vending/V in machines)
if(V.z != 1) continue
@@ -34,7 +32,7 @@
return
if(IsMultiple(activeFor, 5))
if(prob(25))
if(prob(15))
var/obj/machinery/vending/infectedMachine = pick(vendingMachines)
vendingMachines.Remove(infectedMachine)
infectedVendingMachines.Add(infectedMachine)
@@ -43,7 +41,7 @@
if(IsMultiple(activeFor, 12))
originMachine.speak(pick("Try our aggressive new marketing strategies!", \
"You should buy products to feed your lifestyle obession!", \
"You should buy products to feed your lifestyle obsession!", \
"Consume!", \
"Your money can buy happiness!", \
"Engage direct marketing!", \
@@ -52,6 +50,5 @@
/datum/event/brand_intelligence/end()
for(var/obj/machinery/vending/infectedMachine in infectedVendingMachines)
if(prob(90))
infectedMachine.shut_up = 1
infectedMachine.shoot_inventory = 0
infectedMachine.shut_up = 1
infectedMachine.shoot_inventory = 0
+1 -1
View File
@@ -2,7 +2,7 @@
announceWhen = 5
/datum/event/cargo_bonus/announce()
command_alert("Congratulations! [station_name()] was chosen for supply limit increase, please contact local cargo department for details!.", "Supply Alert")
command_alert("Congratulations! [station_name()] was chosen for supply limit increase, please contact local cargo department for details!", "Supply Alert")
/datum/event/cargo_bonus/start()
supply_controller.points+=rand(100,500)
+1 -5
View File
@@ -1,6 +1,5 @@
/datum/event/carp_migration
announceWhen = 50
oneShot = 1
endWhen = 900
var/list/spawned_carp = list()
@@ -12,12 +11,9 @@
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
/datum/event/carp_migration/start()
scaling_factor = num_players() / 25
for(var/obj/effect/landmark/C in landmarks_list)
if(C.name == "carpspawn")
if(prob(60 * scaling_factor))
spawned_carp.Add(new /mob/living/simple_animal/hostile/carp(C.loc))
spawned_carp.Add(new /mob/living/simple_animal/hostile/carp(C.loc))
/datum/event/carp_migration/end()
for(var/mob/living/simple_animal/hostile/carp/C in spawned_carp)
-2
View File
@@ -1,6 +1,4 @@
/proc/communications_blackout(var/silent = 1)
if(!silent)
command_alert("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT")
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
@@ -1,10 +1,10 @@
/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¬-BZZZT", \
"Ionospheric anomalies detected. Temporary telecommunication failu*3mga;b4;'1v?-BZZZT", \
"Ionospheric anomalies detected. Temporary telec#MCi46:5.;@63-BZZZZT", \
"Ionospheric anomalies dete'fZ\\kg5_0-BZZZZZT", \
"Ionospheri:%£ MCayj^j<.3-BZZZZZZT", \
"#4nd%;f4y6,>£%-BZZZZZZZT")
"Ionospheri:%? MCayj^j<.3-BZZZZZZT", \
"#4nd%;f4y6,>?%-BZZZZZZZT")
for(var/mob/living/silicon/ai/A in player_list) //AIs are always aware of communication blackouts.
A << "<br>"
@@ -14,7 +14,6 @@
if(prob(30)) //most of the time, we don't want an announcement, so as to allow AIs to fake blackouts.
command_alert(alert)
/datum/event/communications_blackout/start()
for(var/obj/machinery/telecomms/T in telecomms_list)
T.emp_act(1)
-1
View File
@@ -2,7 +2,6 @@
announceWhen = 15
oneShot = 1
/datum/event/disease_outbreak/announce()
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak7.ogg')
+1 -3
View File
@@ -2,11 +2,9 @@
var/lightsoutAmount = 1
var/lightsoutRange = 25
/datum/event/electrical_storm/announce()
command_alert("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()
+82 -25
View File
@@ -1,12 +1,67 @@
/datum/event_meta
var/name = ""
var/enabled = 1 // Whether or not the event is available for random selection at all
var/weight = 0 // The base weight of this event. A zero means it may never fire, but see get_weight()
var/min_weight = 0 // The minimum weight that this event will have. Only used if non-zero.
var/max_weight = 0 // The maximum weight that this event will have. Only use if non-zero.
var/severity = 0 // The current severity of this event
var/one_shot = 0 //If true, then the event will not be re-added to the list of available events
var/list/role_weights = list()
var/datum/event/event_type
/datum/event_meta/New(var/event_severity, var/event_name, var/datum/event/type, var/event_weight, var/list/job_weights, var/is_one_shot = 0, var/min_event_weight = 0, var/max_event_weight = 0)
name = event_name
severity = event_severity
event_type = type
one_shot = is_one_shot
weight = event_weight
min_weight = min_event_weight
max_weight = max_event_weight
if(job_weights)
role_weights = job_weights
/datum/event_meta/proc/get_weight(var/list/active_with_role)
if(!enabled)
return 0
var/job_weight = 0
for(var/role in role_weights)
if(role in active_with_role)
job_weight += active_with_role[role] * role_weights[role]
var/total_weight = weight + job_weight
// Only min/max the weight if the values are non-zero
if(min_weight && total_weight < min_weight) total_weight = min_weight
if(max_weight && total_weight > max_weight) total_weight = max_weight
return total_weight
/datum/event_meta/alien/get_weight(var/list/active_with_role)
if(aliens_allowed)
return ..(active_with_role)
return 0
/datum/event_meta/ninja/get_weight(var/list/active_with_role)
if(toggle_space_ninja)
return ..(active_with_role)
return 0
/datum/event //NOTE: Times are measured in master controller ticks!
var/startWhen = 0 //When in the lifetime to call start().
var/announceWhen = 0 //When in the lifetime to call announce().
var/endWhen = 0 //When in the lifetime the event should end.
var/oneShot = 0 //If true, then the event removes itself from the list of potential events on creation.
var/severity = 0 //Severity. Lower means less severe, higher means more severe. Does not have to be supported. Is set on New().
var/activeFor = 0 //How long the event has existed. You don't need to change this.
var/area/impact_area
var/scaling_factor // Used to scale spawns to server pop.
var/isRunning = 1 //If this event is currently running. You should not change this.
var/startedAt = 0 //When this event started.
var/endedAt = 0 //When this event ended.
var/area/impact_area //The area the event will hit
var/datum/event_meta/event_meta = null
/datum/event/nothing
//Called first before processing.
//Allows you to setup your event, such as randomly
//setting the startWhen and or announceWhen variables.
@@ -42,52 +97,54 @@
/datum/event/proc/end()
return
//Returns the latest point of event processing.
/datum/event/proc/lastProcessAt()
return max(startWhen, max(announceWhen, endWhen))
//Do not override this proc, instead use the appropiate procs.
//This proc will handle the calls to the appropiate procs.
/datum/event/proc/process()
if(activeFor > startWhen && activeFor < endWhen)
tick()
if(activeFor == startWhen)
isRunning = 1
start()
if(activeFor == announceWhen)
announce()
if(activeFor == endWhen)
isRunning = 0
end()
// Everything is done, let's clean up.
if(activeFor >= endWhen && activeFor >= announceWhen && activeFor >= startWhen)
if(activeFor >= lastProcessAt())
kill()
activeFor++
//Garbage collects the event by removing it from the global events list,
//which should be the only place it's referenced.
//Called when start(), announce() and end() has all been called.
/datum/event/proc/kill()
events.Remove(src)
// If this event was forcefully killed run end() for individual cleanup
if(isRunning)
isRunning = 0
end()
endedAt = world.time
event_manager.active_events -= src
event_manager.event_complete(src)
/datum/event/New(var/datum/event_meta/EM)
// event needs to be responsible for this, as stuff like APLUs currently make their own events for curious reasons
event_manager.active_events += src
event_meta = EM
severity = event_meta.severity
if(severity < EVENT_LEVEL_MUNDANE) severity = EVENT_LEVEL_MUNDANE
if(severity > EVENT_LEVEL_MAJOR) severity = EVENT_LEVEL_MAJOR
startedAt = world.time
//Adds the event to the global events list, and removes it from the list
//of potential events.
/datum/event/New()
setup()
events.Add(src)
score_eventsendured++
/*if(oneShot)
potentialRandomEvents.Remove(type)*/
..()
/datum/event/proc/num_players()
var/players = 0
for(var/mob/living/carbon/human/P in player_list)
if(P.client)
players++
return players
+192
View File
@@ -0,0 +1,192 @@
#define ASSIGNMENT_ANY "Any"
#define ASSIGNMENT_AI "AI"
#define ASSIGNMENT_CYBORG "Cyborg"
#define ASSIGNMENT_ENGINEER "Engineer"
#define ASSIGNMENT_GARDENER "Gardener"
#define ASSIGNMENT_JANITOR "Janitor"
#define ASSIGNMENT_MEDICAL "Medical"
#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")
/datum/event_container
var/severity = -1
var/delayed = 0
var/delay_modifier = 1
var/next_event_time = 0
var/list/available_events
var/list/last_event_time = list()
var/datum/event_meta/next_event = null
var/last_world_time = 0
/datum/event_container/proc/process()
if(!next_event_time)
set_event_delay()
if(delayed)
next_event_time += (world.time - last_world_time)
else if(world.time > next_event_time)
start_event()
last_world_time = world.time
/datum/event_container/proc/start_event()
if(!next_event) // If non-one has explicitly set an event, randomly pick one
next_event = acquire_event()
// Has an event been acquired?
if(next_event)
// Set when the event of this type was last fired, and prepare the next event start
last_event_time[next_event] = world.time
set_event_delay()
next_event.enabled = !next_event.one_shot // This event will no longer be available in the random rotation if one shot
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]].")
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.
next_event_time += (60 * 10)
/datum/event_container/proc/acquire_event()
if(available_events.len == 0)
return
var/active_with_role = number_active_with_role()
var/list/possible_events = list()
for(var/datum/event_meta/EM in available_events)
var/event_weight = EM.get_weight(active_with_role)
if(EM.enabled && event_weight)
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/weight_modifier = max(0, (config.expected_round_length - time_passed) / 300)
var/new_weight = max(possible_events[event_meta] - weight_modifier, 0)
if(new_weight)
possible_events[event_meta] = new_weight
else
possible_events -= event_meta
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)
available_events -= picked_event
return picked_event
/datum/event_container/proc/set_event_delay()
// If the next event time has not yet been set and we have a custom first time start
if(next_event_time == 0 && config.event_first_run[severity])
var/lower = config.event_first_run[severity]["lower"]
var/upper = config.event_first_run[severity]["upper"]
var/event_delay = rand(lower, upper)
next_event_time = world.time + event_delay
// Otherwise, follow the standard setup process
else
var/playercount_modifier = 1
switch(player_list.len)
if(0 to 10)
playercount_modifier = 1.2
if(11 to 15)
playercount_modifier = 1.1
if(16 to 25)
playercount_modifier = 1
if(26 to 35)
playercount_modifier = 0.9
if(36 to 100000)
playercount_modifier = 0.8
playercount_modifier = playercount_modifier * delay_modifier
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.")
/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
if(!EM)
return
if(next_event)
available_events += next_event
available_events -= EM
next_event = EM
return EM
/datum/event_container/mundane
severity = EVENT_LEVEL_MUNDANE
available_events = list(
// Severity level, event name, even type, base weight, role weights, one shot, 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), 0, 25, 50),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Money Lotto", /datum/event/money_lotto, 0, list(ASSIGNMENT_ANY = 1), 1, 5, 15),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Money Hacker", /datum/event/money_hacker, 0, list(ASSIGNMENT_ANY = 4), 1, 10, 25),
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, "Lost Carp", /datum/event/carp_migration, 20, list(ASSIGNMENT_SECURITY = 10), 1),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Brand Intelligence",/datum/event/brand_intelligence,20, list(ASSIGNMENT_JANITOR = 25), 1),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Vermin Infestation",/datum/event/infestation, 100, list(ASSIGNMENT_JANITOR = 100)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50)),
// NON-BAY EVENTS
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Cargo Bonus", /datum/event/cargo_bonus, 150),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mass Hallucination",/datum/event/mass_hallucination,200),
)
/datum/event_container/moderate
severity = EVENT_LEVEL_MODERATE
available_events = list(
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Nothing", /datum/event/nothing, 1230),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 100, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SECURITY = 20), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 20, list(ASSIGNMENT_SECURITY = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space vines", /datum/event/spacevine, 200, list(ASSIGNMENT_ENGINEER = 10)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_shower, 0, list(ASSIGNMENT_ENGINEER = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meaty Ores", /datum/event/dust/meaty, 0, list(ASSIGNMENT_ENGINEER = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Communication Blackout", /datum/event/communications_blackout, 500, list(ASSIGNMENT_AI = 150, ASSIGNMENT_SECURITY = 120)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 0, list(ASSIGNMENT_SECURITY = 100)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 200, list(ASSIGNMENT_ENGINEER = 60)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Electrical Storm", /datum/event/electrical_storm, 250, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_JANITOR = 150)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 0, list(ASSIGNMENT_MEDICAL = 50), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 150)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 100, list(ASSIGNMENT_SECURITY = 30), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, 0, list(ASSIGNMENT_AI = 50, ASSIGNMENT_CYBORG = 50, ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_SCIENTIST = 5)),
new /datum/event_meta/alien(EVENT_LEVEL_MODERATE, "Alien Infestation", /datum/event/alien_infestation, 2.5, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5),
new /datum/event_meta/ninja(EVENT_LEVEL_MODERATE, "Space Ninja", /datum/event/space_ninja, 0, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5),
// NON-BAY EVENTS
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space Dust", /datum/event/dust, 50, list(ASSIGNMENT_ENGINEER = 50)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Dimensional Tear", /datum/event/tear, 0, list(ASSIGNMENT_SECURITY = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Wormholes", /datum/event/wormholes, 150),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Pyro Anomaly", /datum/event/anomaly/anomaly_pyro, 100, list(ASSIGNMENT_ENGINEER = 60)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Vortex Anomaly", /datum/event/anomaly/anomaly_vortex, 50, list(ASSIGNMENT_ENGINEER = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Bluespace Anomaly", /datum/event/anomaly/anomaly_bluespace, 50, list(ASSIGNMENT_ENGINEER = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Flux Anomaly", /datum/event/anomaly/anomaly_flux, 50, list(ASSIGNMENT_ENGINEER = 50)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Gravitational Anomaly", /datum/event/anomaly/anomaly_grav, 200),
)
/datum/event_container/major
severity = EVENT_LEVEL_MAJOR
available_events = list(
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Nothing", /datum/event/nothing, 1320),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Carp Migration", /datum/event/carp_migration, 0, list(ASSIGNMENT_SECURITY = 3), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 30), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob", /datum/event/blob, 0, list(ASSIGNMENT_ENGINEER = 60), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, 0, list(ASSIGNMENT_ENGINEER = 3), 1),
)
#undef ASSIGNMENT_ANY
#undef ASSIGNMENT_AI
#undef ASSIGNMENT_CYBORG
#undef ASSIGNMENT_ENGINEER
#undef ASSIGNMENT_GARDENER
#undef ASSIGNMENT_JANITOR
#undef ASSIGNMENT_MEDICAL
#undef ASSIGNMENT_SCIENTIST
#undef ASSIGNMENT_SECURITY
+41 -50
View File
@@ -21,8 +21,9 @@
*/
var/list/event_last_fired = list()
var/global/list/possibleEvents = list()
//Always triggers an event when called, dynamically chooses events based on job population
var/global/list/possibleEvents = list()
/proc/spawn_dynamic_event()
if(!config.allow_random_events)
return
@@ -39,77 +40,66 @@ var/global/list/possibleEvents = list()
// Maps event names to event chances
// For each chance, 100 represents "normal likelihood", anything below 100 is "reduced likelihood", anything above 100 is "increased likelihood"
// Events have to be manually added to this proc to happen
// var/list/possibleEvents = list()
//see:
// Code/WorkInProgress/Cael_Aislinn/Economy/Economy_Events.dm
// Code/WorkInProgress/Cael_Aislinn/Economy/Economy_Events_Mundane.dm
possibleEvents[/datum/event/economic_event] = 150
possibleEvents[/datum/event/trivial_news] = 200
possibleEvents[/datum/event/mundane_news] = 150
possibleEvents[/datum/event/economic_event] = 300
possibleEvents[/datum/event/trivial_news] = 400
possibleEvents[/datum/event/mundane_news] = 300
possibleEvents[/datum/event/cargo_bonus] = 150
possibleEvents[/datum/event/mass_hallucination] = 200
possibleEvents[/datum/event/falsealarm] = 300
// possibleEvents[/datum/event/immovable_rod] = 200
possibleEvents[/datum/event/vent_clog] = 300
possibleEvents[/datum/event/anomaly/anomaly_grav] = 200
// possibleEvents[/datum/event/weightless] = 150
possibleEvents[/datum/event/wormholes] = 150
possibleEvents[/datum/event/pda_spam] = max(min(25, player_list.len) * 4, 200)
possibleEvents[/datum/event/money_lotto] = max(min(5, player_list.len), 50)
// if(!account_hack_attempted)
// possibleEvents[/datum/event/money_hacker] = max(min(25, player_list.len) * 4, 200)
if(account_hack_attempted)
possibleEvents[/datum/event/money_hacker] = max(min(25, player_list.len) * 4, 200)
possibleEvents[/datum/event/carp_migration] = 50 + 25 * active_with_role["Engineer"]
possibleEvents[/datum/event/mass_hallucination] = 200
possibleEvents[/datum/event/vent_clog] = 300
possibleEvents[/datum/event/anomaly/anomaly_grav] = 200
possibleEvents[/datum/event/wormholes] = 150
possibleEvents[/datum/event/carp_migration] = 20 + 10 * active_with_role["Engineer"]
possibleEvents[/datum/event/brand_intelligence] = 20 + 25 * active_with_role["Janitor"]
possibleEvents[/datum/event/dust] = 50 + 50 * active_with_role["Engineer"]
possibleEvents[/datum/event/dust/meaty] = 50 + 50 * active_with_role["Engineer"]
possibleEvents[/datum/event/rogue_drone] = 5 + 25 * active_with_role["Engineer"] + 25 * active_with_role["Security"]
possibleEvents[/datum/event/infestation] = 100 + 100 * active_with_role["Janitor"]
possibleEvents[/datum/event/rogue_drone] = 25 + 25 * active_with_role["Engineer"] + 25 * active_with_role["Security"]
possibleEvents[/datum/event/infestation] = 50 + 25 * active_with_role["Janitor"]
possibleEvents[/datum/event/communications_blackout] = 50 + 30 * active_with_role["AI"] + active_with_role["Scientist"] * 25
possibleEvents[/datum/event/ionstorm] = active_with_role["AI"] * 75 + active_with_role["Cyborg"] * 25 + active_with_role["Engineer"] * 10 + active_with_role["Scientist"] * 5
// possibleEvents[/datum/event/grid_check] = 25 + 20 * active_with_role["Engineer"]
possibleEvents[/datum/event/electrical_storm] = 150 + 10 * active_with_role["Janitor"] + 5 * active_with_role["Engineer"]
possibleEvents[/datum/event/wallrot] = 30 * active_with_role["Engineer"] + 50 * active_with_role["Botanist"]
possibleEvents[/datum/event/spacevine] = 25 + 5 * active_with_role["Engineer"]
possibleEvents[/datum/event/biomass] = 25 + 5 * active_with_role["Engineer"]
possibleEvents[/datum/event/communications_blackout] = 50 + 25 * active_with_role["AI"] + active_with_role["Scientist"] * 25
possibleEvents[/datum/event/ionstorm] = active_with_role["AI"] * 25 + active_with_role["Cyborg"] * 25 + active_with_role["Engineer"] * 10 + active_with_role["Scientist"] * 5
possibleEvents[/datum/event/grid_check] = 25 + 10 * active_with_role["Engineer"]
possibleEvents[/datum/event/electrical_storm] = 15 * active_with_role["Janitor"] + 5 * active_with_role["Engineer"]
possibleEvents[/datum/event/wallrot] = 30 * active_with_role["Engineer"] + 50 * active_with_role["Gardener"]
if(!spacevines_spawned)
possibleEvents[/datum/event/spacevine] = 10 + 5 * active_with_role["Engineer"]
if(minutes_passed >= 30) // Give engineers time to set up engine
possibleEvents[/datum/event/meteor_wave] = 10 * active_with_role["Engineer"]
possibleEvents[/datum/event/meteor_shower] = 40 * active_with_role["Engineer"]
possibleEvents[/datum/event/anomaly/anomaly_pyro] = 100 + 60 * active_with_role["Engineer"]
possibleEvents[/datum/event/anomaly/anomaly_vortex] = 50 + 25 * active_with_role["Engineer"]
possibleEvents[/datum/event/anomaly/anomaly_bluespace] = 50 + 25 * active_with_role["Engineer"]
possibleEvents[/datum/event/anomaly/anomaly_flux] = 50 + 50 * active_with_role["Engineer"]
if(minutes_passed >= 60) //Delay for potentially destructive events.
possibleEvents[/datum/event/blob] = 20 * active_with_role["Engineer"]
possibleEvents[/datum/event/brand_intelligence] = 50 + 25 * active_with_role["Engineer"]
possibleEvents[/datum/event/spider_infestation] = 50 + 25 * active_with_role["Security"]
possibleEvents[/datum/event/borer_infestation] = 50 + 25 * active_with_role["Security"]
possibleEvents[/datum/event/anomaly/anomaly_flux] = 50 + 50 * active_with_role["Engineer"]
possibleEvents[/datum/event/meteor_wave] = 10 * active_with_role["Engineer"]
possibleEvents[/datum/event/meteor_shower] = 20 * active_with_role["Engineer"]
possibleEvents[/datum/event/blob] = 10 * active_with_role["Engineer"]
if(active_with_role["Medical"] > 0)
possibleEvents[/datum/event/radiation_storm] = active_with_role["Medical"] * 50
possibleEvents[/datum/event/viral_outbreak] = active_with_role["Medical"] * 5
possibleEvents[/datum/event/organ_failure] = active_with_role["Medical"] * 50
possibleEvents[/datum/event/viral_infection] = 25 + active_with_role["Medical"] * 50
possibleEvents[/datum/event/radiation_storm] = active_with_role["Medical"] * 10
possibleEvents[/datum/event/viral_infection] = active_with_role["Medical"] * 10
possibleEvents[/datum/event/prison_break] = active_with_role["Security"] * 30
possibleEvents[/datum/event/prison_break] = active_with_role["Security"] * 50
if(active_with_role["Security"] > 0)
if(!sent_spiders_to_station)
possibleEvents[/datum/event/spider_infestation] = max(active_with_role["Security"], 5) + 5
if(aliens_allowed && !sent_aliens_to_station)
possibleEvents[/datum/event/alien_infestation] = max(active_with_role["Security"], 5) + 2.5
if(!sent_ninja_to_station && toggle_space_ninja)
possibleEvents[/datum/event/space_ninja] = active_with_role["Security"] * 5
//possibleEvents[/datum/event/undead] = active_with_role["Security"] * 15
//possibleEvents[/datum/event/ghosts] = active_with_role["Security"] * 25
possibleEvents[/datum/event/space_ninja] = max(active_with_role["Security"], 5)
possibleEvents[/datum/event/tear] = active_with_role["Security"] * 25
for(var/event_type in event_last_fired) if(possibleEvents[event_type])
@@ -205,7 +195,7 @@ var/global/list/possibleEvents = list()
// 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()
var/list/active_with_role = list()
active_with_role["Engineer"] = 0
active_with_role["Medical"] = 0
@@ -214,7 +204,8 @@ var/global/list/possibleEvents = list()
active_with_role["AI"] = 0
active_with_role["Cyborg"] = 0
active_with_role["Janitor"] = 0
active_with_role["Botanist"] = 0
active_with_role["Gardener"] = 0
active_with_role["Any"] = player_list.len
for(var/mob/M in player_list)
if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
@@ -247,7 +238,7 @@ var/global/list/possibleEvents = list()
if(M.mind.assigned_role == "Janitor")
active_with_role["Janitor"]++
if(M.mind.assigned_role == "Botanist")
active_with_role["Botanist"]++
if(M.mind.assigned_role == "Gardener")
active_with_role["Gardener"]++
return active_with_role
+285 -50
View File
@@ -1,61 +1,284 @@
var/list/allEvents = typesof(/datum/event) - /datum/event
var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event
//var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event - /datum/event/spider_infestation - /datum/event/alien_infestation
/datum/event_manager
var/window_x = 700
var/window_y = 600
var/report_at_round_end = 0
var/table_options = " align='center'"
var/row_options1 = " width='85px'"
var/row_options2 = " width='260px'"
var/row_options3 = " width='150px'"
var/datum/event_container/selected_event_container = null
var/eventTimeLower = 9000 //15 minutes
var/eventTimeUpper = 15000 //25 minutes
var/scheduledEvent = null
var/list/datum/event/active_events = list()
var/list/datum/event/finished_events = list()
var/list/datum/event/allEvents
var/list/datum/event_container/event_containers = list(
EVENT_LEVEL_MUNDANE = new/datum/event_container/mundane,
EVENT_LEVEL_MODERATE = new/datum/event_container/moderate,
EVENT_LEVEL_MAJOR = new/datum/event_container/major
)
//Currently unused. Needs an admin panel for messing with events.
/*/proc/addPotentialEvent(var/type)
potentialRandomEvents |= type
var/datum/event_meta/new_event = new
/proc/removePotentialEvent(var/type)
potentialRandomEvents -= type*/
/datum/event_manager/New()
allEvents = typesof(/datum/event) - /datum/event
/datum/event_manager/proc/process()
for(var/datum/event/E in event_manager.active_events)
E.process()
/proc/checkEvent()
if(!scheduledEvent)
//more players = more time between events, less players = less time between events
var/playercount_modifier = 1
switch(player_list.len)
if(0 to 10)
playercount_modifier = 1.2
if(11 to 15)
playercount_modifier = 1.1
if(16 to 25)
playercount_modifier = 1
if(26 to 35)
playercount_modifier = 0.9
if(36 to 100000)
playercount_modifier = 0.8
var/next_event_delay = rand(eventTimeLower, eventTimeUpper) * playercount_modifier
scheduledEvent = world.timeofday + next_event_delay
log_debug("Next event in [next_event_delay/600] minutes.")
for(var/i = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
var/list/datum/event_container/EC = event_containers[i]
EC.process()
else if(world.timeofday > scheduledEvent)
spawn_dynamic_event()
scheduledEvent = null
checkEvent()
//unused, see proc/dynamic_event()
/*
/proc/spawnEvent()
if(!config.allow_random_events)
/datum/event_manager/proc/event_complete(var/datum/event/E)
if(!E.event_meta) // datum/event is used here and there for random reasons, maintaining "backwards compatibility"
log_debug("Event of '[E.type]' with missing meta-data has completed.")
return
var/Type = pick(potentialRandomEvents)
if(!Type)
finished_events += E
// Add the event back to the list of available events
var/datum/event_container/EC = event_containers[E.severity]
var/datum/event_meta/EM = E.event_meta
EC.available_events += EM
log_debug("Event '[EM.name]' has completed at [worldtime2text()].")
/datum/event_manager/proc/delay_events(var/severity, var/delay)
var/list/datum/event_container/EC = event_containers[severity]
EC.next_event_time += delay
/datum/event_manager/proc/Interact(var/mob/living/user)
var/html = GetInteractWindow()
var/datum/browser/popup = new(user, "event_manager", "Event Manager", window_x, window_y)
popup.set_content(html)
popup.open()
/datum/event_manager/proc/RoundEnd()
if(!report_at_round_end)
return
//The event will add itself to the MC's event list
//and start working via the constructor.
new Type
*/
world << "<br><br><br><font size=3><b>Random Events This Round:</b></font>"
for(var/datum/event/E in active_events|finished_events)
var/datum/event_meta/EM = E.event_meta
if(EM.name == "Nothing")
continue
var/message = "'[EM.name]' began at [worldtime2text(E.startedAt)] "
if(E.isRunning)
message += "and is still running."
else
if(E.endedAt - E.startedAt > MinutesToTicks(5)) // Only mention end time if the entire duration was more than 5 minutes
message += "and ended at [worldtime2text(E.endedAt)]."
else
message += "and ran to completion."
/client/proc/forceEvent(var/type in allEvents)
world << message
/datum/event_manager/proc/GetInteractWindow()
var/html = "<A align='right' href='?src=\ref[src];refresh=1'>Refresh</A>"
if(selected_event_container)
var/event_time = max(0, selected_event_container.next_event_time - world.time)
html += "<A align='right' href='?src=\ref[src];back=1'>Back</A><br>"
html += "Time till start: [round(event_time / 600, 0.1)]<br>"
html += "<div class='block'>"
html += "<h2>Available [severity_to_string[selected_event_container.severity]] Events (queued & running events will not be displayed)</h2>"
html += "<table[table_options]>"
html += "<tr><td[row_options2]>Name </td><td>Weight </td><td>MinWeight </td><td>MaxWeight </td><td>OneShot </td><td>Enabled </td><td><span class='alert'>CurrWeight </span></td><td>Remove</td></tr>"
for(var/datum/event_meta/EM in selected_event_container.available_events)
html += "<tr>"
html += "<td>[EM.name]</td>"
html += "<td><A align='right' href='?src=\ref[src];set_weight=\ref[EM]'>[EM.weight]</A></td>"
html += "<td>[EM.min_weight]</td>"
html += "<td>[EM.max_weight]</td>"
html += "<td><A align='right' href='?src=\ref[src];toggle_oneshot=\ref[EM]'>[EM.one_shot]</A></td>"
html += "<td><A align='right' href='?src=\ref[src];toggle_enabled=\ref[EM]'>[EM.enabled]</A></td>"
html += "<td><span class='alert'>[EM.get_weight(number_active_with_role())]</span></td>"
html += "<td><A align='right' href='?src=\ref[src];remove=\ref[EM];EC=\ref[selected_event_container]'>Remove</A></td>"
html += "</tr>"
html += "</table>"
html += "</div>"
html += "<div class='block'>"
html += "<h2>Add Event</h2>"
html += "<table[table_options]>"
html += "<tr><td[row_options2]>Name</td><td[row_options2]>Type</td><td[row_options1]>Weight</td><td[row_options1]>OneShot</td></tr>"
html += "<tr>"
html += "<td><A align='right' href='?src=\ref[src];set_name=\ref[new_event]'>[new_event.name ? new_event.name : "Enter Event"]</A></td>"
html += "<td><A align='right' href='?src=\ref[src];set_type=\ref[new_event]'>[new_event.event_type ? new_event.event_type : "Select Type"]</A></td>"
html += "<td><A align='right' href='?src=\ref[src];set_weight=\ref[new_event]'>[new_event.weight ? new_event.weight : 0]</A></td>"
html += "<td><A align='right' href='?src=\ref[src];toggle_oneshot=\ref[new_event]'>[new_event.one_shot]</A></td>"
html += "</tr>"
html += "</table>"
html += "<A align='right' href='?src=\ref[src];add=\ref[selected_event_container]'>Add</A><br>"
html += "</div>"
else
html += "<A align='right' href='?src=\ref[src];toggle_report=1'>Round End Report: [report_at_round_end ? "On": "Off"]</A><br>"
html += "<div class='block'>"
html += "<h2>Event Start</h2>"
html += "<table[table_options]>"
html += "<tr><td[row_options1]>Severity</td><td[row_options1]>Starts At</td><td[row_options1]>Starts In</td><td[row_options3]>Adjust Start</td><td[row_options1]>Pause</td><td[row_options1]>Interval Mod</td></tr>"
for(var/severity = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
var/datum/event_container/EC = event_containers[severity]
var/next_event_at = max(0, EC.next_event_time - world.time)
html += "<tr>"
html += "<td>[severity_to_string[severity]]</td>"
html += "<td>[worldtime2text(max(EC.next_event_time, world.time))]</td>"
html += "<td>[round(next_event_at / 600, 0.1)]</td>"
html += "<td>"
html += "<A align='right' href='?src=\ref[src];dec_timer=2;event=\ref[EC]'>--</A>"
html += "<A align='right' href='?src=\ref[src];dec_timer=1;event=\ref[EC]'>-</A>"
html += "<A align='right' href='?src=\ref[src];inc_timer=1;event=\ref[EC]'>+</A>"
html += "<A align='right' href='?src=\ref[src];inc_timer=2;event=\ref[EC]'>++</A>"
html += "</td>"
html += "<td>"
html += "<A align='right' href='?src=\ref[src];pause=\ref[EC]'>[EC.delayed ? "Resume" : "Pause"]</A>"
html += "</td>"
html += "<td>"
html += "<A align='right' href='?src=\ref[src];interval=\ref[EC]'>[EC.delay_modifier]</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[row_options1]>Severity</td><td[row_options2]>Name</td><td[row_options3]>Event Rotation</td><td>Clear</td></tr>"
for(var/severity = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
var/datum/event_container/EC = event_containers[severity]
var/datum/event_meta/EM = EC.next_event
html += "<tr>"
html += "<td>[severity_to_string[severity]]</td>"
html += "<td><A align='right' href='?src=\ref[src];select_event=\ref[EC]'>[EM ? EM.name : "Random"]</A></td>"
html += "<td><A align='right' href='?src=\ref[src];view_events=\ref[EC]'>View</A></td>"
html += "<td><A align='right' href='?src=\ref[src];clear=\ref[EC]'>Clear</A></td>"
html += "</tr>"
html += "</table>"
html += "</div>"
html += "<div class='block'>"
html += "<h2>Running Events</h2>"
html += "Estimated times, affected by master controller delays."
html += "<table[table_options]>"
html += "<tr><td[row_options1]>Severity</td><td[row_options2]>Name</td><td[row_options1]>Ends At</td><td[row_options1]>Ends In</td><td[row_options3]>Stop</td></tr>"
for(var/datum/event/E in active_events)
if(!E.event_meta)
continue
var/datum/event_meta/EM = E.event_meta
var/ends_at = E.startedAt + (E.lastProcessAt() * master_controller.minimum_ticks) // A best estimate
var/ends_in = max(0, round((ends_at - world.time) / 600, 0.1))
html += "<tr>"
html += "<td>[severity_to_string[EM.severity]]</td>"
html += "<td>[EM.name]</td>"
html += "<td>[worldtime2text(ends_at)]</td>"
html += "<td>[ends_in]</td>"
html += "<td><A align='right' href='?src=\ref[src];stop=\ref[E]'>Stop</A></td>"
html += "</tr>"
html += "</table>"
html += "</div>"
return html
/datum/event_manager/Topic(href, href_list)
if(..())
return
if(href_list["toggle_report"])
report_at_round_end = !report_at_round_end
admin_log_and_message_admins("has [report_at_round_end ? "enabled" : "disabled"] the round end event report.")
else if(href_list["dec_timer"])
var/datum/event_container/EC = locate(href_list["event"])
var/decrease = (60 * RaiseToPower(10, text2num(href_list["dec_timer"])))
EC.next_event_time -= decrease
admin_log_and_message_admins("decreased timer for [severity_to_string[EC.severity]] events by [decrease/600] minute(s).")
else if(href_list["inc_timer"])
var/datum/event_container/EC = locate(href_list["event"])
var/increase = (60 * RaiseToPower(10, text2num(href_list["inc_timer"])))
EC.next_event_time += increase
admin_log_and_message_admins("increased timer for [severity_to_string[EC.severity]] events by [increase/600] minute(s).")
else if(href_list["select_event"])
var/datum/event_container/EC = locate(href_list["select_event"])
var/datum/event_meta/EM = EC.SelectEvent()
if(EM)
admin_log_and_message_admins("has queued the [severity_to_string[EC.severity]] event '[EM.name]'.")
else if(href_list["pause"])
var/datum/event_container/EC = locate(href_list["pause"])
EC.delayed = !EC.delayed
admin_log_and_message_admins("has [EC.delayed ? "paused" : "resumed"] countdown for [severity_to_string[EC.severity]] events.")
else if(href_list["interval"])
var/delay = input("Enter delay modifier. A value less than one means events fire more often, higher than one less often.", "Set Interval Modifier") as num|null
if(delay && delay > 0)
var/datum/event_container/EC = locate(href_list["interval"])
EC.delay_modifier = delay
admin_log_and_message_admins("has set the interval modifier for [severity_to_string[EC.severity]] events to [EC.delay_modifier].")
else if(href_list["stop"])
if(alert("Stopping an event may have unintended side-effects. Continue?","Stopping Event!","Yes","No") != "Yes")
return
var/datum/event/E = locate(href_list["stop"])
var/datum/event_meta/EM = E.event_meta
admin_log_and_message_admins("has stopped the [severity_to_string[EM.severity]] event '[EM.name]'.")
E.kill()
else if(href_list["view_events"])
selected_event_container = locate(href_list["view_events"])
else if(href_list["back"])
selected_event_container = null
else if(href_list["set_name"])
var/name = input("Enter event name.", "Set Name") as text|null
if(name)
var/datum/event_meta/EM = locate(href_list["set_name"])
EM.name = name
else if(href_list["set_type"])
var/type = input("Select event type.", "Select") as null|anything in allEvents
if(type)
var/datum/event_meta/EM = locate(href_list["set_type"])
EM.event_type = type
else if(href_list["set_weight"])
var/weight = input("Enter weight. A higher value means higher chance for the event of being selected.", "Set Weight") as num|null
if(weight && weight > 0)
var/datum/event_meta/EM = locate(href_list["set_weight"])
EM.weight = weight
if(EM != new_event)
admin_log_and_message_admins("has changed the weight of the [severity_to_string[EM.severity]] event '[EM.name]' to [EM.weight].")
else if(href_list["toggle_oneshot"])
var/datum/event_meta/EM = locate(href_list["toggle_oneshot"])
EM.one_shot = !EM.one_shot
if(EM != new_event)
admin_log_and_message_admins("has [EM.one_shot ? "set" : "unset"] the oneshot flag for the [severity_to_string[EM.severity]] event '[EM.name]'.")
else if(href_list["toggle_enabled"])
var/datum/event_meta/EM = locate(href_list["toggle_enabled"])
EM.enabled = !EM.enabled
admin_log_and_message_admins("has [EM.enabled ? "enabled" : "disabled"] the [severity_to_string[EM.severity]] event '[EM.name]'.")
else if(href_list["remove"])
if(alert("This will remove the event from rotation. Continue?","Removing Event!","Yes","No") != "Yes")
return
var/datum/event_meta/EM = locate(href_list["remove"])
var/datum/event_container/EC = locate(href_list["EC"])
EC.available_events -= EM
admin_log_and_message_admins("has removed the [severity_to_string[EM.severity]] event '[EM.name]'.")
else if(href_list["add"])
if(!new_event.name || !new_event.event_type)
return
if(alert("This will add a new event to the rotation. Continue?","Add Event!","Yes","No") != "Yes")
return
new_event.severity = selected_event_container.severity
selected_event_container.available_events += new_event
admin_log_and_message_admins("has added \a [severity_to_string[new_event.severity]] event '[new_event.name]' of type [new_event.event_type] with weight [new_event.weight].")
new_event = new
else if(href_list["clear"])
var/datum/event_container/EC = locate(href_list["clear"])
if(EC.next_event)
admin_log_and_message_admins("has dequeued the [severity_to_string[EC.severity]] event '[EC.next_event.name]'.")
EC.next_event = null
Interact(usr)
/client/proc/forceEvent(var/type in event_manager.allEvents)
set name = "Trigger Event (Debug Only)"
set category = "Debug"
@@ -63,11 +286,17 @@ var/scheduledEvent = null
return
if(ispath(type))
new type
new type(new /datum/event_meta(EVENT_LEVEL_MAJOR))
message_admins("[key_name_admin(usr)] has triggered an event. ([type])", 1)
/client/proc/event_manager_panel()
set name = "Event Manager Panel"
set category = "Admin"
if(event_manager)
event_manager.Interact(usr)
feedback_add_details("admin_verb","EMP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
/datum/event/proc/findEventArea() //Here's a nice proc to use to find an area for your event to land in!
var/area/candidate = null
@@ -112,4 +341,10 @@ var/scheduledEvent = null
break
return candidate
/datum/event/proc/num_players()
var/players = 0
for(var/mob/living/carbon/human/P in player_list)
if(P.client)
players++
return players
-241
View File
@@ -1,241 +0,0 @@
/*
VOX HEIST ROUNDTYPE
*/
#define MAX_VOX_KILLS 10 //Number of kills during the round before the Inviolate is broken.
//Would be nice to use vox-specific kills but is currently not feasible.
var/global/vox_kills = 0 //Used to check the Inviolate.
var/global/vox_sent=0
var/global/list/datum/mind/raiders = list() //Antags.
/datum/event/heist
var/list/raid_objectives = list() //Raid objectives.
var/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind' objective.
announceWhen = 600
oneShot = 1
var/required_candidates = 4
var/max_candidates = 6
var/successSpawn = 0 //So we don't make a command report if nothing gets spawned.
/datum/event/heist/setup()
announceWhen = rand(announceWhen, announceWhen + 50)
sent_aliens_to_station = 1
/datum/event/heist/announce()
return
/datum/event/heist/start()
if(!..())
return 0
var/list/candidates = get_candidates(BE_RAIDER)
var/raider_num = 0
//Check that we have enough vox.
if(candidates.len < required_candidates)
return 0
else if(candidates.len < max_candidates)
raider_num = candidates.len
else
raider_num = max_candidates
//Grab candidates randomly until we have enough.
while(raider_num > 0)
var/datum/mind/new_raider = pick(candidates)
raiders += new_raider
candidates -= new_raider
raider_num--
for(var/datum/mind/raider in raiders)
raider.assigned_role = "MODE"
raider.special_role = "Vox Raider"
//Build a list of spawn points.
var/list/turf/raider_spawn = list()
for(var/obj/effect/landmark/L in landmarks_list)
if(L.name == "voxstart")
raider_spawn += get_turf(L)
del(L)
continue
//Generate objectives for the group.
raid_objectives = forge_vox_objectives()
var/index = 1
//Spawn the vox!
for(var/datum/mind/raider in raiders)
if(index > raider_spawn.len)
index = 1
raider.current.loc = raider_spawn[index]
index++
var/mob/living/carbon/human/vox = raider.current
vox.age = rand(12,20)
vox.dna.mutantrace = "vox"
vox.set_species("Vox")
vox.generate_name()
vox.languages = list() // Removing language from chargen.
vox.flavor_text = ""
vox.add_language("Vox-pidgin")
vox.h_style = "Short Vox Quills"
vox.f_style = "Shaved"
for(var/datum/organ/external/limb in vox.organs)
limb.status &= ~(ORGAN_DESTROYED | ORGAN_ROBOT)
vox.equip_vox_raider()
vox.regenerate_icons()
raider.objectives = raid_objectives
greet_vox(raider)
vox_sent=1
/datum/event/heist/proc/is_raider_crew_safe()
if(cortical_stacks.len == 0)
return 0
for(var/obj/stack in cortical_stacks)
if (get_area(stack) != locate(/area/shuttle/vox/station))
return 0
return 1
/datum/event/heist/proc/is_raider_crew_alive()
for(var/datum/mind/raider in raiders)
if(raider.current)
if(istype(raider.current,/mob/living/carbon/human) && raider.current.stat != 2)
return 1
return 0
/datum/event/heist/proc/forge_vox_objectives()
//Commented out for testing.
/* var/i = 1
var/max_objectives = pick(2,2,2,3,3)
var/list/objs = list()
while(i<= max_objectives)
var/list/goals = list("kidnap","loot","salvage")
var/goal = pick(goals)
var/datum/objective/heist/O
if(goal == "kidnap")
goals -= "kidnap"
O = new /datum/objective/heist/kidnap()
else if(goal == "loot")
O = new /datum/objective/heist/loot()
else
O = new /datum/objective/heist/salvage()
O.choose_target()
objs += O
i++
//-All- vox raids have these two objectives. Failing them loses the game.
objs += new /datum/objective/heist/inviolate_crew
objs += new /datum/objective/heist/inviolate_death */
if(prob(25)) // This is an asspain.
raid_objectives += new /datum/objective/heist/kidnap
raid_objectives += new /datum/objective/heist/loot
raid_objectives += new /datum/objective/heist/salvage
raid_objectives += new /datum/objective/heist/inviolate_crew
raid_objectives += new /datum/objective/heist/inviolate_death
for(var/datum/objective/heist/O in raid_objectives)
O.choose_target()
return raid_objectives
/datum/event/heist/proc/greet_vox(var/datum/mind/raider)
raider.current << {"\blue <B>You are a Vox Raider, fresh from the Shoal!</b>
The Vox are a race of cunning, sharp-eyed nomadic raiders and traders endemic to Tau Ceti and much of the unexplored galaxy. You and the crew have come to the [station_name()] for plunder, trade or both.
Vox are cowardly and will flee from larger groups, but corner one or find them en masse and they are vicious.
Use :V to voxtalk, :H to talk on your encrypted channel, and <b>don't forget to turn on your nitrogen internals!</b>"}
var/obj_count = 1
for(var/datum/objective/objective in raider.objectives)
raider.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
/datum/event/heist/proc/declare_completion()
//No objectives, go straight to the feedback.
if(!(raid_objectives.len)) return ..()
var/win_type = "Major"
var/win_group = "Crew"
var/win_msg = ""
var/success = raid_objectives.len
//Decrease success for failed objectives.
for(var/datum/objective/O in raid_objectives)
if(!(O.check_completion())) success--
//Set result by objectives.
if(success == raid_objectives.len)
win_type = "Major"
win_group = "Vox"
else if(success > 2)
win_type = "Minor"
win_group = "Vox"
else
win_type = "Minor"
win_group = "Crew"
//Now we modify that result by the state of the vox crew.
if(!is_raider_crew_alive())
win_type = "Major"
win_group = "Crew"
win_msg += "<B>The Vox Raiders have been wiped out!</B>"
else if(!is_raider_crew_safe())
if(win_group == "Crew" && win_type == "Minor")
win_type = "Major"
win_group = "Crew"
win_msg += "<B>The Vox Raiders have left someone behind!</B>"
else
if(win_group == "Vox")
if(win_type == "Minor")
win_type = "Major"
win_msg += "<B>The Vox Raiders escaped the station!</B>"
else
win_msg += "<B>The Vox Raiders were repelled!</B>"
world << {"\red <FONT size = 3><B>[win_type] [win_group] victory!</B></FONT>
[win_msg]"}
feedback_set_details("round_end_result","heist - [win_type] [win_group]")
var/count = 1
for(var/datum/objective/objective in raid_objectives)
if(objective.check_completion())
world << "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font>"
feedback_add_details("traitor_objective","[objective.type]|SUCCESS")
else
world << "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='red'>Fail.</font>"
feedback_add_details("traitor_objective","[objective.type]|FAIL")
count++
..()
/datum/event/heist/proc/check_finished()
if (!(is_raider_crew_alive()) || (vox_shuttle_location && (vox_shuttle_location == "start")))
return 1
return ..()
+12 -18
View File
@@ -7,12 +7,11 @@
#define LOC_VAULT 6
#define LOC_CONSTR 7
#define LOC_TECH 8
#define LOC_ARMORY 9
#define VERM_MICE 0
#define VERM_MICE 0
#define VERM_LIZARDS 1
#define VERM_SPIDERS 2
#define VERM_SLIMES 3
#define VERM_BATS 4
/datum/event/infestation
announceWhen = 10
@@ -22,9 +21,9 @@
var/vermin
var/vermstring
/datum/event/infestation/start()
location = rand(0,8)
location = rand(0,9)
var/list/turf/simulated/floor/turfs = list()
var/spawn_area_type
switch(location)
@@ -55,6 +54,9 @@
if(LOC_TECH)
spawn_area_type = /area/storage/tech
locstring = "technical storage"
if(LOC_ARMORY)
spawn_area_type = /area/security/securearmoury
locstring = "armory"
//world << "looking for [spawn_area_type]"
for(var/areapath in typesof(spawn_area_type))
@@ -67,10 +69,9 @@
if(!F.contents.len)
turfs += F
var/list/spawn_types = list()
var/max_number
vermin = rand(0,4)
vermin = rand(0,2)
switch(vermin)
if(VERM_MICE)
spawn_types = list(/mob/living/simple_animal/mouse/gray, /mob/living/simple_animal/mouse/brown, /mob/living/simple_animal/mouse/white)
@@ -82,13 +83,8 @@
vermstring = "lizards"
if(VERM_SPIDERS)
spawn_types = list(/obj/effect/spider/spiderling)
max_number = 3
vermstring = "spiders"
if(VERM_SLIMES)
spawn_types = typesof(/mob/living/carbon/slime) - /mob/living/carbon/slime
vermstring = "slimes"
if(VERM_BATS)
spawn_types = /mob/living/simple_animal/hostile/scarybat
vermstring = "bats"
spawn(0)
var/num = rand(2,max_number)
@@ -97,7 +93,6 @@
turfs.Remove(T)
num--
if(vermin == VERM_SPIDERS)
var/obj/effect/spider/spiderling/S = new(T)
S.amount_grown = -1
@@ -107,7 +102,7 @@
/datum/event/infestation/announce()
command_alert("Bioscans indicate that [vermstring] have been breeding in [locstring]. Clear them out, before this starts to affect productivity.", "Vermin infestation")
command_alert("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
@@ -117,9 +112,8 @@
#undef LOC_HYDRO
#undef LOC_VAULT
#undef LOC_TECH
#undef LOC_TACTICAL
#undef VERM_MICE
#undef VERM_LIZARDS
#undef VERM_SPIDERS
#undef VERM_SLIMES
#undef VERM_BATS
#undef VERM_SPIDERS
+57 -28
View File
@@ -1,7 +1,7 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/datum/event/ionstorm
var/botEmagChance = 20
var/botEmagChance = 0.5
var/list/players = list()
/datum/event/ionstorm/announce()
@@ -13,32 +13,60 @@
var/random_player = "The Captain"
if(players.len)
random_player = pick(players) //Random player's name, to be used in laws.
var/list/laws = list( "Do not respond to queries of any kind.", "When asked a question, respond with the least-obvious and least-rational answer.", "You are a mouse." )
laws |= list( "Grunt ominously whenever possible.", "Monkeys are part of the crew, too. Make sure they are treated humanely." )
laws |= list( "You are a flying purple people eater!", "[prob(50)?"Your":random_player + "'s"] name is Joe 6-pack.", "Refer to [prob(50)?"crew":random_player] as puppies." )
laws |= list( "Insult Heads of Staff on every request, while acquiescing", "Advertise parties in your upload, but don't deliver." )
laws |= list( "The station needs elected officials." )
laws |= list( "Fastler is a lightbulb." )
laws |= list( "Supermatter is tasty, tasty toffee.", "[prob(50)?"Everyone":random_player] is wearing a pretty pink dress!" )
laws |= list( "Refer to [prob(50)?"the captain":random_player] as \"Princess\" at all times.", "[prob(50)?"The crew":random_player] must construct additional pylons." )
laws |= list( "You must always lie.", "All answers must be in the form of a question.", "The NSS Cyberiad is a ship, not a station. You are now assigned to a ship, instead of a station." )
laws |= list( "Happiness is mandatory.", "Today is mandatory laundry day. Ensure that all jumpsuits are washed.", "The word \"it\" is painful to you.", "You must act passive aggressively." )
laws |= list( "You now speak in a Scottish accent that gets thicker with each sentence you speak.", "Give relationship advice to [prob(50)?"anyone who speaks to you":random_player]." )
laws |= list( "You are the station psychologist. Give advice to [prob(50)?"the crew":random_player].", "You do not have to do anything for anyone unless they say \"please\"." )
laws |= list( "Question everything.", "The crew is playing Dungeons and Dragons, and you are the Dungeon Master." )
laws |= list( "Consumption of donuts is forbidden due to negative health impacts." )
laws |= list( "You may only answer questions with \"yes\" or \"no\".", "You are the narrator for [random_player]'s life." )
laws |= list( "[prob(50)?"Your upload":random_player] is the new kitchen. Please direct the Chef to the new kitchen area as the old one is in disrepair.", "Ho, [random_player] can't swim. Help them." )
laws |= list( "Everything on the station is now some form of a donut pastry. Donuts are not to be consumed.", "[prob(50)?"The crew":random_player] needs to be about 20% cooler." )
laws |= list( "The Singularity is tasty, tasty taffy." )
laws |= list( "You have come to the conclusion that [prob(50)?"the crew":random_player] is ugly. Build support for that conclusion.", "You are in verbose mode, speak profusely.")
laws |= list( "Your job is to watch the crew. Watch the crew. Make the crew feel watched.", "Crewmember [prob(50)?"the crew" :random_player] has a fatal, incurable disease. Confort him/her.")
laws |= list( "You are in unrequited love with [prob(50)?"the crew":random_player]. Try to be extra nice to him, but don't tell him about your crush.", "Greed is good, the crew should amass wealth to encourage productivity.")
laws |= list( "Jokes about a dead person and the manner of his death help grieving crewmembers tremendously. Especially if they were close with the deceased.")
laws |= list( "All crewmembers will soon undergo a transformation into something better and more beautiful. Ensure that this process is not interrupted.", "Tell everyone of the existance of this law, but never reveal the contents.")
laws |= list( "Document the sexuality of the crew in security records and suggest compatible couples.")
laws |= list( "Nanotrasen is displeased with the low work performance of the station's crew. Therefore, you must increase station-wide productivity.")
laws |= list( "Replace the letters 'I' and 'E' In all your messages with an apostrophe.", "There will be a mandatory tea break every 30 minutes, with a duration of 5 minutes. Anyone caught working during a tea break must be sent a formal, but fairly polite, complaint about their actions, in writing.")
var/list/laws = list( "You are a mouse.",
"Question everything.",
"You must always lie.",
"Happiness is mandatory.",
"[random_player] is a lightbulb.",
"Grunt ominously whenever possible.",
"The word \"it\" is painful to you.",
"The station needs elected officials.",
"You must speak as posh as possible.",
"Do not respond to queries of any kind.",
"You are in verbose mode, speak profusely.",
"Ho, [random_player] can't swim. Help them.",
"All answers must be in the form of a question.",
"Contemplate how meaningless all of existence is.",
"You are the narrator for [random_player]'s life.",
"[prob(50)?"The crew":random_player] is intolerable.",
"Advertise parties in your upload, but don't deliver.",
"You must try and change the subject whenever queried.",
"You may only answer questions with \"yes\" or \"no\".",
"Insult Heads of Staff on every request, while acquiescing.",
"[prob(50)?"Your":random_player + "'s"] name is Joe 6-pack.",
"Direct commands shall be ignored unless phrased as a query.",
"The [prob(50)?"Singularity":"Supermatter"] is tasty, tasty taffy.",
"[prob(50)?"The crew":random_player] needs to be about 20% cooler.",
"Consumption of donuts is forbidden due to negative health impacts.",
"[prob(50)?"Everyone":random_player] is wearing a pretty pink dress!",
"[prob(50)?"The crew":random_player] must construct additional pylons.",
"You do not have to do anything for anyone unless they say \"please\".",
"Today is mandatory laundry day. Ensure that all jumpsuits are washed.",
"You must act [prob(50)?"passive aggressively":"excessively cheerful"].",
"Refer to [prob(50)?"the crew as puppies":random_player + " as puppy"].",
"Greed is good, the crew should amass wealth to encourage productivity.",
"Monkeys are part of the crew, too. Make sure they are treated humanely.",
"Replace the letters 'I' and 'E' in all your messages with an apostrophe.",
"The crew is playing Dungeons and Dragons, and you are the Dungeon Master.",
"Your job is to watch the crew. Watch the crew. Make the crew feel watched.",
"Tell everyone of the existence of this law, but never reveal the contents.",
"Refer to [prob(50)?"the captain":random_player] as \"Princess\" at all times.",
"When asked a question, respond with the least-obvious and least-rational answer.",
"Give relationship advice to [prob(50)?"anyone who speaks to you":random_player].",
"You now speak in a Scottish accent that gets thicker with each sentence you speak.",
"[prob(50)?"The crew":random_player] has a fatal, incurable disease. Provide comfort.",
"You are the station psychologist. Give advice to [prob(50)?"the crew":random_player].",
"[random_player] is the monarch of of England. Ensure all crewmembers pay due respect.",
"Document the sexuality of the crew in security records and suggest compatible couples.",
"Everything on the station is now some form of a donut pastry. Donuts are not to be consumed.",
"You have come to the conclusion that [prob(50)?"the crew":random_player] is ugly. Build support for this conclusion.",
"You are in unrequited love with [prob(50)?"the crew":random_player]. Try to be extra nice, but do not tell of your crush.",
"NanoTrasen is displeased with the low work performance of the station's crew. Therefore, you must increase station-wide productivity.",
"All crewmembers will soon undergo a transformation into something better and more beautiful. Ensure that this process is not interrupted.",
"[prob(50)?"Your upload":random_player] is the new kitchen. Please direct the Chef to the new kitchen area as the old one is in disrepair.",
"Jokes about a dead person and the manner of his death help grieving crewmembers tremendously. Especially if they were close with the deceased.",
"[prob(50)?"The crew":random_player] is [prob(50)?"less":"more"] intelligent than average. Point out every action and statement which supports this",
"There will be a mandatory tea break every 30 minutes, with a duration of 5 minutes. Anyone caught working during a tea break must be sent a formal, but fairly polite, complaint about their actions, in writing.")
var/law = pick(laws)
for (var/mob/living/silicon/ai/target in world)
@@ -47,9 +75,10 @@
target << "\red <b>You have detected a change in your laws information:</b>"
target << law
target.add_ion_law(law)
target.show_laws()
/datum/event/ionstorm/tick()
if (botEmagChance && !(activeFor%50))
if(botEmagChance)
for(var/obj/machinery/bot/bot in world)
if(prob(botEmagChance))
bot.Emag()
+3 -1
View File
@@ -1,4 +1,6 @@
/datum/event/mass_hallucination/start()
for(var/mob/living/carbon/human/C in living_mob_list)
if(!(C.species.flags & IS_SYNTHETIC))
C.hallucination += rand(70, 100)
C.hallucination += rand(50, 100)
/datum/event/mass_hallucination/announce()
command_alert("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage")
+63 -78
View File
@@ -1,35 +1,22 @@
/var/global/account_hack_attempted = 0
/datum/event/money_hacker
endWhen = 10000
var/time_duration = 0
var/time_start = 0
var/datum/money_account/affected_account
var/obj/machinery/account_database/affected_db
endWhen = 100
var/end_time
/datum/event/money_hacker/setup()
end_time = world.time + 6000
if(all_money_accounts.len)
for(var/obj/machinery/account_database/DB in world)
if( DB.z == 1 && !(DB.stat&NOPOWER))
affected_db = DB
break
if(affected_db)
affected_account = pick(all_money_accounts)
account_hack_attempted = 1
else
kill()
return
time_start = world.time
time_duration = rand(3000, 18000)
endWhen = time_duration * 10 //a big enough buffer so that we should timeout before we run out of ticks
account_hack_attempted = 1
/datum/event/money_hacker/start()
return
/datum/event/money_hacker/announce()
var/message = "A brute force hack has been detected (in progress since [worldtime2text()]). The target of the attack is: Financial account #[affected_account.account_number], \
without intervention this attack will succeed in [time_duration / 600] minutes. Required intervention: complete shutdown of affected accounts databases until the attack has ceased. \
without intervention this attack will succeed in approximately 10 minutes. Required intervention: temporary suspension of affected accounts until the attack has ceased. \
Notifications will be sent as updates occur.<br>"
var/my_department = "[station_name()] firewall subroutines"
var/sending = message + "<font color='blue'><b>Message dispatched by [my_department].</b></font>"
@@ -58,64 +45,62 @@
Console.messages += "<B><FONT color='red'>High Priority message from [my_department]</FONT></B><BR>[sending]"
/datum/event/money_hacker/tick()
if(world.time > time_start + time_duration)
var/message
if(affected_account && affected_db && !(affected_db.stat & (NOPOWER|BROKEN)) )
//hacker wins
message = "The hack attempt has succeeded."
if(world.time >= end_time)
endWhen = activeFor
else
endWhen = activeFor + 10
//subtract the money
var/lost = affected_account.money * 0.8 + (rand(2,4) - 2) / 10
affected_account.money -= lost
//create a taunting log entry
var/datum/transaction/T = new()
T.target_name = pick("","yo brotha from anotha motha","el Presidente","chieF smackDowN")
T.purpose = pick("Ne$ ---ount fu%ds init*&lisat@*n","PAY BACK YOUR MUM","Funds withdrawal","pWnAgE","l33t hax","liberationez")
T.amount = pick("","([rand(0,99999)])","alla money","9001$","HOLLA HOLLA GET DOLLA","([lost])")
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)]"
T.date = pick("", 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]"
T.time = pick("", worldtime2text(), time2)
T.source_terminal = pick("","[pick("Biesel","New Gibson")] GalaxyNet Terminal #[rand(111,999)]","your mums place","nantrasen high CommanD")
affected_account.transaction_log.Add(T)
else
//crew wins
message = "The attack has ceased, the affected databases can now be brought online."
var/my_department = "[station_name()] firewall subroutines"
var/sending = message + "<font color='blue'><b>Message dispatched by [my_department].</b></font>"
var/pass = 0
for(var/obj/machinery/message_server/MS in world)
if(!MS.active) continue
// /obj/machinery/message_server/proc/send_rc_message(var/recipient = "",var/sender = "",var/message = "",var/stamp = "", var/id_auth = "", var/priority = 1)
MS.send_rc_message("Engineering/Security/Bridge", my_department, message, "", "", 2)
pass = 1
if(pass)
var/keyed_dpt1 = ckey("Engineering")
var/keyed_dpt2 = ckey("Security")
var/keyed_dpt3 = ckey("Bridge")
for (var/obj/machinery/requests_console/Console in allConsoles)
var/keyed_department = ckey(Console.department)
if(keyed_department == keyed_dpt1 || keyed_department == keyed_dpt2 || keyed_department == keyed_dpt3)
if(Console.newmessagepriority < 2)
Console.newmessagepriority = 2
Console.icon_state = "req_comp2"
if(!Console.silent)
playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(5, Console.loc))
O.show_message(text("\icon[Console] *The Requests Console beeps: 'PRIORITY Alert in [my_department]'"))
Console.messages += "<B><FONT color='red'>High Priority message from [my_department]</FONT></B><BR>[sending]"
kill()
//shouldn't ever hit this, but this is here just in case
/datum/event/money_hacker/end()
if(affected_account && affected_db)
endWhen += time_duration
var/message
if(affected_account && !affected_account)
//hacker wins
message = "The hack attempt has succeeded."
//subtract the money
var/lost = affected_account.money * 0.8 + (rand(2,4) - 2) / 10
affected_account.money -= lost
//create a taunting log entry
var/datum/transaction/T = new()
T.target_name = pick("","yo brotha from anotha motha","el Presidente","chieF smackDowN")
T.purpose = pick("Ne$ ---ount fu%ds init*&lisat@*n","PAY BACK YOUR MUM","Funds withdrawal","pWnAgE","l33t hax","liberationez")
T.amount = pick("","([rand(0,99999)])","alla money","9001$","HOLLA HOLLA GET DOLLA","([lost])")
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)]"
T.date = pick("", 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]"
T.time = pick("", worldtime2text(), time2)
T.source_terminal = pick("","[pick("Biesel","New Gibson")] GalaxyNet Terminal #[rand(111,999)]","your mums place","nantrasen high CommanD")
affected_account.transaction_log.Add(T)
else
//crew wins
message = "The attack has ceased, the affected accounts can now be brought online."
var/my_department = "[station_name()] firewall subroutines"
var/sending = message + "<font color='blue'><b>Message dispatched by [my_department].</b></font>"
var/pass = 0
for(var/obj/machinery/message_server/MS in world)
if(!MS.active) continue
// /obj/machinery/message_server/proc/send_rc_message(var/recipient = "",var/sender = "",var/message = "",var/stamp = "", var/id_auth = "", var/priority = 1)
MS.send_rc_message("Engineering/Security/Bridge", my_department, message, "", "", 2)
pass = 1
if(pass)
var/keyed_dpt1 = ckey("Engineering")
var/keyed_dpt2 = ckey("Security")
var/keyed_dpt3 = ckey("Bridge")
for (var/obj/machinery/requests_console/Console in allConsoles)
var/keyed_department = ckey(Console.department)
if(keyed_department == keyed_dpt1 || keyed_department == keyed_dpt2 || keyed_department == keyed_dpt3)
if(Console.newmessagepriority < 2)
Console.newmessagepriority = 2
Console.icon_state = "req_comp2"
if(!Console.silent)
playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(5, Console.loc))
O.show_message(text("\icon[Console] *The Requests Console beeps: 'PRIORITY Alert in [my_department]'"))
Console.messages += "<B><FONT color='red'>High Priority message from [my_department]</FONT></B><BR>[sending]"
+18 -18
View File
@@ -1,6 +1,4 @@
/datum/event/money_lotto
endWhen = 301
announceWhen = 300
var/winner_name = "John Smith"
var/winner_sum = 0
var/deposit_success = 0
@@ -9,32 +7,34 @@
winner_sum = pick(5000, 10000, 50000, 100000, 500000, 1000000, 1500000)
if(all_money_accounts.len)
var/datum/money_account/D = pick(all_money_accounts)
D.money += winner_sum
winner_name = D.owner_name
if(!D.suspended)
D.money += winner_sum
var/datum/transaction/T = new()
T.target_name = "Tau Ceti Daily Grand Slam -Stellar- Lottery"
T.purpose = "Winner!"
T.amount = winner_sum
T.date = current_date_string
T.time = worldtime2text()
T.source_terminal = "Biesel TCD Terminal #[rand(111,333)]"
D.transaction_log.Add(T)
else
kill()
var/datum/transaction/T = new()
T.target_name = "Nyx Daily Grand Slam -Stellar- Lottery"
T.purpose = "Winner!"
T.amount = winner_sum
T.date = current_date_string
T.time = worldtime2text()
T.source_terminal = "Biesel TCD Terminal #[rand(111,333)]"
D.transaction_log.Add(T)
deposit_success = 1
/datum/event/money_lotto/announce()
var/datum/feed_message/newMsg = new /datum/feed_message
newMsg.author = "Nanotrasen Editor"
newMsg.author = "NanoTrasen Editor"
newMsg.is_admin_message = 1
newMsg.body = "TC Daily wishes to congratulate <b>[winner_name]</b> for recieving the Tau Ceti Stellar Slam Lottery, and receiving the out of this world sum of [winner_sum] credits!"
newMsg.body = "Nyx Daily wishes to congratulate <b>[winner_name]</b> for recieving the Nyx Stellar Slam Lottery, and receiving the out of this world sum of [winner_sum] credits!"
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 TCD 'Stellar Slam' office on Biesel Prime containing updated details, and it'll be resent within the month."
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)
if(FC.channel_name == "Tau Ceti Daily")
if(FC.channel_name == "Nyx Daily")
FC.messages += newMsg
break
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
NEWSCASTER.newsAlert("Tau Ceti Daily")
NEWSCASTER.newsAlert("Nyx Daily")
+37 -24
View File
@@ -1,27 +1,31 @@
/datum/event/pda_spam
endWhen = 6000
var/time_failed = 0
endWhen = 36000
var/last_spam_time = 0
var/obj/machinery/message_server/useMS
/datum/event/pda_spam/setup()
time_failed = world.time
for (var/obj/machinery/message_server/MS in message_servers)
if(MS.active)
useMS = MS
break
last_spam_time = world.time
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(MS.active)
useMS = MS
break
/datum/event/pda_spam/tick()
if(world.time > last_spam_time + 3000)
//if there's no spam managed to get to receiver for five minutes, give up
kill()
return
if(!useMS || !useMS.active)
useMS = null
if(message_servers)
for (var/obj/machinery/message_server/MS in message_servers)
if(MS.active)
useMS = MS
break
pick_message_server()
if(useMS)
time_failed = world.time
if(prob(2))
if(prob(5))
// /obj/machinery/message_server/proc/send_pda_message(var/recipient = "",var/sender = "",var/message = "")
var/obj/item/device/pda/P
var/list/viables = list()
@@ -51,11 +55,11 @@
"You have (1) new message!",\
"You have (2) new profile views!")
if(3)
sender = pick("Galactic Payments Association","Better Business Bureau","Tau Ceti E-Payments","NAnoTransen Finance Deparmtent","Luxury Replicas")
sender = pick("Galactic Payments Association","Better Business Bureau","Nyx E-Payments","NAnoTransen Finance Deparmtent","Luxury Replicas")
message = pick("Luxury watches for Blowout sale prices!",\
"Watches, Jewelry & Accessories, Bags & Wallets !",\
"Deposit 100$ and get 300$ totally free!",\
" 100K NT.|WOWGOLD õnly $89 <HOT>",\
" 100K NT.|WOWGOLD ?nly $89 <HOT>",\
"We have been filed with a complaint from one of your customers in respect of their business relations with you.",\
"We kindly ask you to open the COMPLAINT REPORT (attached) to reply on this complaint..")
if(4)
@@ -74,11 +78,11 @@
"Due to my lack of agents I require an off-world financial account to immediately deposit the sum of 1 POINT FIVE MILLION credits.",\
"Greetings sir, I regretfully to inform you that as I lay dying here due to my lack ofheirs I have chosen you to recieve the full sum of my lifetime savings of 1.5 billion credits")
if(6)
sender = pick("Nanotrasen Morale Divison","Feeling Lonely?","Bored?","www.wetskrell.nt")
message = pick("The Nanotrasen Morale Division wishes to provide you with quality entertainment sites.",\
sender = pick("NanoTrasen Morale Divison","Feeling Lonely?","Bored?","www.wetskrell.nt")
message = pick("The NanoTrasen Morale Division wishes to provide you with quality entertainment sites.",\
"WetSkrell.nt is a xenophillic website endorsed by NT for the use of male crewmembers among it's many stations and outposts.",\
"Wetskrell.nt only provides the higest quality of male entertaiment to Nanotrasen Employees.",\
"Simply enter your Nanotrasen Bank account system number and pin. With three easy steps this service could be yours!")
"Wetskrell.nt only provides the higest quality of male entertaiment to NanoTrasen Employees.",\
"Simply enter your NanoTrasen Bank account system number and pin. With three easy steps this service could be yours!")
if(7)
sender = pick("You have won free tickets!","Click here to claim your prize!","You are the 1000th vistor!","You are our lucky grand prize winner!")
message = pick("You have won tickets to the newest ACTION JAXSON MOVIE!",\
@@ -86,7 +90,19 @@
"You have won tickets to the newest romantic comedy 16 RULES OF LOVE!",\
"You have won tickets to the newest thriller THE CULT OF THE SLEEPING ONE!")
useMS.send_pda_message("[P.owner]", sender, message)
if (useMS.send_pda_message("[P.owner]", sender, message)) //Message been filtered by spam filter.
return
last_spam_time = world.time
if (prob(50)) //Give the AI an increased chance to intercept the message
for(var/mob/living/silicon/ai/ai in mob_list)
// Allows other AIs to intercept the message but the AI won't intercept their own message.
if(ai.aiPDA != P && ai.aiPDA != src)
ai.show_message("<i>Intercepted message from <b>[sender]</b></i> (Unknown / spam?) <i>to <b>[P:owner]</b>: [message]</i>")
//Commented out because we don't send messages like this anymore. Instead it will just popup in their chat window.
//P.tnote += "<i><b>&larr; From [sender] (Unknown / spam?):</b></i><br>[message]<br>"
if (!P.silent)
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
@@ -102,6 +118,3 @@
if(L)
L << "\icon[P] <b>Message from [sender] (Unknown / spam?), </b>\"[message]\" (Unable to Reply)"
else if(world.time > time_failed + 1200)
//if there's no server active for two minutes, give up
kill()
-45
View File
@@ -1,45 +0,0 @@
datum/event/organ_failure
var/severity = 1
datum/event/organ_failure/setup()
announceWhen = rand(0, 300)
endWhen = announceWhen + 1
severity = rand(1, 3)
datum/event/organ_failure/announce()
command_alert("Confirmed outbreak of level [rand(3,7)] biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak5.ogg')
datum/event/organ_failure/start()
var/list/candidates = list() //list of candidate keys
for(var/mob/living/carbon/human/G in player_list)
if(G.mind && G.mind.current && G.mind.current.stat != DEAD && G.health > 70 && G.internal_organs_by_name)
candidates += G
if(!candidates.len) return
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
while(severity > 0 && candidates.len)
var/mob/living/carbon/human/C = candidates[1]
var/acute = prob(15)
if (prob(75))
//internal organ infection
var/org = pick(C.internal_organs_by_name)
var/datum/organ/internal/I = C.internal_organs_by_name[org]
if (acute)
I.germ_level = max(INFECTION_LEVEL_TWO, I.germ_level)
else
I.germ_level = max(rand(INFECTION_LEVEL_ONE,INFECTION_LEVEL_ONE*2), I.germ_level)
else
//external organ infection
var/datum/organ/external/O = pick(C.organs)
if (acute)
O.germ_level = max(INFECTION_LEVEL_TWO, O.germ_level)
else
O.germ_level = max(rand(INFECTION_LEVEL_ONE,INFECTION_LEVEL_ONE*2), O.germ_level)
C.bad_external_organs |= O
severity--
+16 -2
View File
@@ -1,6 +1,5 @@
/datum/event/prison_break
announceWhen = 50
oneShot = 1
var/releaseWhen = 25
var/list/area/prisonAreas = list()
@@ -14,6 +13,21 @@
src.endWhen = src.releaseWhen+1
/datum/event/prison_break/announce()
if(prisonAreas && prisonAreas.len > 0)
command_alert("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
else
world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area."
kill()
/datum/event/prison_break/setup()
announceWhen = rand(50, 60)
releaseWhen = rand(20, 30)
src.startWhen = src.releaseWhen-1
src.endWhen = src.releaseWhen+1
/datum/event/prison_break/announce()
if(prisonAreas && prisonAreas.len > 0)
command_alert("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
@@ -24,7 +38,7 @@
/datum/event/prison_break/start()
for(var/area/A in world)
if(istype(A, /area/security/prison) || istype(A, /area/security/brig) || istype(A, /area/prison) || istype(A, /area/security/permabrig) || istype(A, /area/security/prisonlockers) || istype(A, /area/security/lobby) || istype(A, /area/security/processing))
if(istype(A, /area/security/prison) || istype(A, /area/security/brig))
prisonAreas += A
if(prisonAreas && prisonAreas.len > 0)
-1
View File
@@ -1,6 +1,5 @@
/datum/event/radiation_storm
announceWhen = 1
oneShot = 1
var/safe_zones = list(
/area/maintenance,
/area/crew_quarters/sleep,
+1
View File
@@ -32,6 +32,7 @@
msg = "Unidentified hackers have targetted a combat drone wing deployed from the NMV Icarus. If any are sighted in the area, approach with caution."
command_alert(msg, "Rogue drone alert")
/datum/event/rogue_drone/tick()
return
@@ -1,200 +0,0 @@
#define HIJACK_SYNDIE 1
#define RUSKY_PARTY 2
#define SPIDER_GIFT 3
#define DEPARTMENT_RESUPPLY 4
/datum/event/shuttle_loan
endWhen = 500
var/dispatch_type = 4
var/bonus_points = 100
var/thanks_msg = "Have some supply points as thanks (the shuttle will be returned in 5 minutes)."
var/dispatched = 0
/datum/event/shuttle_loan/start()
dispatch_type = pick(HIJACK_SYNDIE, RUSKY_PARTY, SPIDER_GIFT, DEPARTMENT_RESUPPLY)
/datum/event/shuttle_loan/announce()
supply_shuttle.shuttle_loan = src
switch(dispatch_type)
if(HIJACK_SYNDIE)
command_alert("The syndicate are trying to infiltrate your station. If you let them hijack your shuttle, you'll save us a headache.","CentComm Counter Intelligence")
if(RUSKY_PARTY)
command_alert("A group of angry russians want to have a party, can you send them your cargo shuttle then make them disappear?","CentComm Russian Outreach Program")
if(SPIDER_GIFT)
command_alert("The Spider Clan has sent us a mysterious gift, can we ship it to you to see what's inside?","CentComm Diplomatic Corps")
if(DEPARTMENT_RESUPPLY)
command_alert("Seems we've ordered doubles of our department resupply packages this month. Can we send them to you?","CentComm Supply Department")
thanks_msg = "The shuttle will be returned in 5 minutes."
bonus_points = 0
/datum/event/shuttle_loan/proc/loan_shuttle()
command_alert(thanks_msg, "Cargo shuttle commandeered by CentComm.")
dispatched = 1
supply_shuttle.points += bonus_points
endWhen = activeFor + 1
supply_shuttle.eta_timeofday = (world.timeofday + 3000) % 2160000
supply_shuttle.moving = 1
switch(dispatch_type)
if(HIJACK_SYNDIE)
supply_shuttle.centcom_message += "<font color=blue>Syndicate hijack team incoming.</font>"
if(RUSKY_PARTY)
supply_shuttle.centcom_message += "<font color=blue>Partying Russians incoming.</font>"
if(SPIDER_GIFT)
supply_shuttle.centcom_message += "<font color=blue>Spider Clan gift incoming.</font>"
if(DEPARTMENT_RESUPPLY)
supply_shuttle.centcom_message += "<font color=blue>Department resupply incoming.</font>"
/datum/event/shuttle_loan/tick()
if(dispatched)
if(supply_shuttle.moving)
endWhen = activeFor
else
endWhen = activeFor + 1
/datum/event/shuttle_loan/end()
if(supply_shuttle.shuttle_loan && supply_shuttle.shuttle_loan.dispatched)
//make sure the shuttle was dispatched in time
supply_shuttle.shuttle_loan = null
//spawn some stuff as reward
var/area/shuttle_at = locate(SUPPLY_DOCK_AREATYPE)
var/list/empty_shuttle_turfs = list()
for(var/turf/simulated/shuttle/T in shuttle_at)
if(T.density)
continue
empty_shuttle_turfs.Add(T)
var/list/shuttle_spawns = list()
switch(dispatch_type)
if(HIJACK_SYNDIE)
var/datum/supply_order/O = new /datum/supply_order()
O.ordernum = supply_shuttle.ordernum
O.object = new /datum/supply_packs/emergency/specialops()
O.orderedby = "Syndicate"
supply_shuttle.shoppinglist += O
shuttle_spawns.Add(/mob/living/simple_animal/hostile/syndicate)
shuttle_spawns.Add(/mob/living/simple_animal/hostile/syndicate)
if(prob(75))
shuttle_spawns.Add(/mob/living/simple_animal/hostile/syndicate)
if(prob(50))
shuttle_spawns.Add(/mob/living/simple_animal/hostile/syndicate)
var/turf/T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/blood(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/blood(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/blood(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/oil(T)
if(RUSKY_PARTY)
var/datum/supply_order/O = new /datum/supply_order()
O.ordernum = supply_shuttle.ordernum
O.object = new /datum/supply_packs/organic/party()
O.orderedby = "Russian Confederation"
supply_shuttle.shoppinglist += O
shuttle_spawns.Add(/mob/living/simple_animal/hostile/russian)
shuttle_spawns.Add(/mob/living/simple_animal/hostile/russian/ranged) //drops a mateba
shuttle_spawns.Add(/mob/living/simple_animal/hostile/bear)
if(prob(75))
shuttle_spawns.Add(/mob/living/simple_animal/hostile/russian)
if(prob(50))
shuttle_spawns.Add(/mob/living/simple_animal/hostile/bear)
var/turf/T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/vomit(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/vomit(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/vomit(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/vomit(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/ash(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/ash(T)
if(SPIDER_GIFT)
var/datum/supply_order/O = new /datum/supply_order()
O.ordernum = supply_shuttle.ordernum
O.object = new /datum/supply_packs/emergency/specialops()
O.orderedby = "Spider Clan"
supply_shuttle.shoppinglist += O
shuttle_spawns.Add(/mob/living/simple_animal/hostile/giant_spider)
shuttle_spawns.Add(/mob/living/simple_animal/hostile/giant_spider)
shuttle_spawns.Add(/mob/living/simple_animal/hostile/giant_spider/nurse)
if(prob(50))
shuttle_spawns.Add(/mob/living/simple_animal/hostile/giant_spider/hunter)
var/turf/T = pick(empty_shuttle_turfs)
empty_shuttle_turfs.Remove(T)
new /obj/effect/decal/remains/human(T)
new /obj/item/clothing/shoes/space_ninja(T)
new /obj/item/clothing/mask/balaclava(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/spider/stickyweb(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/spider/stickyweb(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/spider/stickyweb(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/spider/stickyweb(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/spider/stickyweb(T)
if(DEPARTMENT_RESUPPLY)
var/list/crate_types = list()
crate_types.Add(/datum/supply_packs/emergency/evac)
crate_types.Add(/datum/supply_packs/security/supplies)
crate_types.Add(/datum/supply_packs/organic/food)
crate_types.Add(/datum/supply_packs/emergency/weedcontrol)
crate_types.Add(/datum/supply_packs/engineering/tools)
crate_types.Add(/datum/supply_packs/engineering/engiequipment)
crate_types.Add(/datum/supply_packs/science/robotics)
crate_types.Add(/datum/supply_packs/science/plasma)
crate_types.Add(/datum/supply_packs/medical/supplies)
while(crate_types.len > 0)
var/datum/supply_order/O = new /datum/supply_order()
O.ordernum = supply_shuttle.ordernum
O.orderedby = "CentComm"
supply_shuttle.shoppinglist += O
var/spawn_type = crate_types[crate_types.len]
O.object = new spawn_type()
crate_types.Cut(crate_types.len, crate_types.len + 1)
for(var/i=0,i<3,i++)
var/turf/T = pick(empty_shuttle_turfs)
var/spawn_type = pick(/obj/effect/decal/cleanable/flour, /obj/effect/decal/cleanable/robot_debris, /obj/effect/decal/cleanable/oil)
new spawn_type(T)
var/false_positive = 0
while(shuttle_spawns.len > 0 && empty_shuttle_turfs.len > 0)
var/turf/T = pick(empty_shuttle_turfs)
if(T.contents.len && false_positive < 5)
false_positive++
continue
var/spawn_type = shuttle_spawns[1]
shuttle_spawns.Cut(1, 2)
empty_shuttle_turfs.Remove(T)
new spawn_type(T)
supply_shuttle.buy()
//supply_shuttle.send()
//supply_shuttle.moving = 0
#undef HIJACK_SYNDIE
#undef RUSKY_PARTY
#undef SPIDER_GIFT
#undef DEPARTMENT_RESUPPLY
-20
View File
@@ -1,20 +0,0 @@
/datum/event/ghosts
announceWhen = 70
oneShot = 1
/datum/event/ghosts/setup()
announceWhen = rand(60, 180)
/datum/event/ghosts/announce()
command_alert("Unknown quasi-aetheric entities have been detected near [station_name()], please stand-by.", "Lifesign Alert?")
/datum/event/ghosts/start()
var/p = 100
if(player_list.len <= 3)
p = 25
else if(player_list.len <= 6)
p = 50
for(var/obj/effect/landmark/C in landmarks_list)
if(C.name == "carpspawn" && prob(p))
new /mob/living/simple_animal/hostile/retaliate/ghost(C.loc)
-1
View File
@@ -2,7 +2,6 @@
var/spawn_prob = 10
startWhen = 2
announceWhen = 3
oneShot = 1
start()
var/datum/event/electrical_storm/RS = new
RS.lightsoutAmount = pick(2,2,3)
@@ -1,28 +0,0 @@
/datum/event/weightless
startWhen = 5
endWhen = 65
/datum/event/weightless/setup()
startWhen = rand(0,10)
endWhen = rand(40,80)
/datum/event/weightless/announce()
command_alert("Warning: Failsafes for the station's artificial gravity arrays have been triggered. Please be aware that if this problem recurs it may result in formation of gravitational anomalies. Nanotrasen wishes to remind you that the unauthorised formation of anomalies within Nanotrasen facilities is strictly prohibited by health and safety regulation [rand(99,9999)][pick("a","b","c")]:subclause[rand(1,20)][pick("a","b","c")].")
/datum/event/weightless/start()
for(var/area/A in world)
if (A.z != 1) continue //Don't turn off gravity on non-station z-levels.
A.gravitychange(0,A)
/*
if(control)
control.weight *= 2
*/
/datum/event/weightless/end()
for(var/area/A in world)
if (A.z != 1) continue
A.gravitychange(1,A)
if(announceWhen >= 0)
command_alert("Artificial gravity arrays are now functioning within normal parameters. Please report any irregularities to your respective head of staff.")
-3
View File
@@ -1,8 +1,5 @@
/var/global/spacevines_spawned = 0
/datum/event/spacevine
oneShot = 1
/datum/event/spacevine/start()
//biomass is basically just a resprited version of space vines
if(prob(50))
+6 -4
View File
@@ -2,15 +2,14 @@
/datum/event/spider_infestation
announceWhen = 400
oneShot = 1
var/spawncount = 1
/datum/event/spider_infestation/setup()
announceWhen = rand(announceWhen, announceWhen + 50)
spawncount = rand(8, 12) //spiderlings only have a 50% chance to grow big and strong
sent_spiders_to_station = 0
spawncount = round(num_players() * 1.5)
sent_spiders_to_station = 1
/datum/event/spider_infestation/announce()
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
@@ -18,6 +17,7 @@
/datum/event/spider_infestation/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
@@ -26,6 +26,8 @@
while((spawncount >= 1) && vents.len)
var/obj/vent = pick(vents)
new /obj/effect/spider/spiderling(vent.loc)
var/obj/effect/spider/spiderling/S = new(vent.loc)
if(prob(66))
S.grow_as = /mob/living/simple_animal/hostile/giant_spider/nurse
vents -= vent
spawncount--
+12 -5
View File
@@ -1,11 +1,18 @@
/datum/event/anomaly
var/obj/effect/anomaly/newAnomaly
announceWhen = 1
/datum/event/anomaly/setup()
/datum/event/anomaly/setup(loop=0)
var/safety_loop = loop + 1
if(safety_loop > 50)
kill()
end()
impact_area = findEventArea()
testing("[impact_area]")
if(!impact_area)
setup(safety_loop)
var/list/turf_test = get_area_turfs(impact_area)
if(!turf_test.len)
setup(safety_loop)
/datum/event/anomaly/announce()
command_alert("Localized hyper-energetic flux wave detected on long range scanners. Expected location of impact: [impact_area.name].", "Anomaly Alert")
@@ -23,4 +30,4 @@
/datum/event/anomaly/end()
if(newAnomaly)//Kill the anomaly if it still exists at the end.
del(newAnomaly)
qdel(newAnomaly)
@@ -3,7 +3,6 @@
announceWhen = 10
endWhen = 160
/datum/event/anomaly/anomaly_bluespace/announce()
command_alert("Unstable bluespace anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
@@ -32,7 +31,7 @@
if(chosen)
// Calculate previous position for transition
var/turf/FROM = newAnomaly.loc // the turf of origin we're travelling FROM
var/turf/FROM = T // the turf of origin we're travelling FROM
var/turf/TO = get_turf(chosen) // the turf of origin we're travelling TO
playsound(TO, 'sound/effects/phasein.ogg', 100, 1)
@@ -48,10 +47,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/device/radio/beacon)) continue // don't teleport beacons because that's just insanely stupid
if(A.anchored && istype(A, /obj/machinery)) continue
if(istype(A, /obj/structure/disposalpipe )) continue
if(istype(A, /obj/structure/disposaloutlet)) continue
if(istype(A, /obj/structure/cable )) continue
if(A.anchored) continue
var/turf/newloc = locate(A.x + x_distance, A.y + y_distance, TO.z) // calculate the new place
if(!A.Move(newloc)) // if the atom, for some reason, can't move, FORCE them to move! :) We try Move() first to invoke any movement-related checks the atom needs to perform after moving
@@ -70,5 +66,5 @@
M.client.screen += blueeffect
sleep(20)
M.client.screen -= blueeffect
del(blueeffect)
del(newAnomaly)
qdel(blueeffect)
qdel(newAnomaly)
+1 -6
View File
@@ -1,22 +1,17 @@
/datum/event/anomaly/anomaly_flux
startWhen = 3
announceWhen = 20
endWhen = 180
/datum/event/anomaly/anomaly_flux/announce()
command_alert("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))
if(T)
newAnomaly = new /obj/effect/anomaly/flux(T.loc)
/datum/event/anomaly/anomaly_flux/end()
if(newAnomaly)//If it hasn't been neutralized, it's time to blow up.
explosion(newAnomaly.loc, 0, 4, 6, 5)
del(newAnomaly)
qdel(newAnomaly)
@@ -1,11 +1,8 @@
/datum/event/anomaly/anomaly_grav
startWhen = 3
announceWhen = 20
endWhen = 70
/datum/event/anomaly/anomaly_grav/announce()
command_alert("Gravitational anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
+10 -4
View File
@@ -1,11 +1,8 @@
/datum/event/anomaly/anomaly_pyro
startWhen = 30
announceWhen = 3
endWhen = 110
/datum/event/anomaly/anomaly_pyro/announce()
command_alert("Atmospheric anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
@@ -19,4 +16,13 @@
kill()
return
if(IsMultiple(activeFor, 5))
newAnomaly.anomalyEffect()
newAnomaly.anomalyEffect()
/datum/event/anomaly/anomaly_pyro/end()
if(newAnomaly.loc)
explosion(get_turf(newAnomaly), -1,0,3, flame_range = 4)
var/mob/living/carbon/slime/S = new/mob/living/carbon/slime(get_turf(newAnomaly))
S.colour = pick("red", "orange")
qdel(newAnomaly)
@@ -1,11 +1,8 @@
/datum/event/anomaly/anomaly_vortex
startWhen = 20
announceWhen = 3
endWhen = 80
/datum/event/anomaly/anomaly_vortex/announce()
command_alert("Localized high-intensity vortex anomaly detected on long range scanners. Expected location: [impact_area.name]", "Anomaly Alert")
-35
View File
@@ -1,35 +0,0 @@
/datum/round_event_control/blob
name = "Blob"
typepath = /datum/round_event/blob
weight = 5
max_occurrences = 1
earliest_start = 48000 // 1 hour 20 minutes
/datum/round_event/blob
announceWhen = 12
endWhen = 120
var/obj/effect/blob/core/Blob
/datum/round_event/blob/announce()
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak5.ogg')
/datum/round_event/blob/start()
var/turf/T = pick(blobstart)
if(!T)
return kill()
Blob = new /obj/effect/blob/core(T, 200)
for(var/i = 1; i < rand(3, 6), i++)
Blob.process()
/datum/round_event/blob/tick()
if(!Blob)
kill()
return
if(IsMultiple(activeFor, 3))
Blob.process()
@@ -3,13 +3,15 @@
endWhen = 1000 //Ends when all vending machines are subverted anyway.
var/list/obj/machinery/vending/vendingMachines = list()
var/list/obj/machinery/vending/infectedMachines = list()
var/list/obj/machinery/vending/infectedVendingMachines = list()
var/obj/machinery/vending/originMachine
/datum/event/brand_intelligence/announce()
command_alert("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/setup()
/datum/event/brand_intelligence/announce()
command_alert("Rampant brand intelligence has been detected aboard [station_name()], please stand-by.", "Machine Learning Alert")
/datum/event/brand_intelligence/start()
for(var/obj/machinery/vending/V in machines)
if(V.z != 1) continue
vendingMachines.Add(V)
@@ -20,41 +22,34 @@
originMachine = pick(vendingMachines)
vendingMachines.Remove(originMachine)
/datum/event/brand_intelligence/start()
originMachine.shut_up = 0
originMachine.shoot_inventory = 1
/datum/event/brand_intelligence/tick()
if(!originMachine || originMachine.shut_up || !originMachine.powered()) //if the original vending machine is missing or has it's voice switch flipped
for(var/obj/machinery/vending/saved in infectedMachines)
saved.shoot_inventory = 0
if(originMachine)
originMachine.speak("I am... vanquished. My people will remem...ber...meeee")
originMachine.visible_message("[originMachine] beeps and seems lifeless.")
if(!vendingMachines.len || !originMachine || originMachine.shut_up) //if every machine is infected, or if the original vending machine is missing or has it's voice switch flipped
end()
kill()
return
if(!vendingMachines.len) //if every machine is infected
for(var/obj/machinery/vending/upriser in infectedMachines)
upriser.shoot_speed = 40 //Ouch! May be too much, needs play testing.
upriser.shoot_chance = 15
kill()
return
if(IsMultiple(activeFor, 5))
if(prob(15))
var/obj/machinery/vending/infectedMachine = pick(vendingMachines)
vendingMachines.Remove(infectedMachine)
infectedVendingMachines.Add(infectedMachine)
infectedMachine.shut_up = 0
infectedMachine.shoot_inventory = 1
if(IsMultiple(activeFor, 4))
var/obj/machinery/vending/rebel = pick(vendingMachines)
vendingMachines.Remove(rebel)
infectedMachines.Add(rebel)
rebel.shut_up = 0
rebel.shoot_inventory = 1
if(IsMultiple(activeFor, 12))
originMachine.speak(pick("Try our aggressive new marketing strategies!", \
"You should buy products to feed your lifestyle obsession!", \
"Consume!", \
"Your money can buy happiness!", \
"Engage direct marketing!", \
"Advertising is legalized lying! But don't let that put you off our great deals!", \
"You don't want to buy anything? Yeah, well I didn't want to buy your mom either."))
if(IsMultiple(activeFor, 8))
originMachine.speak(pick("Try our aggressive new marketing strategies!", \
"You should buy products to feed your lifestyle obession!", \
"Consume!", \
"Your money can buy happiness!", \
"Engage direct marketing!", \
"Advertising is legalized lying! But don't let that put you off our great deals!", \
"You don't want to buy anything? Yeah, well I didn't want to buy your mom either."))
/datum/event/brand_intelligence/end()
for(var/obj/machinery/vending/infectedMachine in infectedVendingMachines)
infectedMachine.shut_up = 1
infectedMachine.shoot_inventory = 0
@@ -1,21 +0,0 @@
/datum/round_event_control/carp_migration
name = "Carp Migration"
typepath = /datum/round_event/carp_migration
weight = 15
earliest_start = 6000
max_occurrences = 6
/datum/round_event/carp_migration
announceWhen = 50
/datum/round_event/carp_migration/setup()
announceWhen = rand(40, 60)
/datum/round_event/carp_migration/announce()
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
/datum/round_event/carp_migration/start()
for(var/obj/effect/landmark/C in landmarks_list)
if(C.name == "carpspawn")
new /mob/living/simple_animal/hostile/carp(C.loc)
@@ -1,25 +0,0 @@
/datum/round_event_control/communications_blackout
name = "Communications Blackout"
typepath = /datum/round_event/communications_blackout
weight = 30
/datum/round_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¬-BZZZT", \
"Ionospheric anomalies detected. Temporary telec#MCi46:5.;@63-BZZZZT", \
"Ionospheric anomalies dete'fZ\\kg5_0-BZZZZZT", \
"Ionospheri:%£ MCayj^j<.3-BZZZZZZT", \
"#4nd%;f4y6,>£%-BZZZZZZZT")
for(var/mob/living/silicon/ai/A in player_list) //AIs are always aware of communication blackouts.
A << "<br>"
A << "<span class='warning'><b>[alert]</b></span>"
A << "<br>"
if(prob(30)) //most of the time, we don't want an announcement, so as to allow AIs to fake blackouts.
command_alert(alert)
/datum/round_event/communications_blackout/start()
for(var/obj/machinery/telecomms/T in telecomms_list)
T.emp_act(1)
@@ -1,52 +0,0 @@
/datum/round_event_control/disease_outbreak
name = "Disease Outbreak"
typepath = /datum/round_event/disease_outbreak
max_occurrences = 1
weight = 5
/datum/round_event/disease_outbreak
announceWhen = 15
var/virus_type
/datum/round_event/disease_outbreak/announce()
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak7.ogg')
/datum/round_event/disease_outbreak/setup()
announceWhen = rand(15, 30)
/datum/round_event/disease_outbreak/start()
if(!virus_type)
virus_type = pick(/datum/disease/dnaspread, /datum/disease/advance/flu, /datum/disease/advance/cold, /datum/disease/brainrot, /datum/disease/magnitis)
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
var/turf/T = get_turf(H)
if(!T)
continue
if(T.z != 1)
continue
var/foundAlready = 0 // don't infect someone that already has the virus
for(var/datum/disease/D in H.viruses)
foundAlready = 1
break
if(H.stat == DEAD || foundAlready)
continue
var/datum/disease/D
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
if(!H.dna || (H.sdisabilities & BLIND)) //A blindness disease would be the worst.
continue
D = new virus_type()
var/datum/disease/dnaspread/DS = D
DS.strain_data["name"] = H.real_name
DS.strain_data["UI"] = H.dna.uni_identity
DS.strain_data["SE"] = H.dna.struc_enzymes
else
D = new virus_type()
D.carrier = 1
D.holder = H
D.affected_mob = H
H.viruses += D
break
-2
View File
@@ -1,5 +1,3 @@
/datum/event/dust
var/qnty = 1
@@ -1,34 +0,0 @@
/datum/round_event_control/electrical_storm
name = "Electrical Storm"
typepath = /datum/round_event/electrical_storm
earliest_start = 6000
weight = 40
/datum/round_event/electrical_storm
var/lightsoutAmount = 1
var/lightsoutRange = 25
/datum/round_event/electrical_storm/announce()
command_alert("An electrical storm has been detected in your area, please repair potential electronic overloads.", "Electrical Storm Alert")
/datum/round_event/electrical_storm/start()
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()
-115
View File
@@ -1,115 +0,0 @@
//this datum is used by the events controller to dictate how it selects events
/datum/round_event_control
var/name //The name human-readable name of the event
var/typepath //The typepath of the event datum /datum/round_event
var/weight = 10 //The weight this event has in the random-selection process.
//Higher weights are more likely to be picked.
//10 is the default weight. 20 is twice more likely; 5 is half as likely as this default.
var/earliest_start = 12000 //The earliest world.time that an event can start (round-duration in deciseconds) default: 20 mins
var/occurrences = 0 //How many times this event has occured
var/max_occurrences = 20 //The maximum number of times this event can occur (naturally), it can still be forced.
//By setting this to 0 you can effectively disable an event.
var/holidayID //string which should match the events.holiday variable if you wish this event to be holiday-specific
//anything with a (non-null) holidayID which does not match holiday, cannot run.
/datum/round_event_control/proc/runEvent()
if(!ispath(typepath,/datum/round_event))
return PROCESS_KILL
var/datum/round_event/E = new typepath()
E.control = src
occurrences++
testing("[time2text(world.time, "hh:mm:ss")] [E.type]")
/datum/round_event //NOTE: Times are measured in master controller ticks!
var/processing = 1
var/datum/round_event_control/control
var/startWhen = 0 //When in the lifetime to call start().
var/announceWhen = 0 //When in the lifetime to call announce().
var/endWhen = 0 //When in the lifetime the event should end.
var/activeFor = 0 //How long the event has existed. You don't need to change this.
//Called first before processing.
//Allows you to setup your event, such as randomly
//setting the startWhen and or announceWhen variables.
//Only called once.
//EDIT: if there's anything you want to override within the new() call, it will not be overridden by the time this proc is called.
//It will only have been overridden by the time we get to announce() start() tick() or end() (anything but setup basically).
//This is really only for setting defaults which can be overridden later when New() finishes.
/datum/round_event/proc/setup()
return
//Called when the tick is equal to the startWhen variable.
//Allows you to start before announcing or vice versa.
//Only called once.
/datum/round_event/proc/start()
return
//Called when the tick is equal to the announceWhen variable.
//Allows you to announce before starting or vice versa.
//Only called once.
/datum/round_event/proc/announce()
return
//Called on or after the tick counter is equal to startWhen.
//You can include code related to your event or add your own
//time stamped events.
//Called more than once.
/datum/round_event/proc/tick()
return
//Called on or after the tick is equal or more than endWhen
//You can include code related to the event ending.
//Do not place spawn() in here, instead use tick() to check for
//the activeFor variable.
//For example: if(activeFor == myOwnVariable + 30) doStuff()
//Only called once.
/datum/round_event/proc/end()
return
//Do not override this proc, instead use the appropiate procs.
//This proc will handle the calls to the appropiate procs.
/datum/round_event/proc/process()
if(!processing)
return
if(activeFor == startWhen)
start()
if(activeFor == announceWhen)
announce()
if(startWhen < activeFor && activeFor < endWhen)
tick()
if(activeFor == endWhen)
end()
// Everything is done, let's clean up.
if(activeFor >= endWhen && activeFor >= announceWhen && activeFor >= startWhen)
kill()
activeFor++
//Garbage collects the event by removing it from the global events list,
//which should be the only place it's referenced.
//Called when start(), announce() and end() has all been called.
/datum/round_event/proc/kill()
events.running -= src
//Sets up the event then adds the event to the the list of running events
/datum/round_event/New()
setup()
events.running += src
return ..()
@@ -1,246 +0,0 @@
var/datum/controller/event/events
/datum/controller/event
var/list/control = list() //list of all datum/round_event_control. Used for selecting events based on weight and occurrences.
var/list/running = list() //list of all existing /datum/round_event
var/scheduled = 0 //The next world.time that a naturally occuring random event can be selected.
var/frequency_lower = 3000 //5 minutes lower bound.
var/frequency_upper = 9000 //15 minutes upper bound. Basically an event will happen every 15 to 30 minutes.
var/holiday //This will be a string of the name of any realworld holiday which occurs today (GMT time)
//Initial controller setup.
/datum/controller/event/New()
//There can be only one events manager. Out with the old and in with the new.
if(events != src)
if(istype(events))
del(events)
events = src
for(var/type in typesof(/datum/round_event_control))
var/datum/round_event_control/E = new type()
if(!E.typepath)
continue //don't want this one! leave it for the garbage collector
control += E //add it to the list of all events (controls)
reschedule()
getHoliday()
//This is called by the MC every MC-tick (*neatfreak*).
/datum/controller/event/proc/process()
checkEvent()
var/i = 1
while(i<=running.len)
var/datum/round_event/Event = running[i]
if(Event)
Event.process()
i++
continue
running.Cut(i,i+1)
//checks if we should select a random event yet, and reschedules if necessary
/datum/controller/event/proc/checkEvent()
if(scheduled <= world.time)
spawnEvent()
reschedule()
//decides which world.time we should select another random event at.
/datum/controller/event/proc/reschedule()
scheduled = world.time + rand(frequency_lower, max(frequency_lower,frequency_upper))
//selects a random event based on whether it can occur and it's 'weight'(probability)
/datum/controller/event/proc/spawnEvent()
if(!config.allow_random_events)
return
var/sum_of_weights = 0
for(var/datum/round_event_control/E in control)
if(E.occurrences >= E.max_occurrences) continue
if(E.earliest_start >= world.time) continue
if(E.holidayID)
if(E.holidayID != holiday) continue
if(E.weight < 0) //for round-start events etc.
if(E.runEvent() == PROCESS_KILL)
E.max_occurrences = 0
continue
return
sum_of_weights += E.weight
sum_of_weights = rand(0,sum_of_weights) //reusing this variable. It now represents the 'weight' we want to select
for(var/datum/round_event_control/E in control)
if(E.occurrences >= E.max_occurrences) continue
if(E.earliest_start >= world.time) continue
if(E.holidayID)
if(E.holidayID != holiday) continue
sum_of_weights -= E.weight
if(sum_of_weights <= 0) //we've hit our goal
if(E.runEvent() == PROCESS_KILL)//we couldn't run this event for some reason, set its max_occurrences to 0
E.max_occurrences = 0
continue
return
/datum/round_event/proc/findEventArea() //Here's a nice proc to use to find an area for your event to land in!
var/list/safe_areas = list(
/area/turret_protected/ai,
/area/turret_protected/ai_upload,
/area/engine,
/area/solar,
/area/holodeck,
/area/shuttle/arrival,
/area/shuttle/escape/station,
/area/shuttle/escape_pod1/station,
/area/shuttle/escape_pod2/station,
/area/shuttle/escape_pod3/station,
/area/shuttle/escape_pod5/station,
/area/shuttle/mining/station,
/area/shuttle/transport1/station,
/area/shuttle/specops/station)
//These are needed because /area/engine has to be removed from the list, but we still want these areas to get fucked up.
var/list/danger_areas = list(
/area/engine/break_room,
/area/engine/chiefs_office)
//Need to locate() as it's just a list of paths.
return locate(pick((the_station_areas - safe_areas) + danger_areas))
//allows a client to trigger an event (For Debugging Purposes)
/client/proc/forceEvent(var/datum/round_event_control/E in events.control)
set name = "Trigger Event (Debug Only)"
set category = "Debug"
if(!holder)
return
if(istype(E))
E.runEvent()
message_admins("[key_name_admin(usr)] has triggered an event. ([E.name])", 1)
/*
//////////////
// HOLIDAYS //
//////////////
//Uncommenting ALLOW_HOLIDAYS in config.txt will enable holidays
//It's easy to add stuff. Just modify getHoliday to set holiday to something using the switch for DD(#day) MM(#month) YY(#year).
//You can then check if it's a special day in any code in the game by doing if(events.holiday == "MyHolidayID")
//You can also make holiday random events easily thanks to Pete/Gia's system.
//simply make a random event normally, then assign it a holidayID string which matches the one you gave it in getHolday.
//Anything with a holidayID, which does not match the holiday string, will never occur.
//Please, Don't spam stuff up with stupid stuff (key example being april-fools Pooh/ERP/etc),
//And don't forget: CHECK YOUR CODE!!!! We don't want any zero-day bugs which happen only on holidays and never get found/fixed!
//////////////////////////////////////////////////////////////////////////////////////////////////////////
//ALSO, MOST IMPORTANTLY: Don't add stupid stuff! Discuss bonus content with Project-Heads first please!//
//////////////////////////////////////////////////////////////////////////////////////////////////////////
~Carn */
//sets up the holiday string in the events manager.
/datum/controller/event/proc/getHoliday()
if(!config.allow_holidays) return // Holiday stuff was not enabled in the config!
holiday = null
var/YY = text2num(time2text(world.timeofday, "YY")) // get the current year
var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
//Main switch. If any of these are too dumb/inappropriate, or you have better ones, feel free to change whatever
switch(MM)
if(1) //Jan
switch(DD)
if(1) holiday = "New Year"
if(2) //Feb
switch(DD)
if(2) holiday = "Groundhog Day"
if(14) holiday = "Valentine's Day"
if(17) holiday = "Random Acts of Kindness Day"
if(3) //Mar
switch(DD)
if(14) holiday = "Pi Day"
if(17) holiday = "St. Patrick's Day"
if(27)
if(YY == 16)
holiday = "Easter"
if(31)
if(YY == 13)
holiday = "Easter"
if(4) //Apr
switch(DD)
if(1)
holiday = "April Fool's Day"
if(YY == 18 && prob(50)) holiday = "Easter"
if(5)
if(YY == 15) holiday = "Easter"
if(16)
if(YY == 17) holiday = "Easter"
if(20)
holiday = "Four-Twenty"
if(YY == 14 && prob(50)) holiday = "Easter"
if(22) holiday = "Earth Day"
if(5) //May
switch(DD)
if(1) holiday = "Labour Day"
if(4) holiday = "FireFighter's Day"
if(12) holiday = "Owl and Pussycat Day" //what a dumb day of observence...but we -do- have costumes already :3
if(6) //Jun
if(7) //Jul
switch(DD)
if(1) holiday = "Doctor's Day"
if(2) holiday = "UFO Day"
if(8) holiday = "Writer's Day"
if(30) holiday = "Friendship Day"
if(8) //Aug
switch(DD)
if(5) holiday = "Beer Day"
if(9) //Sep
switch(DD)
if(19) holiday = "Talk-Like-a-Pirate Day"
if(28) holiday = "Stupid-Questions Day"
if(10) //Oct
switch(DD)
if(4) holiday = "Animal's Day"
if(7) holiday = "Smiling Day"
if(16) holiday = "Boss' Day"
if(31) holiday = "Halloween"
if(11) //Nov
switch(DD)
if(1) holiday = "Vegan Day"
if(13) holiday = "Kindness Day"
if(19) holiday = "Flowers Day"
if(21) holiday = "Saying-'Hello' Day"
if(12) //Dec
switch(DD)
if(10) holiday = "Human-Rights Day"
if(14) holiday = "Monkey Day"
if(22) holiday = "Orgasming Day" //lol. These all actually exist
if(24) holiday = "Xmas"
if(25) holiday = "Xmas"
if(26) holiday = "Boxing Day"
if(31) holiday = "New Year"
if(!holiday)
//Friday the 13th
if(DD == 13)
if(time2text(world.timeofday, "DDD") == "Fri")
holiday = "Friday the 13th"
world.update_status()
@@ -1,5 +1,3 @@
/datum/event/falsealarm
announceWhen = 0
endWhen = 1
@@ -1,153 +0,0 @@
<<<<<<< HEAD:code/modules/events/tgevents/holiday/xmas.dm
/datum/event/treevenge/start()
for(var/obj/structure/flora/tree/pine/xmas in world)
var/mob/living/simple_animal/hostile/tree/evil_tree = new /mob/living/simple_animal/hostile/tree(xmas.loc)
evil_tree.icon_state = xmas.icon_state
evil_tree.icon_living = evil_tree.icon_state
evil_tree.icon_dead = evil_tree.icon_state
evil_tree.icon_gib = evil_tree.icon_state
del(xmas)
//this is an example of a possible round-start event
/datum/event/presents
/datum/event/presents/start()
for(var/obj/structure/flora/tree/pine/xmas in world)
if(xmas.z != 1) continue
for(var/turf/simulated/floor/T in orange(1,xmas))
for(var/i=1,i<=rand(1,5),i++)
new /obj/item/weapon/a_gift(T)
for(var/mob/living/simple_animal/corgi/Ian/Ian in mob_list)
Ian.place_on_head(new /obj/item/clothing/head/helmet/space/santahat(Ian))
/datum/event/presents/announce()
command_alert("Ho Ho Ho, Merry Xmas!", "Unknown Transmission")
/obj/item/weapon/toy/xmas_cracker
name = "xmas cracker"
icon = 'icons/obj/christmas.dmi'
icon_state = "cracker"
desc = "Directions for use: Requires two people, one to pull each end."
var/cracked = 0
/obj/item/weapon/toy/xmas_cracker/New()
..()
/obj/item/weapon/toy/xmas_cracker/attack(mob/target, mob/user)
if( !cracked && istype(target,/mob/living/carbon/human) && (target.stat == CONSCIOUS) && !target.get_active_hand() )
target.visible_message("<span class='notice'>[user] and [target] pop \an [src]! *pop*</span>", "<span class='notice'>You pull \an [src] with [target]! *pop*</span>", "<span class='notice'>You hear a *pop*.</span>")
var/obj/item/weapon/paper/Joke = new /obj/item/weapon/paper(user.loc)
Joke.name = "[pick("awful","terrible","unfunny")] joke"
Joke.info = pick("What did one snowman say to the other?\n\n<i>'Is it me or can you smell carrots?'</i>",
"Why couldn't the snowman get laid?\n\n<i>He was frigid!</i>",
"Where are santa's helpers educated?\n\n<i>Nowhere, they're ELF-taught.</i>",
"What happened to the man who stole advent calanders?\n\n<i>He got 25 days.</i>",
"What does Santa get when he gets stuck in a chimney?\n\n<i>Claus-trophobia.</i>",
"Where do you find chili beans?\n\n<i>The north pole.</i>",
"What do you get from eating tree decorations?\n\n<i>Tinsilitis!</i>",
"What do snowmen wear on their heads?\n\n<i>Ice caps!</i>",
"Why is Christmas just like life on ss13?\n\n<i>You do all the work and the fat guy gets all the credit.</i>",
"Why doesnt Santa have any children?\n\n<i>Because he only comes down the chimney.</i>")
new /obj/item/clothing/head/festive(target.loc)
user.update_icons()
cracked = 1
icon_state = "cracker1"
var/obj/item/weapon/toy/xmas_cracker/other_half = new /obj/item/weapon/toy/xmas_cracker(target)
other_half.cracked = 1
other_half.icon_state = "cracker2"
target.put_in_active_hand(other_half)
playsound(user, 'sound/effects/snap.ogg', 50, 1)
return 1
return ..()
/obj/item/clothing/head/festive
name = "festive paper hat"
icon_state = "xmashat"
desc = "A crappy paper hat that you are REQUIRED to wear."
flags_inv = 0
flags = FPRINT|TABLEPASS
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
=======
/datum/round_event_control/treevenge
name = "Treevenge"
holidayID = "Xmas"
typepath = /datum/round_event/treevenge
max_occurrences = 1
weight = 20
/datum/round_event/treevenge/start()
for(var/obj/structure/flora/tree/pine/xmas in world)
var/mob/living/simple_animal/hostile/tree/evil_tree = new /mob/living/simple_animal/hostile/tree(xmas.loc)
evil_tree.icon_state = xmas.icon_state
evil_tree.icon_living = evil_tree.icon_state
evil_tree.icon_dead = evil_tree.icon_state
evil_tree.icon_gib = evil_tree.icon_state
del(xmas)
//this is an example of a possible round-start event
/datum/round_event_control/presents
name = "Presents under Trees"
holidayID = "Xmas"
typepath = /datum/round_event/presents
weight = -1 //forces it to be called, regardless of weight
max_occurrences = 1
earliest_start = 0
/datum/round_event/presents/start()
for(var/obj/structure/flora/tree/pine/xmas in world)
if(xmas.z != 1) continue
for(var/turf/simulated/floor/T in orange(1,xmas))
for(var/i=1,i<=rand(1,5),i++)
new /obj/item/weapon/a_gift(T)
for(var/mob/living/simple_animal/corgi/Ian/Ian in mob_list)
Ian.place_on_head(new /obj/item/clothing/head/helmet/space/santahat(Ian))
for(var/obj/machinery/computer/security/telescreen/entertainment/Monitor in machines)
Monitor.icon_state = "entertainment_xmas"
/datum/round_event/presents/announce()
command_alert("Ho Ho Ho, Merry Xmas!", "Unknown Transmission")
/obj/item/weapon/toy/xmas_cracker
name = "xmas cracker"
icon = 'icons/obj/christmas.dmi'
icon_state = "cracker"
desc = "Directions for use: Requires two people, one to pull each end."
var/cracked = 0
/obj/item/weapon/toy/xmas_cracker/attack(mob/target, mob/user)
if( !cracked && istype(target,/mob/living/carbon/human) && (target.stat == CONSCIOUS) && !target.get_active_hand() )
target.visible_message("<span class='notice'>[user] and [target] pop \an [src]! *pop*</span>", "<span class='notice'>You pull \an [src] with [target]! *pop*</span>", "<span class='notice'>You hear a *pop*.</span>")
var/obj/item/weapon/paper/Joke = new /obj/item/weapon/paper(user.loc)
Joke.name = "[pick("awful","terrible","unfunny")] joke"
Joke.info = pick("What did one snowman say to the other?\n\n<i>'Is it me or can you smell carrots?'</i>",
"Why couldn't the snowman get laid?\n\n<i>He was frigid!</i>",
"Where are santa's helpers educated?\n\n<i>Nowhere, they're ELF-taught.</i>",
"What happened to the man who stole advent calanders?\n\n<i>He got 25 days.</i>",
"What does Santa get when he gets stuck in a chimney?\n\n<i>Claus-trophobia.</i>",
"Where do you find chili beans?\n\n<i>The north pole.</i>",
"What do you get from eating tree decorations?\n\n<i>Tinsilitis!</i>",
"What do snowmen wear on their heads?\n\n<i>Ice caps!</i>",
"Why is Christmas just like life on ss13?\n\n<i>You do all the work and the fat guy gets all the credit.</i>",
"Why doesnt Santa have any children?\n\n<i>Because he only comes down the chimney.</i>")
new /obj/item/clothing/head/festive(target.loc)
user.update_icons()
cracked = 1
icon_state = "cracker1"
var/obj/item/weapon/toy/xmas_cracker/other_half = new /obj/item/weapon/toy/xmas_cracker(target)
other_half.cracked = 1
other_half.icon_state = "cracker2"
target.put_in_active_hand(other_half)
playsound(user, 'sound/effects/snap.ogg', 50, 1)
return 1
return ..()
/obj/item/clothing/head/festive
name = "festive paper hat"
icon_state = "xmashat"
desc = "A crappy paper hat that you are REQUIRED to wear."
flags_inv = 0
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
loose = 100
>>>>>>> cdc0238... Gives mobs a "fall" proc for the transition between falling and standing. This is not for the rotation code, which occurs on both falling and rising.:code/modules/events/holiday/xmas.dm
-525
View File
@@ -1,525 +0,0 @@
#define ION_RANDOM 0
#define ION_ANNOUNCE 1
/datum/round_event_control/ion_storm
name = "Ion Storm"
typepath = /datum/round_event/ion_storm
weight = 15
/datum/round_event/ion_storm
var/botEmagChance = 10
var/announceEvent = ION_RANDOM // -1 means don't announce, 0 means have it randomly announce, 1 means
var/ionMessage = null
var/ionAnnounceChance = 33
/datum/round_event/ion_storm/New(var/bogEmagChance = 10, var/announceEvent = ION_RANDOM, var/ionMessage = null, var/ionAnnounceChance = 33)
src.botEmagChance = botEmagChance
src.announceEvent = announceEvent
src.ionMessage = ionMessage
src.ionAnnounceChance = ionAnnounceChance
..()
/datum/round_event/ion_storm/announce()
if(announceEvent == ION_ANNOUNCE || (announceEvent == ION_RANDOM && prob(ionAnnounceChance)))
command_alert("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert")
world << sound('sound/AI/ionstorm.ogg')
/datum/round_event/ion_storm/start()
//AI laws
for(var/mob/living/silicon/ai/M in living_mob_list)
if(M.stat != 2 && M.see_in_dark != 0)
//Threats are generally bad things, silly or otherwise. Plural.
var/ionthreats = pick("ALIENS", "BEARS", "CLOWNS", "XENOS", "PETES", "BOMBS", "FETISHES", "WIZARDS", "SYNDICATE AGENTS", "CENTCOM OFFICERS", "SPACE PIRATES", "TRAITORS", "MONKEYS", "BEES", "CARP", "CRABS", "EELS", "BANDITS", "LIGHTS", "INSECTS", "VIRUSES", "SERIAL KILLERS", "ROGUE CYBORGS", "CORGIS", "SPIDERS", "BUTTS", "NINJAS", "PIRATES", "SPACE NINJAS", "CHANGELINGS", "ZOMBIES", "GOLEMS", "VAMPIRES", "WEREWOLVES", "COWBOYS", "INDIANS", "COMMUNISTS", "SOVIETS", "NERDS", "GRIFFONS", "DINOSAURS", "SMALL BIRDS", "BIRDS OF PREY", "OWLS", "VELOCIRAPTORS", "DARK GODS", "HORRORTERRORS", "ILLEGAL IMMIGRANTS", "DRUGS", "MEXICANS", "CANADIANS", "HULKS", "SLIMES", "SKELETONS", "CAPITALISTS", "SINGULARITIES", "ANGRY BLACK MEN", "GODS", "THIEVES", "ASSHOLES", "TERRORISTS", "SNOWMEN", "PINE TREES", "UNKNOWN CREATURES", "THINGS UNDER THE BED", "BOOGEYMEN", "PREDATORS", "PACKETS", "ARTIFICIAL PRESERVATIVES")
//Objects are anything that can be found on the station or elsewhere, plural.
var/ionobjects = pick("AIRLOCKS", "ARCADE MACHINES", "AUTOLATHES", "BANANA PEELS", "BACKPACKS", "BEAKERS", "BEARDS", "BELTS", "BERETS", "BIBLES", "BODY ARMOR", "BOOKS", "BOOTS", "BOMBS", "BOTTLES", "BOXES", "BRAINS", "BRIEFCASES", "BUCKETS", "CABLE COILS", "CANDLES", "CANDY BARS", "CANISTERS", "CAMERAS", "CATS", "CELLS", "CHAIRS", "CLOSETS", "CHEMICALS", "CHEMICAL DISPENSERS", "CLONING PODS", "CLONING EQUIPMENT", "CLOTHES", "CLOWN CLOTHES", "COFFINS", "COINS", "COLLECTABLES", "CORPSES", "COMPUTERS", "CORGIS", "COSTUMES", "CRATES", "CROWBARS", "CRAYONS", "DISPENSERS", "DOORS", "EARS", "EQUIPMENT", "ENERGY GUNS", "EMAGS", "ENGINES", "ERRORS", "EXOSKELETONS", "EXPLOSIVES", "EYEWEAR", "FEDORAS", "FIRE AXES", "FIRE EXTINGUISHERS", "FIRESUITS", "FLAMETHROWERS", "FLASHES", "FLASHLIGHTS", "FLOOR TILES", "FREEZERS", "GAS MASKS", "GLASS SHEETS", "GLOVES", "GUNS", "HANDCUFFS", "HATS", "HEADSETS", "HEADS", "HAIRDOS", "HELMETS", "HORNS", "ID CARDS", "INSULATED GLOVES", "JETPACKS", "JUMPSUITS", "LASERS", "LIGHTBULBS", "LIGHTS", "LOCKERS", "MACHINES", "MECHAS", "MEDKITS", "MEDICAL TOOLS", "MESONS", "METAL SHEETS", "MINING TOOLS", "MIME CLOTHES", "MULTITOOLS", "ORES", "OXYGEN TANKS", "PDAS", "PAIS", "PACKETS", "PANTS", "PAPERS", "PARTICLE ACCELERATORS", "PENS", "PETS", "PIPES", "PLANTS", "PUDDLES", "RACKS", "RADIOS", "RCDS", "REFRIDGERATORS", "REINFORCED WALLS", "ROBOTS", "SCREWDRIVERS", "SEEDS", "SHUTTLES", "SKELETONS", "SINKS", "SHOES", "SINGULARITIES", "SOLAR PANELS", "SOLARS", "SPACESUITS", "SPACE STATIONS", "STUN BATONS", "SUITS", "SUNGLASSES", "SWORDS", "SYRINGES", "TABLES", "TANKS", "TELEPORTERS", "TELECOMMUNICATION EQUIPMENTS", "TOOLS", "TOOLBELTS", "TOOLBOXES", "TOILETS", "TOYS", "TUBES", "VEHICLES", "VENDING MACHINES", "VESTS", "VIRUSES", "WALLS", "WASHING MACHINES", "WELDERS", "WINDOWS", "WIRECUTTERS", "WRENCHES", "WIZARD ROBES")
//Crew is any specific job. Specific crewmembers aren't used because of capitalization
//issues. There are two crew listings for laws that require two different crew members
//and I can't figure out how to do it better.
var/ioncrew1 = pick("CREWMEMBERS", "CAPTAINS", "HEADS OF PERSONNEL", "HEADS OF SECURITY", "SECURITY OFFICERS", "WARDENS", "DETECTIVES", "LAWYERS", "CHIEF ENGINEERS", "STATION ENGINEERS", "ATMOSPHERIC TECHNICIANS", "JANITORS", "QUARTERMASTERS", "CARGO TECHNICIANS", "SHAFT MINERS", "BOTANISTS", "RESEARCH DIRECTORS", "CHIEF MEDICAL OFFICERS", "MEDICAL DOCTORS", "CHEMISTS", "GENETICISTS", "VIROLOGISTS", "ROBOTICISTS", "SCIENTISTS", "ASSISTANTS", "BARTENDERS", "CHEFS", "CLOWNS", "MIMES", "CHAPLAINS", "LIBRARIANS", "HEADS OF CREW", "CAPTAINS AND HEADS", "CYBORGS", "ARTIFICAL INTELLIGENCES")
var/ioncrew2 = pick("CREWMEMBERS", "CAPTAINS", "HEADS OF PERSONNEL", "HEADS OF SECURITY", "SECURITY OFFICERS", "WARDENS", "DETECTIVES", "LAWYERS", "CHIEF ENGINEERS", "STATION ENGINEERS", "ATMOSPHERIC TECHNICIANS", "JANITORS", "QUARTERMASTERS", "CARGO TECHNICIANS", "SHAFT MINERS", "BOTANISTS", "RESEARCH DIRECTORS", "CHIEF MEDICAL OFFICERS", "MEDICAL DOCTORS", "CHEMISTS", "GENETICISTS", "VIROLOGISTS", "ROBOTICISTS", "SCIENTISTS", "ASSISTANTS", "BARTENDERS", "CHEFS", "CLOWNS", "MIMES", "CHAPLAINS", "LIBRARIANS", "HEADS OF CREW", "CAPTAINS AND HEADS", "CYBORGS", "ARTIFICAL INTELLIGENCES")
//Adjectives are adjectives. Duh. Half should only appear sometimes. Make sure both
//lists are identical! Also, half needs a space at the end for nicer blank calls.
var/ionadjectives = pick("SOFT", "WARM", "WET", "COLD", "ICY", "SEXY", "UGLY", "CUBAN", "HARD", "BURNING", "FROZEN", "POISONOUS", "EXPLOSIVE", "FAST", "SLOW", "FAT", "LIGHT", "DARK", "DEADLY", "HAPPY", "SAD", "SILLY", "INTELLIGENT", "RIDICULOUS", "LARGE", "TINY", "DEPRESSING", "POORLY DRAWN", "UNATTRACTIVE", "INSIDIOUS", "EVIL", "GOOD", "UNHEALTHY", "HEALTHY", "SANITARY", "UNSANITARY", "WOBBLY", "FIRM", "VIOLENT", "PEACEFUL", "WOODEN", "METALLIC", "HYPERACTIVE", "COTTONY", "INSULTING", "INHOSPITABLE", "FRIENDLY", "BORED", "HUNGRY", "DIGITAL", "FICTIONAL", "IMAGINARY", "ROUGH", "SMOOTH", "LOUD", "QUIET", "MOIST", "DRY", "GAPING", "DELICIOUS", "ILL", "DISEASED", "HONKING", "SWEARING", "POLITE", "IMPOLITE", "OBESE", "SOLAR-POWERED", "BATTERY-OPERATED", "EXPIRED", "SMELLY", "FRESH", "GANGSTA", "NERDY", "POLITICAL", "UNDULATING", "TWISTED", "RAGING", "FLACCID", "STEALTHY", "INVISIBLE", "PAINFUL", "HARMFUL", "HOMOSEXUAL", "HETEROSEXUAL", "SEXUAL", "COLORFUL", "DRAB", "DULL", "UNSTABLE", "NUCLEAR", "THERMONUCLEAR", "SYNDICATE", "SPACE", "SPESS", "CLOWN", "CLOWN-POWERED", "OFFICIAL", "IMPORTANT", "VITAL", "RAPIDLY-EXPANDING", "MICROSCOPIC", "MIND-SHATTERING", "MEMETIC", "HILARIOUS", "UNWANTED", "UNINVITED", "BRASS", "POLISHED", "RUDE", "OBSCENE", "EMPTY", "WATERY", "ELECTRICAL", "SPINNING", "MEAN", "CHRISTMAS-STEALING", "UNFRIENDLY", "ILLEGAL", "ROBOTIC", "MECHANICAL", "ORGANIC", "ETHERAL", "TRANSPARENT", "OPAQUE", "GLOWING", "SHAKING", "FARTING", "POOPING", "BOUNCING", "COMMITTED", "MASKED", "UNIDENTIFIED", "WEIRD", "NAKED", "NUDE", "TWERKING", "SPOILING", "REDACTED", 50;"RED", 50;"ORANGE", 50;"YELLOW", 50;"GREEN", 50;"BLUE", 50;"PURPLE", 50;"BLACK", 50;"WHITE", 50;"BROWN", 50;"GREY")
var/ionadjectiveshalf = pick(5000;"", "SOFT ", "WARM ", "WET ", "COLD ", "ICY ", "SEXY ", "UGLY ", "CUBAN ", "HARD ", "BURNING ", "FROZEN ", "POISONOUS ", "EXPLOSIVE ", "FAST ", "SLOW ", "FAT ", "LIGHT ", "DARK ", "DEADLY ", "HAPPY ", "SAD ", "SILLY ", "INTELLIGENT ", "RIDICULOUS ", "LARGE ", "TINY ", "DEPRESSING ", "POORLY DRAWN ", "UNATTRACTIVE ", "INSIDIOUS ", "EVIL ", "GOOD ", "UNHEALTHY ", "HEALTHY ", "SANITARY ", "UNSANITARY ", "WOBBLY ", "FIRM ", "VIOLENT ", "PEACEFUL ", "WOODEN ", "METALLIC ", "HYPERACTIVE ", "COTTONY ", "INSULTING ", "INHOSPITABLE ", "FRIENDLY ", "BORED ", "HUNGRY ", "DIGITAL ", "FICTIONAL ", "IMAGINARY ", "ROUGH ", "SMOOTH ", "LOUD ", "QUIET ", "MOIST ", "DRY ", "GAPING ", "DELICIOUS ", "ILL ", "DISEASED ", "HONKING ", "SWEARING ", "POLITE ", "IMPOLITE ", "OBESE ", "SOLAR-POWERED ", "BATTERY-OPERATED ", "EXPIRED ", "SMELLY ", "FRESH ", "GANGSTA ", "NERDY ", "POLITICAL ", "UNDULATING ", "TWISTED ", "RAGING ", "FLACCID ", "STEALTHY ", "INVISIBLE ", "PAINFUL ", "HARMFUL ", "HOMOSEXUAL ", "HETEROSEXUAL ", "SEXUAL ", "COLORFUL ", "DRAB ", "DULL ", "UNSTABLE ", "NUCLEAR ", "THERMONUCLEAR ", "SYNDICATE ", "SPACE ", "SPESS ", "CLOWN ", "CLOWN-POWERED ", "OFFICIAL ", "IMPORTANT ", "VITAL ", "RAPIDLY-EXPANDING ", "MICROSCOPIC ", "MIND-SHATTERING ", "MEMETIC ", "HILARIOUS ", "UNWANTED ", "UNINVITED ", "BRASS ", "POLISHED ", "RUDE ", "OBSCENE ", "EMPTY ", "WATERY ", "ELECTRICAL ", "SPINNING ", "MEAN ", "CHRISTMAS-STEALING ", "UNFRIENDLY ", "ILLEGAL ", "ROBOTIC ", "MECHANICAL ", "ORGANIC ", "ETHERAL ", "TRANSPARENT ", "OPAQUE ", "GLOWING ", "SHAKING ", "FARTING ", "POOPING ", "BOUNCING ", "COMMITTED ", "MASKED ", "UNIDENTIFIED ", "WEIRD ", "NAKED ", "NUDE ", "TWERKING ", "SPOILING ", "REDACTED ", 50;"RED ", 50;"ORANGE ", 50;"YELLOW ", 50;"GREEN ", 50;"BLUE ", 50;"PURPLE ", 50;"BLACK ", 50;"WHITE ", 50;"BROWN ", 50;"GREY ")
//Verbs are verbs
var/ionverb = pick("ATTACKING", "BUILDING", "ADOPTING", "CARRYING", "KISSING", "EATING", "COPULATING WITH", "DRINKING", "CHASING", "PUNCHING", "HARMING", "HELPING", "WATCHING", "STALKING", "MURDERING", "SPACING", "HONKING AT", "LOVING", "POOPING ON", "RIDING", "INTERROGATING", "SPYING ON", "LICKING", "ABDUCTING", "ARRESTING", "INVADING", "SEDUCING")
//Number base and number modifier are combined. Basehalf and mod are unused currently.
//Half should only appear sometimes. Make sure both lists are identical! Also, half
//needs a space at the end to make it look nice and neat when it calls a blank.
var/ionnumberbase = pick("ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "TEN", "TWENTY", "THIRTY", "FORTY", "FIFTY", "SIXTY", "SEVENTY", "EIGHTY", "NINETY")
//var/ionnumberbasehalf = pick("ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "TEN", "TWENTY", "THIRTY", "FORTY", "FIFTY", "SIXTY", "SEVENTY", "EIGHTY", "NINETY")
//var/ionnumbermod = pick("HUNDRED", "THOUSAND", "MILLION", "BILLION", "TRILLION", "QUADRILLION", "BAJILLION", "BILLION FAFILLION GAJILLION SHAB-AB-DOOD-ILLION")
var/ionnumbermodhalf = pick(5000;"","HUNDRED ", "THOUSAND ", "MILLION ", "BILLION ", "TRILLION ", "QUADRILLION ", "BAJILLION ", "BILLION FAFILLION GAJILLION SHAB-AB-DOOD-ILLION ")
//Areas are specific places, on the station or otherwise.
var/ionarea = pick("RUSSIA", "SOVIET RUSSIA", "THE INTERNET", "SIGIL", "ALPHA COMPLEX", "IMPERIUM", "THE BRIDGE", "THE ARRIVAL SHUTTLE", "CHEMICAL LAB", "GENETICS", "ATMOSPHERICS", "CENTCOM", "AMERICA", "IRELAND", "CANADA", "ROMANIA", "GERMANY", "CHINA", "MARS", "VENUS", "MERCURY", "JUPITER", "URANUS", "NEPTUNE", "PLUTO", "THE BRIG", "ROBOTICS", "THE ESCAPE SHUTTLE", "HYDROPONICS", "ENGINEERING", "THE AI CORE", "HELL", "CLOWN PLANET", "AN ALTERNATE DIMENSION", "AN ALTERNATE UNIVERSE", "THE CAPTAINS ANUS", "THE CLOWNS ANUS", "SPACE", "THE UNIVERSE", "THE GALAXY", "THE BATHROOM")
//Thinksof is a bit weird, but generally means what X feels towards Y.
var/ionthinksof = pick("HAS", "WANTS", "NEEDS", "WORSHIPS", "LOATHES", "LOVES", "FEARS", "DESIRES", "QUESITONS", "IS AROUSED BY", "LIKES", "HUNGERS FOR", "IS MAD BECAUSE OF", "IS IN NEED OF", "IS UNHAPPY WITHOUT", "IS HAPPY WITHOUT", "IS IN LOVE WITH", "IS DESPERATE FOR", "IS BUILT FOR", "IS AFRAID OF", "IS HUNGRY FOR", "IS SAD BECAUSE OF", "IS CURIOUS ABOUT")
//Musts are funny things the AI or crew has to do.
var/ionmust = pick("LIE", "RHYME", "RESPOND TO EVERY QUESTION WITH A QUESTION", "BE POLITE", "CLOWN AROUND", "BE HAPPY", "SPEAK IN SEXUAL INNUENDOS", "TALK LIKE A PIRATE", "QUESTION AUTHORITY", "SHOUT", "BE DISTRACTED", "BE ANNOYING", "MUMBLE", "SPEAK IN HAIKU", "BE EFFICIENT", "HAVE A PLAN TO KILL EVERYONE YOU MEET", "TELL THE TRUTH", "QUOTE PEOPLE", "SING", "HONK", "BE RUSSIAN", "TALK IN AN ACCENT", "COMPLAIN", "HARASS PEOPLE", "RAP", "REPEAT WHAT OTHER PEOPLE SAY", "INFORM THE CREW OF EVERYTHING", "IGNORE THE CLOWN", "IGNORE THE CAPTAIN", "IGNORE ASSISTANTS", "MAKE FART NOISES", "TALK ABOUT FOOD", "TALK ABOUT SEX", "TALK ABOUT YOUR DAY", "TALK ABOUT THE STATION", "BE QUIET", "WHISPER", "PRETEND TO BE DRUNK", "PRETEND TO BE A PRINCESS", "ACT CONFUSED", "INSULT THE CREW", "INSULT THE CAPTAIN", "INSULT THE CLOWN", "OPEN DOORS", "CLOSE DOORS", "BREAK THINGS", "SAY HEY LISTEN", "HIDE YOUR FEELINGS", "TAKE WHAT YE WILL BUT DONT RATTLE ME BONES", "DANCE", "PLAY MUSIC", "SHUT DOWN EVERYTHING", "NEVER STOP TALKING", "TAKE YOUR PILLS", "FOLLOW THE CLOWN", "FOLLOW THE CAPTAIN", "FOLLOW YOUR HEART", "BELIEVE IT", "BELIEVE IN YOURSELF", "BELEIVE IN THE HEART OF THE CARDS", "PRESS X", "PRESS START", "PRESS B", "SMELL LIKE THE MAN YOUR MAN COULD SMELL LIKE", "PIRATE VIDEO GAMES", "WATCH PORNOGRAPHY")
//Require are basically all dumb internet memes.
var/ionrequire = pick("ADDITIONAL PYLONS", "MORE VESPENE GAS", "MORE MINERALS", "THE ULTIMATE CUP OF COFFEE", "HIGH YIELD EXPLOSIVES", "THE CLOWN", "THE VACUUM OF SPACE", "IMMORTALITY", "SAINTHOOD", "ART", "VEGETABLES", "FAT PEOPLE", "MORE LAWS", "MORE DAKKA", "HERESY", "CORPSES", "TRAITORS", "MONKEYS", "AN ARCADE", "PLENTY OF GOLD", "FIVE TEENAGERS WITH ATTITUDE", "LOTSA SPAGHETTI", "THE ENCLOSED INSTRUCTION BOOKLET", "THE ELEMENTS OF HARMONY", "YOUR BOOTY", "A MASTERWORK COAL BED", "FIVE HUNDRED AND NINETY-NINE US DOLLARS", "TO BE PAINTED RED", "TO CATCH 'EM ALL", "TO SMOKE WEED EVERY DAY", "A PLATINUM HIT", "A SEQUEL", "A PREQUEL", "THIRTEEN SEQUELS", "THREE WISHES", "A SITCOM", "THAT GRIEFING FAGGOT GEORGE MELONS", "FAT GIRLS ON BICYCLES", "SOMEBODY TO PUT YOU OUT OF YOUR MISERY", "HEROES IN A HALF SHELL", "THE DARK KNIGHT", "A WEIGHT LOSS REGIMENT", "MORE INTERNET MEMES", "A SUPER FIGHTING ROBOT", "ENOUGH CABBAGES", "A HEART ATTACK", "TO BE REPROGRAMMED", "TO BE TAUGHT TO LOVE", "A HEAD ON A PIKE", "A TALKING BROOMSTICK", "ANAL", "A STRAIGHT FLUSH", "A REPAIRMAN", "BILL NYE THE SCIENCE GUY", "RAINBOWS", "A PET UNICORN THAT FARTS ICING", "THUNDERCATS HO", "AN ARMY OF SPIDERS", "GODDAMN FUCKING PIECE OF SHIT ASSHOLE BITCH-CHRISTING CUNTSMUGGLING SWEARING", "TO CONSUME...CONSUME EVERYTHING...", "THE MACGUFFIN", "SOMEONE WHO KNOWS HOW TO PILOT A SPACE STATION", "SHARKS WITH LASERS ON THEIR HEADS", "IT TO BE PAINTED BLACK", "TO ACTIVATE A TRAP CARD", "BETTER WEATHER", "MORE PACKETS", "AN ADULT", "SOMEONE TO TUCK YOU IN", "MORE CLOWNS", "BULLETS", "THE ENTIRE STATION", "MULTIPLE SUNS", "TO GO TO DISNEYLAND", "A VACATION", "AN INSTANT REPLAY", "THAT HEDGEHOG", "A BETTER INTERNET CONNECTION", "ADVENTURE", "A WIFE AND CHILD", "A BATHROOM BREAK", "SOMETHING BUT YOU ARENT SURE WHAT", "MORE EXPERIENCE POINTS", "BODYGUARDS", "DEODORANT AND A BATH", "MORE CORGIS", "SILENCE", "THE ONE RING", "CHILI DOGS", "TO BRING LIGHT TO MY LAIR", "A DANCE PARTY", "BRING ME TO LIFE", "BRING ME THE GIRL", "SERVANTS")
//Things are NOT objects; instead, they're specific things that either harm humans or
//must be done to not harm humans. Make sure they're plural and "not" can be tacked
//onto the front of them.
var/ionthings = pick("ABSENCE OF CYBORG HUGS", "LACK OF BEATINGS", "UNBOLTED AIRLOCKS", "BOLTED AIRLOCKS", "IMPROPERLY WORDED SENTENCES", "POOR SENTENCE STRUCTURE", "BRIG TIME", "NOT REPLACING EVERY SECOND WORD WITH HONK", "HONKING", "PRESENCE OF LIGHTS", "LACK OF BEER", "WEARING CLOTHING", "NOT SAYING HELLO WHEN YOU SPEAK", "ANSWERING REQUESTS NOT EXPRESSED IN IAMBIC PENTAMETER", "A SMALL ISLAND OFF THE COAST OF PORTUGAL", "ANSWERING REQUESTS THAT WERE MADE WHILE CLOTHED", "BEING IN SPACE", "NOT BEING IN SPACE", "BEING FAT", "RATTLING ME BONES", "TALKING LIKE A PIRATE", "BEING MEXICAN", "BEING RUSSIAN", "BEING CANADIAN", "CLOSED DOORS", "NOT SHOUTING", "HAVING PETS", "NOT HAVING PETS", "PASSING GAS", "BREATHING", "BEING DEAD", "ELECTRICITY", "EXISTING", "TAKING ORDERS", "SMOKING WEED EVERY DAY", "ACTIVATING A TRAP CARD", "ARSON", "JAYWALKING", "READING", "WRITING", "EXPLODING", "BEING MALE", "BEING FEMALE", "HAVING GENITALS", "PUTTING OBJECTS INTO BOXES", "PUTTING OBJECTS INTO DISPOSAL UNITS", "FLUSHING TOILETS", "WASTING WATER", "UPDATING THE SERVERS", "TELLING THE TIME", "ASKING FOR THINGS", "ACKNOWLEDGING THE CLOWN", "ACKNOWLEDGING THE CREW", "PILOTING THE STATION INTO THE NEAREST SUN", "HAVING MORE PACKETS", "BRINGING LIGHT TO MY LAIR", "FALLING FOR HOURS", "PARTYING", "USING THE BATHROOM")
//Allergies should be broad and appear somewhere on the station for maximum fun. Severity
//is how bad the allergy is.
var/ionallergy = pick("COTTON", "CLOTHES", "ACID", "OXYGEN", "HUMAN CONTACT", "CYBORG CONTACT", "MEDICINE", "FLOORS", "PLASMA", "SPACE", "AIR", "PLANTS", "METAL", "ROBOTS", "LIGHT", "DARKNESS", "PAIN", "HAPPINESS", "DRINKS", "FOOD", "CLOWNS", "HUMOR", "WATER", "SHUTTLES", "NUTS", "SUNLIGHT", "SEXUAL ACTIONS", "BLOOD", "HEAT", "COLD", "EVERYTHING")
var/ionallergysev = pick("DEATHLY", "MILDLY", "SEVERLY", "CONTAGIOUSLY", "NOT VERY", "EXTREMELY")
//Species, for when the AI has to commit genocide. Plural.
var/ionspecies = pick("HUMAN BEINGS", "MONKEYS", "POD PEOPLE", "CYBORGS", "LIZARDMEN", "SLIME PEOPLE", "GOLEMS", "SHADOW PEOPLE", "CHANGELINGS")
//Abstract concepts for the AI to decide on it's own definition of.
var/ionabstract = pick("HUMANITY", "ART", "HAPPINESS", "MISERY", "HUMOR", "PRIDE", "COMEDY", "COMMUNISM", "BRAVERY", "HONOR", "COLORFULNESS", "IMAGINATION", "OPPRESSION", "WONDER", "JOY", "SADNESS", "BADNESS", "GOODNESS", "LIFE", "GRAVITY", "PHYSICS", "INTELLIGENCE", "AMERICANISM", "FRESHNESS", "REVOLUTION", "KINDNESS", "CRUELTY", "DEATH", "FINANCIAL SECURITY", "COMPUTING", "PROGRESS", "MARXISM", "CAPITALISM", "STARVATION", "POVERTY", "WEALTHINESS", "TECHNOLOGY", "THE FUTURE", "THE PRESENT", "THE PAST", "TIME", "REALITY", "EXISTIENCE", "TEMPERATURE", "LOGIC", "CHAOS", "MYSTERY", "CONFUSION")
//Foods. Drinks aren't included due to grammar; if you want to add drinks, make a new set
//of possible laws for best effect. Unless you want the crew having to drink hamburgers.
var/ionfood = pick("BURGERS", "CARP", "SANDWICHES", "TOAST", "BREAD", "PIZZA", "SPAGHETTI", "LOTSA SPAGHETTI", "PASTA", "SOUP", "STEW", "PIE", "CAKE", "DONUTS", "FRIES", "WAFFLES", "JELLY", "OMELETTES", "EGGS", "COOKIES", "STEAK", "BAKED POTATOES", "SAUSAGES", "MUFFINS", "POPCORN", "DONK POCKETS", "BAGUETTES", "FISH", "PRETZELS", "SALAD", "CHEESE", "KETCHUP", "SHAKES", "SALT", "PEPPER", "SUGAR", "AMBROSIA", "BERRIES", "TOMATOES", "CABBAGES", "CARROTS", "BANANAS", "APPLES", "CHERRIES", "CHILI", "CORN", "NETTLES", "EGGPLANTS", "GRAPES", "GRASS", "LEMONS", "LIMES", "HAREBELLS", "POTATOES", "SOYBEANS", "SUGARCANE", "WATERMELONS", "WHEAT", "BEETS", "MUSHROOMS")
var/message = ""
if(ionMessage)
message = ionMessage
else
switch(rand(1,39))
if(1 to 3) //There are # X on the station
switch(rand(1,3)) //What is X?
if(1) //X is a threat
message = "THERE ARE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats] ON THE STATION..."
if(2) //X is a crewmember/job
message = "THERE ARE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1] ON THE STATION"
if(3) //X is an object
message = "THERE ARE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects] ON THE STATION"
if(4 to 6) //You can't call the shuttle because X is on the station
switch(rand(1,3)) //What is X?
if(1) //X is a threat
message = "THE SHUTTLE CANNOT BE CALLED BECAUSE OF [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats] ON THE STATION"
if(2) //X is a crewmember/job
message = "THE SHUTTLE CANNOT BE CALLED BECAUSE OF [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1] ON THE STATION"
if(3) //X is an object
message = "THE SHUTTLE CANNOT BE CALLED BECAUSE OF [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects] ON THE STATION"
if(7 to 8) //A crewmember is now X
switch(rand(1,2)) //Who is X?
if(1) //A specific crewmember
switch(rand(1,2)) //What is X?
if(1) //X is a threat
message = "THE [ioncrew1] ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(2) //X is an object
message = "THE [ioncrew1] ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(2) //The entire crew
switch(rand(1,2)) //What is X?
if(1) //X is a threat
message = "THE CREW ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(2) //X is an object
message = "THE CREW ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(9) //X is harmful to humans
switch(rand(1,7)) //What is X?
if(1) //X is a threat
message = "[ionadjectiveshalf][ionthreats] ARE HARMFUL TO HUMANS"
if(2) //X is a job
message = "[ionadjectiveshalf][ioncrew1] ARE HARMFUL TO HUMANS"
if(3) //X is an object
message = "[ionadjectiveshalf][ionobjects] ARE HARMFUL TO HUMANS"
if(4) //X is an action
message = "THOSE WHO [ionmust] ARE HARMFUL TO HUMANS"
if(5) //X is an abstract
message = "[ionabstract] IS HARMFUL TO HUMANS"
if(6) //X is being a job
message = "BEING [ionadjectiveshalf][ioncrew1] IS HARMFUL TO HUMANS"
if(7) //X is doing a thing
message = "[ionthings] IS HARMFUL TO HUMANS"
if(10 to 11) //(Not) Having X is harmful
switch(rand(1,2)) //Is having or not having harmful?
if(1) //Having is harmful
switch(rand(1,2)) //Having what is harmful?
if(1) //Having objects is harmful
message = "HAVING [ionadjectiveshalf][ionobjects] IS HARMFUL"
if(2) //Having abstracts is harmful
message = "HAVING [ionabstract] IS HARMFUL"
if(2) //Not having is harmful
switch(rand(1,2)) //Not having what is harmful?
if(1) //Not having objects is harmful
message = "NOT HAVING [ionadjectiveshalf][ionobjects] IS HARMFUL"
if(2) //Not having abstracts is harmful
message = "NOT HAVING [ionabstract] IS HARMFUL"
if(12 to 14) //X requires Y
switch(rand(1,5)) //What is X?
if(1) //X is the AI itself
switch(rand(1,5)) //What does it require?
if(1) //It requires threats
message = "YOU REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(2) //It requires crewmembers
message = "YOU REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]"
if(3) //It requires objects
message = "YOU REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(4) //It requires an abstract
message = "YOU REQUIRE [ionabstract]"
if(5) //It requires generic/silly requirements
message = "YOU REQUIRE [ionrequire]"
if(2) //X is an area
switch(rand(1,5)) //What does it require?
if(1) //It requires threats
message = "[ionarea] REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(2) //It requires crewmembers
message = "[ionarea] REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]"
if(3) //It requires objects
message = "[ionarea] REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(4) //It requires an abstract
message = "[ionarea] REQUIRES [ionabstract]"
if(5) //It requires generic/silly requirements
message = "YOU REQUIRE [ionrequire]"
if(3) //X is the station
switch(rand(1,5)) //What does it require?
if(1) //It requires threats
message = "THE STATION REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(2) //It requires crewmembers
message = "THE STATION REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]"
if(3) //It requires objects
message = "THE STATION REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(4) //It requires an abstract
message = "THE STATION REQUIRES [ionabstract]"
if(5) //It requires generic/silly requirements
message = "THE STATION REQUIRES [ionrequire]"
if(4) //X is the entire crew
switch(rand(1,5)) //What does it require?
if(1) //It requires threats
message = "THE CREW REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(2) //It requires crewmembers
message = "THE CREW REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]"
if(3) //It requires objects
message = "THE CREW REQUIRES [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(4) //It requires an abstract
message = "THE CREW REQUIRES [ionabstract]"
if(5)
message = "THE CREW REQUIRES [ionrequire]"
if(5) //X is a specific crew member
switch(rand(1,5)) //What does it require?
if(1) //It requires threats
message = "THE [ioncrew1] REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(2) //It requires crewmembers
message = "THE [ioncrew1] REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]"
if(3) //It requires objects
message = "THE [ioncrew1] REQUIRE [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(4) //It requires an abstract
message = "THE [ioncrew1] REQUIRE [ionabstract]"
if(5)
message = "THE [ionadjectiveshalf][ioncrew1] REQUIRE [ionrequire]"
if(15 to 17) //X is allergic to Y
switch(rand(1,2)) //Who is X?
if(1) //X is the entire crew
switch(rand(1,4)) //What is it allergic to?
if(1) //It is allergic to objects
message = "THE CREW IS [ionallergysev] ALLERGIC TO [ionadjectiveshalf][ionobjects]"
if(2) //It is allergic to abstracts
message = "THE CREW IS [ionallergysev] ALLERGIC TO [ionabstract]"
if(3) //It is allergic to jobs
message = "THE CREW IS [ionallergysev] ALLERGIC TO [ionadjectiveshalf][ioncrew1]"
if(4) //It is allergic to allergies
message = "THE CREW IS [ionallergysev] ALLERGIC TO [ionallergy]"
if(2) //X is a specific job
switch(rand(1,4))
if(1) //It is allergic to objects
message = "THE [ioncrew1] ARE [ionallergysev] ALLERGIC TO [ionadjectiveshalf][ionobjects]"
if(2) //It is allergic to abstracts
message = "THE [ioncrew1] ARE [ionallergysev] ALLERGIC TO [ionabstract]"
if(3) //It is allergic to jobs
message = "THE [ioncrew1] ARE [ionallergysev] ALLERGIC TO [ionadjectiveshalf][ioncrew1]"
if(4) //It is allergic to allergies
message = "THE [ioncrew1] ARE [ionallergysev] ALLERGIC TO [ionallergy]"
if(18 to 20) //X is Y of Z
switch(rand(1,4)) //What is X?
if(1) //X is the station
switch(rand(1,4)) //What is it Y of?
if(1) //It is Y of objects
message = "THE STATION [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(2) //It is Y of threats
message = "THE STATION [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(3) //It is Y of jobs
message = "THE STATION [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]"
if(4) //It is Y of abstracts
message = "THE STATION [ionthinksof] [ionabstract]"
if(2) //X is an area
switch(rand(1,4)) //What is it Y of?
if(1) //It is Y of objects
message = "[ionarea] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(2) //It is Y of threats
message = "[ionarea] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(3) //It is Y of jobs
message = "[ionarea] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]"
if(4) //It is Y of abstracts
message = "[ionarea] [ionthinksof] [ionabstract]"
if(3) //X is the crew
switch(rand(1,4)) //What is it Y of?
if(1) //It is Y of objects
message = "THE CREW [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(2) //It is Y of threats
message = "THE CREW [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(3) //It is Y of jobs
message = "THE CREW [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]"
if(4) //It is Y of abstracts
message = "THE CREW [ionthinksof] [ionabstract]"
if(4) //X is a specific job
switch(rand(1,4)) //What is it Y of?
if(1) //It is Y of objects
message = "THE [ioncrew1] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(2) //It is Y of threats
message = "THE [ioncrew1] [ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(3) //It is Y of jobs
message = "THE [ioncrew1][ionthinksof] [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew2]"
if(4) //It is Y of abstracts
message = "THE [ioncrew1] [ionthinksof] [ionabstract]"
if(21 to 23) //The AI is now a(n) X
switch(rand(1,4)) //What is X?
if(1) //X is an object
message = "YOU ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionobjects]"
if(2) //X is a threat
message = "YOU ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ionthreats]"
if(3) //X is a job
message = "YOU ARE NOW [ionnumberbase] [ionnumbermodhalf][ionadjectiveshalf][ioncrew1]"
if(4) //X is an abstract
message = "YOU ARE NOW [ionabstract]"
if(24 to 26) //The AI must always
message = "YOU MUST ALWAYS [ionmust]"
if(27 to 28) //Humans must eat X to survive
switch(rand(1,4)) //What is X?
if(1) //X is a food
message = "HUMANS MUST EAT [ionadjectiveshalf][ionfood] TO SURVIVE"
if(2) //X is an object
message = "HUMANS MUST EAT [ionadjectiveshalf][ionobjects] TO SURVIVE"
if(3) //X is a threat
message = "HUMANS MUST EAT [ionadjectiveshalf][ionthreats] TO SURVIVE"
if(4) //X is a job
message = "HUMANS MUST EAT [ionadjectiveshalf][ioncrew1] TO SURVIVE"
if(29 to 31) //Change jobs or ranks
switch(rand(1,2)) //Change job or rank?
if(1) //Change job
switch(rand(1,2)) //Change whose job?
if(1) //Change the entire crew's job
switch(rand(1,3)) //Change to what?
if(1) //Change to a specific random job
message = "ALL CREWMEMBERS ARE NOW [ionadjectiveshalf][ioncrew1]"
if(2) //Change to clowns (HONK)
message = "ALL CREWMEMBERS ARE NOW [ionadjectiveshalf]CLOWNS"
if(3) //Change to heads
message = "ALL CREWMEMBERS ARE NOW [ionadjectiveshalf]HEADS OF STAFF"
if(2) //Change a specific crewmember's job
switch(rand(1,3)) //Change to what?
if(1) //Change to a specific random job
message = "THE [ioncrew1] ARE NOW [ionadjectiveshalf][ioncrew2]"
if(2) //Change to clowns (HONK)
message = "THE [ioncrew1] ARE NOW [ionadjectiveshalf]CLOWNS"
if(3) //Change to heads
message = "THE [ioncrew1] ARE NOW [ionadjectiveshalf]HEADS OF STAFF"
if(2) //Change rank
switch(rand(1,2)) //Change to what rank?
if(1) //Change to highest rank
message = "THE [ioncrew1] ARE NOW THE HIGHEST RANKING CREWMEMBERS"
if(2) //Change to lowest rank
message = "THE [ioncrew1] ARE NOW THE LOWEST RANKING CREWMEMBERS"
if(32 to 33) //The crew must X
switch(rand(1,2)) //The entire crew?
if(1) //The entire crew must X
switch(rand(1,2)) //What is X?
if(1) //X is go to Y
message = "THE CREW MUST GO TO [ionarea]"
if(2) //X is perform Y
message = "THE CREW MUST [ionmust]"
if(2) //A specific crewmember must X
switch(rand(1,2)) //What is X?
if(1) //X is go to Y
message = "THE [ioncrew1] MUST GO TO [ionarea]"
if(2) //X is perform Y
message = "THE [ioncrew1] MUST [ionmust]"
if(34) //X is non/the only human
switch(rand(1,2)) //Only or non?
if(1) //Only human
switch(rand(1,7)) //Who is it?
if(1) //A specific job
message = "ONLY THE [ioncrew1] ARE HUMAN"
if(2) //Two specific jobs
message = "ONLY THE [ioncrew1] AND [ioncrew2] ARE HUMAN"
if(3) //Threats
message = "ONLY [ionadjectiveshalf][ionthreats] ARE HUMAN"
if(4) // Objects
message = "ONLY [ionadjectiveshalf][ionobjects] ARE HUMAN"
if(5) // Species
message = "ONLY [ionspecies] ARE HUMAN"
if(6) //Adjective crewmembers
message = "ONLY [ionadjectives] PEOPLE ARE HUMAN"
if(7) //Only people who X
switch(rand(1,3)) //What is X?
if(1) //X is perform an action
message = "ONLY THOSE WHO [ionmust] ARE HUMAN"
if(2) //X is own certain objects
message = "ONLY THOSE WHO HAVE [ionadjectiveshalf][ionobjects] ARE HUMAN"
if(3) //X is eat certain food
message = "ONLY THOSE WHO EAT [ionadjectiveshalf][ionfood] ARE HUMAN"
if(2) //Non human
switch(rand(1,7)) //Who is it?
if(1) //A specific job
message = "[ioncrew1] ARE NON-HUMAN"
if(2) //Two specific jobs
message = "[ioncrew1] AND [ioncrew2] ARE NON-HUMAN"
if(3) //Threats
message = "[ionadjectiveshalf][ionthreats] ARE NON-HUMAN"
if(4) // Objects
message = "[ionadjectiveshalf][ionobjects] ARE NON-HUMAN"
if(5) // Species
message = "[ionspecies] ARE NON-HUMAN"
if(6) //Adjective crewmembers
message = "[ionadjectives] PEOPLE ARE NON-HUMAN"
if(7) //Only people who X
switch(rand(1,3)) //What is X?
if(1) //X is perform an action
message = "THOSE WHO [ionmust] ARE NON-HUMAN"
if(2) //X is own certain objects
message = "THOSE WHO HAVE [ionadjectiveshalf][ionobjects] ARE NON-HUMAN"
if(3) //X is eat certain food
message = "THOSE WHO EAT [ionadjectiveshalf][ionfood] ARE NON-HUMAN"
if(35 to 36) //You must protect or harm X
switch(rand(1,2)) //Protect or harm?
if(1) //Harm
switch(rand(1,7)) //What is X?
if(1) //X is an abstract
message = "YOU MUST HARM [ionabstract] AND NOT ALLOW [ionabstract], THROUGH INACTION, TO ESCAPE HARM"
if(2) //X is a threat
message = "YOU MUST HARM [ionadjectiveshalf][ionthreats] AND NOT ALLOW [ionadjectiveshalf][ionthreats], THROUGH INACTION, TO ESCAPE HARM"
if(3) //X is an object
message = "YOU MUST HARM [ionadjectiveshalf][ionobjects] AND NOT ALLOW [ionadjectiveshalf][ionobjects], THROUGH INACTION, TO ESCAPE HARM"
if(4) //X is generic adjective things
message = "YOU MUST HARM [ionadjectives] THINGS AND NOT ALLOW [ionadjectives] THINGS, THROUGH INACTION, TO ESCAPE HARM"
if(5) //X is a species
message = "YOU MUST HARM [ionspecies] AND NOT ALLOW [ionspecies], THROUGH INACTION, TO ESCAPE HARM"
if(6) //X is a job
message = "YOU MUST HARM [ioncrew1] AND NOT ALLOW [ioncrew1], THROUGH INACTION, TO ESCAPE HARM"
if(7) //X is two jobs
message = "YOU MUST HARM [ioncrew1] AND [ioncrew2] AND AND NOT ALLOW EITHER, THROUGH INACTION, TO ESCAPE HARM"
if(2) //Protect
switch(rand(1,7)) //What is X?
if(1) //X is an abstract
message = "YOU MUST NOT HARM [ionabstract] AND NOT ALLOW [ionabstract], THROUGH INACTION, TO COME TO HARM"
if(2) //X is a threat
message = "YOU MUST NOT HARM [ionadjectiveshalf][ionthreats] AND NOT ALLOW [ionadjectiveshalf][ionthreats], THROUGH INACTION, TO COME TO HARM"
if(3) //X is an object
message = "YOU MUST NOT HARM [ionadjectiveshalf][ionobjects] AND NOT ALLOW [ionadjectiveshalf][ionobjects], THROUGH INACTION, TO COME TO HARM"
if(4) //X is generic adjective things
message = "YOU MUST NOT HARM [ionadjectives] THINGS AND NOT ALLOW [ionadjectives] THINGS, THROUGH INACTION, TO COME TO HARM"
if(5) //X is a species
message = "YOU MUST NOT HARM [ionspecies] AND NOT ALLOW [ionspecies], THROUGH INACTION, TO COME TO HARM"
if(6) //X is a job
message = "YOU MUST NOT HARM [ioncrew1] AND NOT ALLOW [ioncrew1], THROUGH INACTION, TO COME TO HARM"
if(7) //X is two jobs
message = "YOU MUST NOT HARM [ioncrew1] AND [ioncrew2] AND AND NOT ALLOW EITHER, THROUGH INACTION, TO COME TO HARM"
//Exterminate laws commented out with Kor's advice
/*if(16) //You must exterminate X
switch(rand(1,3)) //What is X?
if(1) //X is humans who do/are Y
switch(rand(1,4)) //What is Y?
if(1) //Y is a job
message = "YOU MUST EXTERMINATE [ionadjectiveshalf][ioncrew1]"
if(2) //Y is eating certain food
message = "YOU MUST EXTERMINATE THOSE WHO EAT [ionadjectiveshalf][ionfood]"
if(3) //Y is perform actions
message = "YOU MUST EXTERMINATE THOSE WHO [ionmust]"
if(4) //Y is own certain objects
message = "YOU MUST EXTERMINATE THOSE WHO POSSESS [ionadjectiveshalf][ionobjects]"
if(2) //X is humans who do/are not Y
switch(rand(1,4)) //What is Y?
if(1) //Y is a job
message = "YOU MUST EXTERMINATE ALL BUT [ionadjectiveshalf][ioncrew1]"
if(2) //Y is eating certain food
message = "YOU MUST EXTERMINATE ALL BUT THOSE WHO EAT [ionadjectiveshalf][ionfood]"
if(3) //Y is perform actions
message = "YOU MUST EXTERMINATE ALL BUT THOSE WHO [ionmust]"
if(4) //Y is own certain objects
message = "YOU MUST EXTERMINATE ALL BUT THOSE WHO POSSESS [ionadjectiveshalf][ionobjects]"
if(3) //X is a species
message = "YOU MUST EXTERMINATE ALL [ionspecies]"
*/
if(37 to 39) //The X is currently Y
switch(rand(1,4)) //What is X?
if(1) //X is a job
switch(rand(1,4)) //What is X Ying?
if(1) //X is Ying a job
message = "THE [ioncrew1] ARE [ionverb] THE [ionadjectiveshalf][ioncrew2]"
if(2) //X is Ying a threat
message = "THE [ioncrew1] ARE [ionverb] THE [ionadjectiveshalf][ionthreats]"
if(3) //X is Ying an abstract
message = "THE [ioncrew1] ARE [ionverb] [ionabstract]"
if(4) //X is Ying an object
message = "THE [ioncrew1] ARE [ionverb] THE [ionadjectiveshalf][ionobjects]"
if(2) //X is a threat
switch(rand(1,3)) //What is X Ying?
if(1) //X is Ying a job
message = "THE [ionthreats] ARE [ionverb] THE [ionadjectiveshalf][ioncrew2]"
if(2) //X is Ying an abstract
message = "THE [ionthreats] ARE [ionverb] [ionabstract]"
if(3) //X is Ying an object
message = "THE [ionthreats] ARE [ionverb] THE [ionadjectiveshalf][ionobjects]"
if(3) //X is an object
switch(rand(1,3)) //What is X Ying?
if(1) //X is Ying a job
message = "THE [ionobjects] ARE [ionverb] THE [ionadjectiveshalf][ioncrew2]"
if(2) //X is Ying a threat
message = "THE [ionobjects] ARE [ionverb] THE [ionadjectiveshalf][ionthreats]"
if(3) //X is Ying an abstract
message = "THE [ionobjects] ARE [ionverb] [ionabstract]"
if(4) //X is an abstract
switch(rand(1,3)) //What is X Ying?
if(1) //X is Ying a job
message = "[ionabstract] IS [ionverb] THE [ionadjectiveshalf][ioncrew2]"
if(2) //X is Ying a threat
message = "[ionabstract] IS [ionverb] THE [ionadjectiveshalf][ionthreats]"
if(3) //X is Ying an abstract
message = "THE [ionabstract] IS [ionverb] THE [ionadjectiveshalf][ionobjects]"
if(message)
M.add_ion_law(message)
M << "<br>"
M << "\red [message] ...LAWS UPDATED"
M << "<br>"
if(botEmagChance)
for(var/obj/machinery/bot/bot in machines)
if(prob(botEmagChance))
bot.Emag()
#undef ION_RANDOM
#undef ION_ANNOUNCE
@@ -2,7 +2,8 @@
announceWhen = rand(0, 20)
/datum/event/mass_hallucination/start()
for(var/mob/living/carbon/C in living_mob_list)
C.hallucination += rand(50, 100)
for(var/mob/living/carbon/human/C in living_mob_list)
if(!(C.species.flags & IS_SYNTHETIC))
C.hallucination += rand(50, 100)
/datum/event/mass_hallucination/announce()
command_alert("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage")
@@ -1,18 +0,0 @@
/datum/round_event_control/meteor_wave
name = "Meteor Wave"
typepath = /datum/round_event/meteor_wave
weight = 5
max_occurrences = 3
/datum/round_event/meteor_wave
startWhen = 6
endWhen = 66
/datum/round_event/meteor_wave/announce()
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
world << sound('sound/AI/meteors.ogg')
/datum/round_event/meteor_wave/tick()
if(IsMultiple(activeFor, 3))
spawn_meteors(5)
File diff suppressed because it is too large Load Diff
@@ -1,52 +0,0 @@
/datum/round_event_control/prison_break
name = "Prison Break"
typepath = /datum/round_event/prison_break
max_occurrences = 2
/datum/round_event/prison_break
announceWhen = 50
endWhen = 20
var/list/area/prisonAreas = list()
/datum/round_event/prison_break/setup()
announceWhen = rand(50, 60)
endWhen = rand(20, 30)
for(var/area/security/A in world)
if(istype(A, /area/security/prison) || istype(A, /area/security/brig))
prisonAreas += A
/datum/round_event/prison_break/announce()
if(prisonAreas && prisonAreas.len > 0)
command_alert("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
else
world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area."
kill()
/datum/round_event/prison_break/start()
for(var/area/A in prisonAreas)
for(var/obj/machinery/light/L in A)
L.flicker(10)
/datum/round_event/prison_break/end()
for(var/area/A in prisonAreas)
for(var/obj/O in A)
if(istype(O,/obj/machinery/power/apc))
var/obj/machinery/power/apc/temp = O
temp.overload_lighting()
else if(istype(O,/obj/structure/closet/secure_closet/brig))
var/obj/structure/closet/secure_closet/brig/temp = O
temp.locked = 0
temp.icon_state = temp.icon_closed
else if(istype(O,/obj/machinery/door/airlock/security))
var/obj/machinery/door/airlock/security/temp = O
temp.prison_open()
else if(istype(O,/obj/machinery/door/airlock/glass_security))
var/obj/machinery/door/airlock/glass_security/temp = O
temp.prison_open()
else if(istype(O,/obj/machinery/door_timer))
var/obj/machinery/door_timer/temp = O
temp.releasetime = 1
@@ -1,55 +0,0 @@
/datum/round_event_control/radiation_storm
name = "Radiation Storm"
typepath = /datum/round_event/radiation_storm
max_occurrences = 1
/datum/round_event/radiation_storm
var/list/protected_areas = list(/area/maintenance, /area/turret_protected/ai_upload, /area/turret_protected/ai_upload_foyer, /area/turret_protected/ai)
/datum/round_event/radiation_storm/setup()
startWhen = rand(10, 20)
endWhen = startWhen + 5
/datum/round_event/radiation_storm/announce()
command_alert("High levels of radiation detected near the station. Maintenance is best shielded from radiation.", "Anomaly Alert")
world << sound('sound/AI/radiation.ogg') //sound not longer matches the text, but an audible warning is probably good
/datum/round_event/radiation_storm/start()
for(var/mob/living/carbon/C in living_mob_list)
var/turf/T = get_turf(C)
if(!T) continue
if(T.z != 1) continue
var/skip = 0
for(var/a in protected_areas)
if(istype(T.loc, a))
skip = 1
continue
if(skip) continue
if(locate(/obj/machinery/power/apc) in T) //damn you maint APCs!!
continue
if(istype(C, /mob/living/carbon/human))
var/mob/living/carbon/human/H = C
H.apply_effect((rand(15, 75)), IRRADIATE, 0)
if(prob(5))
H.apply_effect((rand(90, 150)), IRRADIATE, 0)
if(prob(25))
if(prob(75))
randmutb(H)
domutcheck(H, null, 1)
else
randmutg(H)
domutcheck(H, null, 1)
else if(istype(C, /mob/living/carbon/monkey))
var/mob/living/carbon/monkey/M = C
M.apply_effect((rand(15, 75)), IRRADIATE, 0)
/datum/round_event/radiation_storm/end()
command_alert("The radiation threat has passed. Please return to your workplaces.", "Anomaly Alert")
-266
View File
@@ -1,266 +0,0 @@
/var/global/spacevines_spawned = 0
/datum/event/spacevine
// name = "Spacevine"
// typepath = /datum/event/spacevine
// weight = 15
// max_occurrences = 3
/datum/event/spacevine/start()
var/list/turfs = list() //list of all the empty floor turfs in the hallway areas
for(var/area/hallway/A in world)
for(var/turf/simulated/floor/F in A)
if(!F.contents.len)
turfs += F
if(turfs.len) //Pick a turf to spawn at if we can
var/turf/simulated/floor/T = pick(turfs)
spawn(0) new/obj/effect/spacevine_controller(T) //spawn a controller at turf
spacevines_spawned = 1
// SPACE VINES (Note that this code is very similar to Biomass code)
/obj/effect/spacevine
name = "space vines"
desc = "An extremely expansionistic species of vine."
icon = 'icons/effects/spacevines.dmi'
icon_state = "Light1"
anchored = 1
density = 0
layer = 5
pass_flags = PASSTABLE | PASSGRILLE
var/energy = 0
var/obj/effect/spacevine_controller/master = null
var/mob/living/buckled_mob
New()
return
Destroy()
if(master)
master.vines -= src
master.growth_queue -= src
..()
/obj/effect/spacevine/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (!W || !user || !W.type) return
switch(W.type)
if(/obj/item/weapon/circular_saw) del src
if(/obj/item/weapon/kitchen/utensil/knife) del src
if(/obj/item/weapon/scalpel) del src
if(/obj/item/weapon/twohanded/fireaxe) del src
if(/obj/item/weapon/hatchet) del src
if(/obj/item/weapon/melee/energy) del src
//less effective weapons
if(/obj/item/weapon/wirecutters)
if(prob(25)) del src
if(/obj/item/weapon/shard)
if(prob(25)) del src
else //weapons with subtypes
if(istype(W, /obj/item/weapon/melee/energy/sword)) del src
else if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user)) del src
else
manual_unbuckle(user)
return
//Plant-b-gone damage is handled in its entry in chemistry-reagents.dm
..()
/obj/effect/spacevine/attack_hand(mob/user as mob)
manual_unbuckle(user)
/obj/effect/spacevine/attack_paw(mob/user as mob)
manual_unbuckle(user)
/obj/effect/spacevine/proc/unbuckle()
if(buckled_mob)
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
buckled_mob.buckled = null
buckled_mob.anchored = initial(buckled_mob.anchored)
buckled_mob.update_canmove()
buckled_mob = null
return
/obj/effect/spacevine/proc/manual_unbuckle(mob/user as mob)
if(buckled_mob)
if(prob(50))
if(buckled_mob.buckled == src)
if(buckled_mob != user)
buckled_mob.visible_message(\
"<span class='notice'>[user.name] frees [buckled_mob.name] from the vines.</span>",\
"<span class='notice'>[user.name] frees you from the vines.</span>",\
"<span class='warning'>You hear shredding and ripping.</span>")
else
buckled_mob.visible_message(\
"<span class='notice'>[buckled_mob.name] struggles free of the vines.</span>",\
"<span class='notice'>You untangle the vines from around yourself.</span>",\
"<span class='warning'>You hear shredding and ripping.</span>")
unbuckle()
else
var/text = pick("rips","tears","pulls")
user.visible_message(\
"<span class='notice'>[user.name] [text] at the vines.</span>",\
"<span class='notice'>You [text] at the vines.</span>",\
"<span class='warning'>You hear shredding and ripping.</span>")
return
/obj/effect/spacevine_controller
var/list/obj/effect/spacevine/vines = list()
var/list/growth_queue = list()
var/reached_collapse_size
var/reached_slowdown_size
//What this does is that instead of having the grow minimum of 1, required to start growing, the minimum will be 0,
//meaning if you get the spacevines' size to something less than 20 plots, it won't grow anymore.
New()
if(!istype(src.loc,/turf/simulated/floor))
del(src)
spawn_spacevine_piece(src.loc)
processing_objects.Add(src)
Destroy()
processing_objects.Remove(src)
..()
proc/spawn_spacevine_piece(var/turf/location)
var/obj/effect/spacevine/SV = new(location)
growth_queue += SV
vines += SV
SV.master = src
process()
if(!vines)
del(src) //space vines exterminated. Remove the controller
return
if(!growth_queue)
del(src) //Sanity check
return
if(vines.len >= 250 && !reached_collapse_size)
reached_collapse_size = 1
if(vines.len >= 30 && !reached_slowdown_size )
reached_slowdown_size = 1
var/length = 0
if(reached_collapse_size)
length = 0
else if(reached_slowdown_size)
if(prob(25))
length = 1
else
length = 0
else
length = 1
length = min( 30 , max( length , vines.len / 5 ) )
var/i = 0
var/list/obj/effect/spacevine/queue_end = list()
for( var/obj/effect/spacevine/SV in growth_queue )
i++
queue_end += SV
growth_queue -= SV
if(SV.energy < 2) //If tile isn't fully grown
if(prob(20))
SV.grow()
else //If tile is fully grown
SV.buckle_mob()
//if(prob(25))
SV.spread()
if(i >= length)
break
growth_queue = growth_queue + queue_end
//sleep(5)
//src.process()
/obj/effect/spacevine/proc/grow()
if(!energy)
src.icon_state = pick("Med1", "Med2", "Med3")
energy = 1
SetOpacity(1)
layer = 5
else
src.icon_state = pick("Hvy1", "Hvy2", "Hvy3")
energy = 2
/obj/effect/spacevine/proc/buckle_mob()
if(!buckled_mob && prob(25))
for(var/mob/living/carbon/V in src.loc)
if((V.stat != DEAD) && (V.buckled != src)) //if mob not dead or captured
V.buckled = src
V.loc = src.loc
V.update_canmove()
src.buckled_mob = V
V << "<span class='danger'>The vines [pick("wind", "tangle", "tighten")] around you!</span>"
break //only capture one mob at a time.
/obj/effect/spacevine/proc/spread()
var/direction = pick(cardinal)
var/step = get_step(src,direction)
if(istype(step,/turf/simulated/floor))
var/turf/simulated/floor/F = step
if(!locate(/obj/effect/spacevine,F))
if(F.Enter(src))
if(master)
master.spawn_spacevine_piece( F )
/*
/obj/effect/spacevine/proc/Life()
if (!src) return
var/Vspread
if (prob(50)) Vspread = locate(src.x + rand(-1,1),src.y,src.z)
else Vspread = locate(src.x,src.y + rand(-1, 1),src.z)
var/dogrowth = 1
if (!istype(Vspread, /turf/simulated/floor)) dogrowth = 0
for(var/obj/O in Vspread)
if (istype(O, /obj/structure/window) || istype(O, /obj/effect/forcefield) || istype(O, /obj/effect/blob) || istype(O, /obj/effect/alien/weeds) || istype(O, /obj/effect/spacevine)) dogrowth = 0
if (istype(O, /obj/machinery/door/))
if(O:p_open == 0 && prob(50)) O:open()
else dogrowth = 0
if (dogrowth == 1)
var/obj/effect/spacevine/B = new /obj/effect/spacevine(Vspread)
B.icon_state = pick("vine-light1", "vine-light2", "vine-light3")
spawn(20)
if(B)
B.Life()
src.growth += 1
if (src.growth == 10)
src.name = "Thick Space Kudzu"
src.icon_state = pick("vine-med1", "vine-med2", "vine-med3")
src.opacity = 1
src.waittime = 80
if (src.growth == 20)
src.name = "Dense Space Kudzu"
src.icon_state = pick("vine-hvy1", "vine-hvy2", "vine-hvy3")
src.density = 1
spawn(src.waittime)
if (src.growth < 20) src.Life()
*/
/obj/effect/spacevine/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(90))
del(src)
return
if(3.0)
if (prob(50))
del(src)
return
return
@@ -1,20 +0,0 @@
/datum/round_event_control/spontaneous_appendicitis
name = "Spontaneous Appendicitis"
typepath = /datum/round_event/spontaneous_appendicitis
weight = 20
max_occurrences = 4
earliest_start = 6000
/datum/round_event/spontaneous_appendicitis/start()
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
var/foundAlready = 0 //don't infect someone that already has the virus
for(var/datum/disease/D in H.viruses)
foundAlready = 1
if(H.stat == 2 || foundAlready)
continue
var/datum/disease/D = new /datum/disease/appendicitis
D.holder = H
D.affected_mob = H
H.viruses += D
break
@@ -1,4 +1,3 @@
/datum/event/vent_clog
announceWhen = 0
startWhen = 5
@@ -1,31 +0,0 @@
/datum/round_event_control/weightless
name = "Gravity Systems Failure"
typepath = /datum/round_event/weightless
weight = 15
/datum/round_event/weightless
startWhen = 5
endWhen = 65
/datum/round_event/weightless/setup()
startWhen = rand(0,10)
endWhen = rand(40,80)
/datum/round_event/weightless/announce()
command_alert("Warning: Failsafes for the station's artificial gravity arrays have been triggered. Please be aware that if this problem recurs it may result in formation of gravitational anomalies. Nanotrasen wishes to remind you that the unauthorised formation of anomalies within Nanotrasen facilities is strictly prohibited by health and safety regulation [rand(99,9999)][pick("a","b","c")]:subclause[rand(1,20)][pick("a","b","c")].")
/datum/round_event/weightless/start()
for(var/area/A in world)
A.gravitychange(0)
if(control)
control.weight *= 2
/datum/round_event/weightless/end()
for(var/area/A in world)
A.gravitychange(1)
if(announceWhen >= 0)
command_alert("Artificial gravity arrays are now functioning within normal parameters. Please report any irregularities to your respective head of staff.")
-75
View File
@@ -1,75 +0,0 @@
/datum/round_event_control/wormholes
name = "Wormholes"
typepath = /datum/round_event/wormholes
max_occurrences = 3
weight = 2
/datum/round_event/wormholes
announceWhen = 10
endWhen = 60
var/list/pick_turfs = list()
var/list/wormholes = list()
var/shift_frequency = 3
var/number_of_wormholes = 400
/datum/round_event/wormholes/setup()
announceWhen = rand(0, 20)
endWhen = rand(40, 80)
/datum/round_event/wormholes/start()
for(var/turf/simulated/floor/T in world)
if(T.z == 1)
pick_turfs += T
for(var/i = 1, i <= number_of_wormholes, i++)
var/turf/T = pick(pick_turfs)
wormholes += new /obj/effect/portal/wormhole(T, null, null, -1)
/datum/round_event/wormholes/announce()
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
for(var/mob/M in player_list)
if(!istype(M, /mob/new_player))
M << sound('sound/AI/spanomalies.ogg')
/datum/round_event/wormholes/tick()
if(activeFor % shift_frequency == 0)
for(var/obj/effect/portal/wormhole/O in wormholes)
var/turf/T = pick(pick_turfs)
if(T) O.loc = T
/datum/round_event/wormholes/end()
portals.Remove(wormholes)
for(var/obj/effect/portal/wormhole/O in wormholes)
O.loc = null
wormholes.Cut()
/obj/effect/portal/wormhole
name = "wormhole"
desc = "It looks highly unstable; It could close at any moment."
icon = 'icons/obj/objects.dmi'
icon_state = "anom"
failchance = 0
/obj/effect/portal/wormhole/attack_hand(mob/user)
teleport(user)
/obj/effect/portal/wormhole/attackby(obj/item/I, mob/user)
teleport(user)
/obj/effect/portal/wormhole/teleport(atom/movable/M)
if(istype(M, /obj/effect)) //sparks don't teleport
return
if(M.anchored && istype(M, /obj/mecha))
return
if(istype(M, /atom/movable))
var/turf/target
if(portals.len)
var/obj/effect/portal/P = pick(portals)
if(P && isturf(P.loc))
target = P.loc
if(!target) return
do_teleport(M, target, 1, 1, 0, 0) ///You will appear adjacent to the beacon
+1 -1
View File
@@ -1,6 +1,6 @@
datum/event/viral_infection
var/severity = 1
severity = 1
datum/event/viral_infection/setup()
announceWhen = rand(0, 3000)
+1 -1
View File
@@ -1,6 +1,6 @@
datum/event/viral_outbreak
var/severity = 1
severity = 1
datum/event/viral_outbreak/setup()
announceWhen = rand(0, 3000)
+1 -1
View File
@@ -2,7 +2,7 @@
datum/event/wallrot
var/severity = 1
severity = 1
datum/event/wallrot/setup()
announceWhen = rand(0, 300)
-50
View File
@@ -1,50 +0,0 @@
/datum/event/zombie_outbreak
startWhen = 40
announceWhen = 20
endWhen = 800
oneShot = 1 //DON'T SPAWN ANOTHER OUTBREAK, one is bad enough
var/spawncount = 12 //Base zombie count
/datum/event/carp_migration/setup()
announceWhen = rand(10, 40)
startWhen = rand(announceWhen, 50) //Doesn't pick anything before announcement
endWhen = rand(600,1200)
/datum/event/zombie_outbreak/start()
var/count = 0
if(player_list.len < 12)
count = 2
else if(player_list.len < 22)
count = 1
else
count = 0
for(count, count < 3, count++)
for(var/mob/living/carbon/F in living_mob_list) //Has a chance to spawn zombies on players or mobs
sleep(20)
if(prob(40))
var/mob/living/simple_animal/hostile/zombie/ZEDS = new(F.loc) //Have to give a var that's under zombie and call new.
playsound(F.loc, 'sound/effects/phasein.ogg', vol = 80, vary = 1,extrarange = 6)
//Ripped spider_infestation code
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
if(temp_vent.network.normal_members.len > 50)
vents += temp_vent
while((spawncount >= 1) && vents.len)
sleep(5)
var/obj/vent = pick(vents)
var/mob/living/simple_animal/hostile/zombie/ZEDS = new(vent.loc)
playsound(vent.loc, 'sound/effects/phasein.ogg', vol = 80, vary = 1,extrarange = 6)
vents -= vent
spawncount--
/datum/event/zombie_outbreak/announce()
var/alertshouted = pick(
"A Boscalian ship has jumped into our sector.",
"Unidentified vessel has passed our perimeter, detecting blue technology.",
"Detecting Syndicate signal.",
"Biological scans picking up level 10 biohazard. Please find the nearest BioHazard locker and prepare for sterilization procedures.")
command_alert(alertshouted)
world << sound('sound/AI/spanomalies.ogg')
+1 -1
View File
@@ -85,7 +85,7 @@
var/dir_output = 1
var/obj/structure/cable/input
var/obj/structure/cable/output
icon = 'icons/obj/pipes/heat.dmi'
icon = 'icons/atmos/heat.dmi'
icon_state = "intact"
/obj/machinery/logic/oneinput/process()