Half-Refactors Jobs

This commit is contained in:
Neerti
2020-03-03 16:28:33 -05:00
committed by VirgoBot
parent d3489521d4
commit 0d9345adde
80 changed files with 673 additions and 481 deletions
@@ -1,6 +1,6 @@
/datum/gm_action/atmos_leak
name = "atmospherics leak"
departments = list(ROLE_ENGINEERING, ROLE_SYNTHETIC)
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_SYNTHETIC)
var/area/target_area // Chosen target area
var/area/target_turf // Chosen target turf in target_area
var/gas_type // Chosen gas to release
@@ -74,4 +74,4 @@
playsound(target_turf, 'sound/effects/smoke.ogg', 50, 1)
/datum/gm_action/atmos_leak/get_weight()
return 15 + (metric.count_people_in_department(ROLE_ENGINEERING) * 10 + metric.count_people_in_department(ROLE_SYNTHETIC) * 30) // Synthetics are counted in higher value because they can wirelessly connect to alarms.
return 15 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 10 + metric.count_people_in_department(DEPARTMENT_SYNTHETIC) * 30) // Synthetics are counted in higher value because they can wirelessly connect to alarms.
+4 -4
View File
@@ -1,6 +1,6 @@
/datum/gm_action/blob
name = "blob infestation"
departments = list(ROLE_ENGINEERING, ROLE_SECURITY, ROLE_MEDICAL)
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_SECURITY, DEPARTMENT_MEDICAL)
chaotic = 25
var/list/area/excluded = list(
@@ -62,9 +62,9 @@
command_announcement.Announce("Confirmed outbreak of level 7 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
/datum/gm_action/blob/get_weight()
var/engineers = metric.count_people_in_department(ROLE_ENGINEERING)
var/security = metric.count_people_in_department(ROLE_SECURITY)
var/medical = metric.count_people_in_department(ROLE_MEDICAL)
var/engineers = metric.count_people_in_department(DEPARTMENT_ENGINEERING)
var/security = metric.count_people_in_department(DEPARTMENT_SECURITY)
var/medical = metric.count_people_in_department(DEPARTMENT_MEDICAL)
var/assigned_staff = engineers + security
if(engineers || security) // Medical only counts if one of the other two exists, and even then they count as half.
@@ -1,7 +1,7 @@
/datum/gm_action/brand_intelligence
name = "rampant vending machines"
length = 30 MINUTES
departments = list(ROLE_ENGINEERING, ROLE_EVERYONE)
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_EVERYONE)
var/list/obj/machinery/vending/vendingMachines = list()
var/list/obj/machinery/vending/infectedVendingMachines = list()
@@ -66,4 +66,4 @@
infectedMachine.shoot_inventory = 0
/datum/gm_action/brand_intelligence/get_weight()
return 60 + (metric.count_people_in_department(ROLE_ENGINEERING) * 20)
return 60 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 20)
@@ -1,7 +1,7 @@
/datum/gm_action/camera_damage
name = "random camera damage"
reusable = TRUE
departments = list(ROLE_SYNTHETIC, ROLE_ENGINEERING)
departments = list(DEPARTMENT_SYNTHETIC, DEPARTMENT_ENGINEERING)
/datum/gm_action/camera_damage/start()
var/obj/machinery/camera/C = acquire_random_camera()
@@ -49,4 +49,4 @@
return T && C.can_use() && istype(C.loc, /turf) && (T.z in using_map.player_levels)
/datum/gm_action/camera_damage/get_weight()
return 40 + (metric.count_people_in_department(ROLE_ENGINEERING) * 20) + (metric.count_people_in_department(ROLE_SYNTHETIC) * 40)
return 40 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 20) + (metric.count_people_in_department(DEPARTMENT_SYNTHETIC) * 40)
@@ -4,11 +4,11 @@
/datum/gm_action/canister_leak
name = "Canister Leak"
departments = list(ROLE_ENGINEERING)
departments = list(DEPARTMENT_ENGINEERING)
chaotic = 20
/datum/gm_action/canister_leak/get_weight()
return metric.count_people_in_department(ROLE_ENGINEERING) * 30
return metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 30
/datum/gm_action/canister_leak/start()
..()
@@ -1,14 +1,14 @@
//carp_migration
/datum/gm_action/carp_migration
name = "carp migration"
departments = list(ROLE_SECURITY, ROLE_EVERYONE)
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_EVERYONE)
chaotic = 50
var/list/spawned_carp = list()
var/carp_amount = 0
length = 20 MINUTES
/datum/gm_action/carp_migration/get_weight()
return 50 + (metric.count_people_in_department(ROLE_SECURITY) * 10) + (metric.count_all_space_mobs() * 20)
return 50 + (metric.count_people_in_department(DEPARTMENT_SECURITY) * 10) + (metric.count_all_space_mobs() * 20)
/datum/gm_action/carp_migration/announce()
var/announcement = "Unknown biological entities have been detected near [station_name()], please stand-by."
@@ -17,12 +17,12 @@
/datum/gm_action/carp_migration/set_up()
// Higher filled roles means more groups of fish.
var/station_strength = 0
station_strength += (metric.count_people_in_department(ROLE_SECURITY) * 3)
station_strength += (metric.count_people_in_department(ROLE_ENGINEERING) * 2)
station_strength += metric.count_people_in_department(ROLE_MEDICAL)
station_strength += (metric.count_people_in_department(DEPARTMENT_SECURITY) * 3)
station_strength += (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 2)
station_strength += metric.count_people_in_department(DEPARTMENT_MEDICAL)
// Less active emergency response departments tones the event down.
var/activeness = ((metric.assess_department(ROLE_SECURITY) + metric.assess_department(ROLE_ENGINEERING) + metric.assess_department(ROLE_MEDICAL)) / 3)
var/activeness = ((metric.assess_department(DEPARTMENT_SECURITY) + metric.assess_department(DEPARTMENT_ENGINEERING) + metric.assess_department(DEPARTMENT_MEDICAL)) / 3)
activeness = max(activeness, 20)
carp_amount = CEILING(station_strength * (activeness / 100) + 1, 1)
@@ -1,10 +1,10 @@
/datum/gm_action/comms_blackout
name = "communications blackout"
departments = list(ROLE_ENGINEERING, ROLE_EVERYONE)
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_EVERYONE)
chaotic = 35
/datum/gm_action/comms_blackout/get_weight()
return 50 + (metric.count_people_in_department(ROLE_ENGINEERING) * 40)
return 50 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 40)
/datum/gm_action/comms_blackout/announce()
if(prob(33))
@@ -1,10 +1,10 @@
/datum/gm_action/security_drill
name = "security drills"
departments = list(ROLE_SECURITY, ROLE_EVERYONE)
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_EVERYONE)
/datum/gm_action/security_drill/announce()
spawn(rand(1 MINUTE, 2 MINUTES))
command_announcement.Announce("[pick("A NanoTrasen security director", "A Vir-Gov correspondant", "Local Sif authoritiy")] has advised the enactment of [pick("a rampant wildlife", "a fire", "a hostile boarding", "a nonstandard", "a bomb", "an emergent intelligence")] drill with the personnel onboard \the [station_name()].", "Security Advisement")
/datum/gm_action/security_drill/get_weight()
return max(-20, 10 + gm.staleness - (gm.danger * 2)) + (metric.count_people_in_department(ROLE_SECURITY) * 5) + (metric.count_people_in_department(ROLE_EVERYONE) * 1.5)
return max(-20, 10 + gm.staleness - (gm.danger * 2)) + (metric.count_people_in_department(DEPARTMENT_SECURITY) * 5) + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 1.5)
+2 -2
View File
@@ -1,6 +1,6 @@
/datum/gm_action/dust
name = "dust"
departments = list(ROLE_ENGINEERING)
departments = list(DEPARTMENT_ENGINEERING)
chaotic = 10
reusable = TRUE
@@ -8,7 +8,7 @@
command_announcement.Announce("Debris resulting from activity on another nearby asteroid is approaching your colony.", "Dust Alert")
/datum/gm_action/dust/get_weight()
var/engineers = metric.count_people_in_department(ROLE_ENGINEERING)
var/engineers = metric.count_people_in_department(DEPARTMENT_ENGINEERING)
var/weight = 30 + (engineers * 25)
return weight
@@ -1,6 +1,6 @@
/datum/gm_action/electrical_storm
name = "electrical storm"
departments = list(ROLE_EVERYONE)
departments = list(DEPARTMENT_EVERYONE)
reusable = TRUE
var/lightsoutAmount = 1
var/lightsoutRange = 25
@@ -30,4 +30,4 @@
apc.overload_lighting()
/datum/gm_action/electrical_storm/get_weight()
return 30 + (metric.count_people_in_department(ROLE_ENGINEERING) * 15) + (metric.count_people_in_department(ROLE_EVERYONE) * 5)
return 30 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 15) + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5)
@@ -1,6 +1,6 @@
/datum/gm_action/electrified_door
name = "airlock short-circuit"
departments = list(ROLE_ENGINEERING, ROLE_MEDICAL)
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_MEDICAL)
chaotic = 10
var/obj/machinery/door/airlock/chosen_door
var/area/target_area
@@ -72,4 +72,4 @@
chosen_door.update_icon()
/datum/gm_action/electrified_door/get_weight()
return 10 + (metric.count_people_in_department(ROLE_ENGINEERING) * 5 + metric.count_people_in_department(ROLE_MEDICAL) * 10)
return 10 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 5 + metric.count_people_in_department(DEPARTMENT_MEDICAL) * 10)
+2 -2
View File
@@ -1,6 +1,6 @@
/datum/gm_action/gravity
name = "gravity failure"
departments = list(ROLE_EVERYONE)
departments = list(DEPARTMENT_EVERYONE)
length = 600
var/list/zLevels
@@ -33,4 +33,4 @@
command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.", "Gravity Restored")
/datum/gm_action/gravity/get_weight()
return 30 + (metric.count_people_in_department(ROLE_EVERYONE) * 20)
return 30 + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 20)
@@ -6,11 +6,11 @@
/datum/gm_action/grid_check
name = "grid check"
departments = list(ROLE_ENGINEERING, ROLE_EVERYONE)
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_EVERYONE)
chaotic = 20
/datum/gm_action/grid_check/get_weight()
return 50 + (metric.count_people_in_department(ROLE_ENGINEERING) * 30)
return 50 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 30)
/datum/gm_action/grid_check/start()
..()
@@ -14,7 +14,7 @@
/datum/gm_action/infestation
name = "animal infestation"
departments = list(ROLE_EVERYONE)
departments = list(DEPARTMENT_EVERYONE)
var/location
var/locstring
var/vermin
@@ -100,7 +100,7 @@
command_announcement.Announce("Bioscans indicate that [vermstring] have been breeding in [locstring]. Clear them out, before this starts to affect productivity.", "Vermin infestation")
/datum/gm_action/infestation/get_weight()
return 5 + (metric.count_people_in_department(ROLE_EVERYONE) * 20)
return 5 + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 20)
#undef LOC_KITCHEN
#undef LOC_ATMOS
+2 -2
View File
@@ -1,6 +1,6 @@
/datum/gm_action/ionstorm
name = "ion storm"
departments = list(ROLE_SYNTHETIC)
departments = list(DEPARTMENT_SYNTHETIC)
var/botEmagChance = 0.5
var/list/players = list()
var/active = FALSE
@@ -45,6 +45,6 @@
ion_storm_announcement()
/datum/gm_action/ionstorm/get_weight()
var/bots = metric.count_people_in_department(ROLE_SYNTHETIC)
var/bots = metric.count_people_in_department(DEPARTMENT_SYNTHETIC)
var/weight = 5 + (bots * 20)
return weight
@@ -1,7 +1,7 @@
/datum/gm_action/manifest_malfunction
name = "manifest malfunction"
enabled = TRUE
departments = list(ROLE_SECURITY, ROLE_SYNTHETIC, ROLE_EVERYONE)
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_SYNTHETIC, DEPARTMENT_EVERYONE)
chaotic = 3
reusable = FALSE
length = 0
@@ -21,10 +21,10 @@
/datum/gm_action/manifest_malfunction/get_weight()
. = -10
var/security = metric.count_people_in_department(ROLE_SECURITY)
var/security = metric.count_people_in_department(DEPARTMENT_SECURITY)
if(security && data_core)
. += (metric.count_people_in_department(ROLE_EVERYONE) * 5) - (metric.count_people_in_department(ROLE_SYNTHETIC) * 5)
. += (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5) - (metric.count_people_in_department(DEPARTMENT_SYNTHETIC) * 5)
return .
@@ -2,7 +2,7 @@
/datum/gm_action/meteor_defense
name = "meteor defense"
departments = list(ROLE_ENGINEERING, ROLE_CARGO)
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_CARGO)
chaotic = 50
var/direction = null
var/dir_text = null
@@ -11,9 +11,9 @@
var/meteor_types
/datum/gm_action/meteor_defense/get_weight()
var/engineers = metric.count_people_in_department(ROLE_ENGINEERING)
var/cargo = metric.count_people_in_department(ROLE_CARGO)
var/bots = metric.count_people_in_department(ROLE_SYNTHETIC)
var/engineers = metric.count_people_in_department(DEPARTMENT_ENGINEERING)
var/cargo = metric.count_people_in_department(DEPARTMENT_CARGO)
var/bots = metric.count_people_in_department(DEPARTMENT_SYNTHETIC)
var/weight = (max(engineers - 1, 0) * 20) // If only one engineer exists, no meteors for now.
if(engineers >= 2)
@@ -2,7 +2,7 @@
/datum/gm_action/money_hacker
name = "bank account hacker"
departments = list(ROLE_EVERYONE)
departments = list(DEPARTMENT_EVERYONE)
reusable = TRUE
var/datum/money_account/affected_account
var/active
@@ -1,6 +1,6 @@
/datum/gm_action/money_lotto
name = "lottery win"
departments = list(ROLE_EVERYONE)
departments = list(DEPARTMENT_EVERYONE)
var/winner_name = "John Smith"
var/winner_sum = 0
var/deposit_success = 0
@@ -36,4 +36,4 @@
news_network.SubmitArticle(body, author, channel, null, 1)
/datum/gm_action/money_lotto/get_weight()
return 25 * metric.count_people_in_department(ROLE_EVERYONE)
return 25 * metric.count_people_in_department(DEPARTMENT_EVERYONE)
@@ -1,6 +1,6 @@
/datum/gm_action/pda_spam
name = "PDA spam"
departments = list(ROLE_EVERYONE)
departments = list(DEPARTMENT_EVERYONE)
reusable = TRUE
var/last_spam_time = 0
var/obj/machinery/message_server/useMS
@@ -128,4 +128,4 @@
to_chat(L, "[bicon(P)] <b>Message from [sender] (Unknown / spam?), </b>\"[message]\" (Unable to Reply)")
/datum/gm_action/pda_spam/get_weight()
return 25 * metric.count_people_in_department(ROLE_EVERYONE)
return 25 * metric.count_people_in_department(DEPARTMENT_EVERYONE)
@@ -1,7 +1,7 @@
/datum/gm_action/planet_weather_shift
name = "sudden weather shift"
enabled = TRUE
departments = list(ROLE_EVERYONE)
departments = list(DEPARTMENT_EVERYONE)
reusable = TRUE
var/datum/planet/target_planet
@@ -1,6 +1,6 @@
/datum/gm_action/prison_break
name = "prison break"
departments = list(ROLE_SECURITY, ROLE_SYNTHETIC)
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_SYNTHETIC)
var/start_time = 0
var/active = FALSE // Are we doing stuff?
@@ -14,7 +14,7 @@
/datum/gm_action/prison_break/get_weight()
var/afflicted_staff = 0
var/assigned_staff = metric.count_people_in_department(ROLE_ENGINEERING)
var/assigned_staff = metric.count_people_in_department(DEPARTMENT_ENGINEERING)
for(var/department in departments)
afflicted_staff += round(metric.count_people_in_department(department) / 2)
@@ -27,14 +27,14 @@
/datum/gm_action/prison_break/virology
name = "virology breakout"
departments = list(ROLE_MEDICAL, ROLE_SYNTHETIC)
departments = list(DEPARTMENT_MEDICAL, DEPARTMENT_SYNTHETIC)
eventDept = "Medical"
areaName = list("Virology")
areaType = list(/area/medical/virology, /area/medical/virologyaccess)
/datum/gm_action/prison_break/xenobiology
name = "xenobiology breakout"
departments = list(ROLE_RESEARCH, ROLE_SYNTHETIC)
departments = list(DEPARTMENT_RESEARCH, DEPARTMENT_SYNTHETIC)
eventDept = "Science"
areaName = list("Xenobiology")
areaType = list(/area/rnd/xenobiology)
@@ -42,7 +42,7 @@
/datum/gm_action/prison_break/station
name = "station-wide breakout"
departments = list(ROLE_SECURITY, ROLE_MEDICAL, ROLE_RESEARCH, ROLE_SYNTHETIC)
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_MEDICAL, DEPARTMENT_RESEARCH, DEPARTMENT_SYNTHETIC)
eventDept = "Station"
areaName = list("Brig","Virology","Xenobiology")
areaType = list(/area/security/prison, /area/security/brig, /area/medical/virology, /area/medical/virologyaccess, /area/rnd/xenobiology)
@@ -1,6 +1,6 @@
/datum/gm_action/radiation_storm
name = "radiation storm"
departments = list(ROLE_EVERYONE)
departments = list(DEPARTMENT_EVERYONE)
reusable = TRUE
var/enterBelt = 30
@@ -64,4 +64,4 @@
revoke_maint_all_access()
/datum/gm_action/radiation_storm/get_weight()
return 20 + (metric.count_people_in_department(ROLE_MEDICAL) * 10) + (metric.count_all_space_mobs() * 40) + (metric.count_people_in_department(ROLE_EVERYONE) * 20)
return 20 + (metric.count_people_in_department(DEPARTMENT_MEDICAL) * 10) + (metric.count_all_space_mobs() * 40) + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 20)
@@ -1,7 +1,7 @@
// The random spawn proc on the antag datum will handle announcing the spawn and whatnot.
/datum/gm_action/random_antag
name = "random antagonist"
departments = list(ROLE_EVERYONE)
departments = list(DEPARTMENT_EVERYONE)
chaotic = 30
reusable = TRUE
@@ -19,5 +19,5 @@
/datum/gm_action/random_antag/get_weight()
. = ..()
if(gm)
var/weight = max(0, (metric.count_people_in_department(ROLE_SECURITY) * 20) + (metric.count_people_in_department(ROLE_EVERYONE) * 5) + gm.staleness)
var/weight = max(0, (metric.count_people_in_department(DEPARTMENT_SECURITY) * 20) + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5) + gm.staleness)
return weight
@@ -1,6 +1,6 @@
/datum/gm_action/rogue_drone
name = "rogue drones"
departments = list(ROLE_SECURITY)
departments = list(DEPARTMENT_SECURITY)
chaotic = 60
length = 20 MINUTES
var/list/drones_list = list()
@@ -60,4 +60,4 @@
command_announcement.Announce("We're disappointed at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert")
/datum/gm_action/rogue_drone/get_weight()
return 20 + (metric.count_people_in_department(ROLE_SECURITY) * 10) + (metric.count_all_space_mobs() * 30)
return 20 + (metric.count_people_in_department(DEPARTMENT_SECURITY) * 10) + (metric.count_all_space_mobs() * 30)
@@ -1,6 +1,6 @@
/datum/gm_action/security_screening
name = "security screening"
departments = list(ROLE_SECURITY, ROLE_EVERYONE)
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_EVERYONE)
var/list/species_weights = list(
SPECIES_SKRELL = 9,
@@ -46,4 +46,4 @@
command_announcement.Announce("[pick("A nearby Navy vessel", "A Solar official", "A Vir-Gov official", "A NanoTrasen board director")] has requested the screening of [pick("every other", "every", "suspicious", "willing")] [pickweight(end_weights)] personnel onboard \the [station_name()].", "Security Advisement")
/datum/gm_action/security_screening/get_weight()
return max(-20, 10 + round(gm.staleness * 1.5) - (gm.danger * 2)) + (metric.count_people_in_department(ROLE_SECURITY) * 10) + (metric.count_people_in_department(ROLE_EVERYONE) * 1.5)
return max(-20, 10 + round(gm.staleness * 1.5) - (gm.danger * 2)) + (metric.count_people_in_department(DEPARTMENT_SECURITY) * 10) + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 1.5)
@@ -1,10 +1,10 @@
/datum/gm_action/shipping_error
name = "shipping error"
departments = list(ROLE_CARGO)
departments = list(DEPARTMENT_CARGO)
reusable = TRUE
/datum/gm_action/shipping_error/get_weight()
var/cargo = metric.count_people_in_department(ROLE_CARGO)
var/cargo = metric.count_people_in_department(DEPARTMENT_CARGO)
var/weight = (cargo * 40)
return weight
@@ -35,7 +35,7 @@
radiate()
/datum/gm_action/solar_storm/get_weight()
return 20 + (metric.count_people_in_department(ROLE_ENGINEERING) * 10) + (metric.count_all_space_mobs() * 30)
return 20 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 10) + (metric.count_all_space_mobs() * 30)
/datum/gm_action/solar_storm/proc/radiate()
// Note: Too complicated to be worth trying to use the radiation system for this. Its only in space anyway, so we make an exception in this case.
+2 -2
View File
@@ -1,6 +1,6 @@
/datum/gm_action/spacevine
name = "space-vine infestation"
departments = list(ROLE_ENGINEERING)
departments = list(DEPARTMENT_ENGINEERING)
chaotic = 2
/datum/gm_action/spacevine/start()
@@ -11,4 +11,4 @@
level_seven_announcement()
/datum/gm_action/spacevine/get_weight()
return 20 + (metric.count_people_in_department(ROLE_ENGINEERING) * 20) + (metric.count_people_in_department(ROLE_EVERYONE) * 10)
return 20 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 20) + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 10)
@@ -1,6 +1,6 @@
/datum/gm_action/spider_infestation
name = "spider infestation"
departments = list(ROLE_SECURITY, ROLE_MEDICAL, ROLE_EVERYONE)
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_MEDICAL, DEPARTMENT_EVERYONE)
chaotic = 30
severity = 1
@@ -10,9 +10,9 @@
var/spawntype = /obj/effect/spider/spiderling
/datum/gm_action/spider_infestation/set_up()
severity = pickweight(EVENT_LEVEL_MUNDANE = max(1,(12 - (3 * metric.count_people_in_department(ROLE_SECURITY)))),
EVENT_LEVEL_MODERATE = (7 + (2 * metric.count_people_in_department(ROLE_SECURITY))),
EVENT_LEVEL_MAJOR = (1 + (2 * metric.count_people_in_department(ROLE_SECURITY)))
severity = pickweight(EVENT_LEVEL_MUNDANE = max(1,(12 - (3 * metric.count_people_in_department(DEPARTMENT_SECURITY)))),
EVENT_LEVEL_MODERATE = (7 + (2 * metric.count_people_in_department(DEPARTMENT_SECURITY))),
EVENT_LEVEL_MAJOR = (1 + (2 * metric.count_people_in_department(DEPARTMENT_SECURITY)))
)
switch(severity)
@@ -47,9 +47,9 @@
spawncount--
/datum/gm_action/spider_infestation/get_weight()
var/security = metric.count_people_in_department(ROLE_SECURITY)
var/medical = metric.count_people_in_department(ROLE_MEDICAL)
var/engineering = metric.count_people_in_department(ROLE_ENGINEERING)
var/security = metric.count_people_in_department(DEPARTMENT_SECURITY)
var/medical = metric.count_people_in_department(DEPARTMENT_MEDICAL)
var/engineering = metric.count_people_in_department(DEPARTMENT_ENGINEERING)
var/assigned_staff = security + round(medical / 2) + round(engineering / 2)
@@ -1,6 +1,6 @@
/datum/gm_action/spontaneous_appendicitis
name = "appendicitis"
departments = list(ROLE_MEDICAL, ROLE_EVERYONE)
departments = list(DEPARTMENT_MEDICAL, DEPARTMENT_EVERYONE)
chaotic = 1
/datum/gm_action/spontaneous_appendicitis/start()
@@ -10,4 +10,4 @@
break
/datum/gm_action/spontaneous_appendicitis/get_weight()
return max(0, -5 + (metric.count_people_in_department(ROLE_MEDICAL) * 10))
return max(0, -5 + (metric.count_people_in_department(DEPARTMENT_MEDICAL) * 10))
@@ -1,6 +1,6 @@
/datum/gm_action/station_fund_raise
name = "local funding drive"
departments = list(ROLE_SECURITY, ROLE_CARGO, ROLE_EVERYONE)
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_CARGO, DEPARTMENT_EVERYONE)
/datum/gm_action/station_fund_raise/announce()
spawn(rand(1 MINUTE, 2 MINUTES))
@@ -11,4 +11,4 @@
if(station_account.money <= 80000)
weight_modifier = 1
return (max(-20, 10 + gm.staleness) + ((metric.count_people_in_department(ROLE_SECURITY) + (metric.count_people_in_department(ROLE_CARGO))) * 5) + (metric.count_people_in_department(ROLE_EVERYONE) * 3)) * weight_modifier
return (max(-20, 10 + gm.staleness) + ((metric.count_people_in_department(DEPARTMENT_SECURITY) + (metric.count_people_in_department(DEPARTMENT_CARGO))) * 5) + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 3)) * weight_modifier
+2 -2
View File
@@ -1,6 +1,6 @@
/datum/gm_action/stowaway
name = "stowaway pod"
departments = list(ROLE_EVERYONE, ROLE_SECURITY)
departments = list(DEPARTMENT_EVERYONE, DEPARTMENT_SECURITY)
chaotic = 10
observers_used = TRUE
var/area/target_area // Chosen target area
@@ -72,7 +72,7 @@
say_dead_object("A <span class='notice'>[HP.occupant_type]</span> pod is now available in \the [target_area].", HP)
/datum/gm_action/stowaway/get_weight()
return -20 + (metric.count_people_in_department(ROLE_SECURITY) * 15 + metric.count_people_in_department(ROLE_SYNTHETIC) * 5 + metric.count_people_in_department(ROLE_EVERYONE) * 1)
return -20 + (metric.count_people_in_department(DEPARTMENT_SECURITY) * 15 + metric.count_people_in_department(DEPARTMENT_SYNTHETIC) * 5 + metric.count_people_in_department(DEPARTMENT_EVERYONE) * 1)
/datum/gm_action/stowaway/announce()
spawn(rand(15 MINUTES, 30 MINUTES))
@@ -1,7 +1,7 @@
/datum/gm_action/nanotrasen_budget_allocation
name = "supply point to cargo budget"
enabled = TRUE
departments = list(ROLE_CARGO)
departments = list(DEPARTMENT_CARGO)
chaotic = 0
reusable = TRUE
@@ -22,8 +22,8 @@
/datum/gm_action/nanotrasen_budget_allocation/get_weight()
. = round(SC.points / 15)
var/cargo = metric.count_people_in_department(ROLE_CARGO)
var/personnel = metric.count_people_in_department(ROLE_EVERYONE)
var/cargo = metric.count_people_in_department(DEPARTMENT_CARGO)
var/personnel = metric.count_people_in_department(DEPARTMENT_EVERYONE)
if(cargo)
. = round(SC.points / (10 + personnel)) + cargo * 10
@@ -1,11 +1,11 @@
/datum/gm_action/request
name = "general request"
departments = list(ROLE_CARGO)
departments = list(DEPARTMENT_CARGO)
/datum/gm_action/request/announce()
spawn(rand(1 MINUTE, 2 MINUTES))
command_announcement.Announce("[pick("A nearby vessel", "A Solar contractor", "A Skrellian contractor", "A NanoTrasen board director")] has requested the delivery of [pick("one","two","three","several")] [pick("medical","engineering","research","civilian")] supply packages. The [station_name()] has been tasked with completing this request.", "Supply Request")
/datum/gm_action/request/get_weight()
return max(15, 15 + round(gm.staleness / 2) - gm.danger) + (metric.count_people_in_department(ROLE_CARGO) * 10)
return max(15, 15 + round(gm.staleness / 2) - gm.danger) + (metric.count_people_in_department(DEPARTMENT_CARGO) * 10)
@@ -2,7 +2,7 @@
/datum/gm_action/surprise_carp_attack
name = "surprise carp attack"
departments = list(ROLE_EVERYONE)
departments = list(DEPARTMENT_EVERYONE)
reusable = TRUE
chaotic = 10
var/mob/living/victim = null
@@ -2,11 +2,11 @@
/datum/gm_action/surprise_meteors
name = "surprise meteors"
departments = list(ROLE_ENGINEERING)
departments = list(DEPARTMENT_ENGINEERING)
chaotic = 25
/datum/gm_action/surprise_meteors/get_weight()
var/engineers = metric.count_people_in_department(ROLE_ENGINEERING)
var/engineers = metric.count_people_in_department(DEPARTMENT_ENGINEERING)
var/weight = (max(engineers - 1, 0) * 25) // If only one engineer exists, no meteors for now.
return weight
@@ -1,6 +1,6 @@
/datum/gm_action/swarm_boarder
name = "swarmer shell"
departments = list(ROLE_EVERYONE, ROLE_SECURITY, ROLE_ENGINEERING)
departments = list(DEPARTMENT_EVERYONE, DEPARTMENT_SECURITY, DEPARTMENT_ENGINEERING)
chaotic = 60
observers_used = TRUE
var/area/target_area // Chosen target area
@@ -67,7 +67,7 @@
new swarmertype(target_turf)
/datum/gm_action/swarm_boarder/get_weight()
return max(0, -60 + (metric.count_people_in_department(ROLE_SECURITY) * 10 + metric.count_people_in_department(ROLE_SYNTHETIC) * 5))
return max(0, -60 + (metric.count_people_in_department(DEPARTMENT_SECURITY) * 10 + metric.count_people_in_department(DEPARTMENT_SYNTHETIC) * 5))
/datum/gm_action/swarm_boarder/announce()
spawn(rand(5 MINUTES, 15 MINUTES))
@@ -2,7 +2,7 @@
/datum/gm_action/viral_infection
name = "viral infection"
departments = list(ROLE_MEDICAL)
departments = list(DEPARTMENT_MEDICAL)
chaotic = 5
var/list/viruses = list()
severity = 1
@@ -80,4 +80,4 @@
message_admins("Virus event affecting [english_list(used_candidates_links)] started; Viruses: [english_list(used_viruses_links)]")
/datum/gm_action/viral_infection/get_weight()
return (metric.count_people_in_department(ROLE_MEDICAL) * 20)
return (metric.count_people_in_department(DEPARTMENT_MEDICAL) * 20)
@@ -1,6 +1,6 @@
/datum/gm_action/viral_outbreak
name = "viral outbreak"
departments = list(ROLE_MEDICAL, ROLE_EVERYONE)
departments = list(DEPARTMENT_MEDICAL, DEPARTMENT_EVERYONE)
chaotic = 30
severity = 1
var/list/candidates = list()
@@ -29,9 +29,9 @@
severity--
/datum/gm_action/viral_outbreak/get_weight()
var/medical = metric.count_people_in_department(ROLE_MEDICAL)
var/security = metric.count_people_in_department(ROLE_SECURITY)
var/everyone = metric.count_people_in_department(ROLE_EVERYONE)
var/medical = metric.count_people_in_department(DEPARTMENT_MEDICAL)
var/security = metric.count_people_in_department(DEPARTMENT_SECURITY)
var/everyone = metric.count_people_in_department(DEPARTMENT_EVERYONE)
var/assigned_staff = medical + round(security / 2)
+2 -2
View File
@@ -1,6 +1,6 @@
/datum/gm_action/wallrot
name = "wall rot"
departments = list(ROLE_ENGINEERING)
departments = list(DEPARTMENT_ENGINEERING)
reusable = TRUE
var/turf/simulated/wall/center
severity = 1
@@ -40,4 +40,4 @@
break
/datum/gm_action/wallrot/get_weight()
return 60 + (metric.count_people_in_department(ROLE_ENGINEERING) * 35)
return 60 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 35)
@@ -2,8 +2,8 @@
/datum/gm_action/waste_disposal
name = "waste disposal"
departments = list(ROLE_CARGO)
departments = list(DEPARTMENT_CARGO)
chaotic = 0
/datum/gm_action/waste_disposal/get_weight()
return metric.count_people_in_department(ROLE_CARGO) * 50
return metric.count_people_in_department(DEPARTMENT_CARGO) * 50
@@ -1,6 +1,6 @@
/datum/gm_action/window_break
name = "window breach"
departments = list(ROLE_ENGINEERING)
departments = list(DEPARTMENT_ENGINEERING)
chaotic = 5
var/obj/structure/window/chosen_window
var/list/obj/structure/window/collateral_windows
@@ -75,4 +75,4 @@
command_announcement.Announce("Structural integrity of windows at [chosen_location.loc.name] is failing. Immediate repair or replacement is advised.", "Structural Alert")
/datum/gm_action/window_break/get_weight()
return 20 * metric.count_people_in_department(ROLE_ENGINEERING)
return 20 * metric.count_people_in_department(DEPARTMENT_ENGINEERING)
+2 -2
View File
@@ -2,7 +2,7 @@
name = "space-time anomalies"
chaotic = 70
length = 12 MINUTES
departments = list(ROLE_EVERYONE)
departments = list(DEPARTMENT_EVERYONE)
severity = 1
/datum/gm_action/wormholes/set_up() // 1 out of 5 will be full-duration wormholes, meaning up to a minute long.
@@ -17,7 +17,7 @@
wormhole_event(length / 2, (severity / 3))
/datum/gm_action/wormholes/get_weight()
return 10 + max(0, -30 + (metric.count_people_in_department(ROLE_EVERYONE) * 5) + (metric.count_people_in_department(ROLE_ENGINEERING) + 10) + (metric.count_people_in_department(ROLE_MEDICAL) * 20))
return 10 + max(0, -30 + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5) + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) + 10) + (metric.count_people_in_department(DEPARTMENT_MEDICAL) * 20))
/datum/gm_action/wormholes/end()
command_announcement.Announce("There are no more space-time anomalies detected on the station.", "Anomaly Alert")
+1 -1
View File
@@ -138,7 +138,7 @@
for(var/datum/gm_action/action in available_actions)
if(!action.enabled)
continue
if(ROLE_EVERYONE in action.departments)
if(DEPARTMENT_EVERYONE in action.departments)
best_actions.Add(action)
log_debug("[action.name] is being considered because it involves everyone.")