Merge pull request #12390 from Ghommie/Ghommie-cit800

Porting brain trauma updates: Curse of madness, cloning traumas, random brain trauma event.
This commit is contained in:
Putnam3145
2020-06-29 12:44:33 -07:00
committed by GitHub
51 changed files with 314 additions and 141 deletions
+19 -9
View File
@@ -17,9 +17,9 @@
var/holidayID = "" //string which should be in the SSeventss.holidays list if you wish this event to be holiday-specific
//anything with a (non-null) holidayID which does not match holiday, cannot run.
var/wizardevent = 0
var/alertadmins = 1 //should we let the admins know this event is firing
var/wizardevent = FALSE
var/random = FALSE //If the event has occured randomly, or if it was forced by an admin or in-game occurance
var/alert_observers = TRUE //should we let the ghosts and admins know this event is firing
//should be disabled on events that fire a lot
var/list/gamemode_blacklist = list() // Event won't happen in these gamemodes
@@ -33,7 +33,7 @@
min_players = CEILING(min_players * CONFIG_GET(number/events_min_players_mul), 1)
/datum/round_event_control/wizard
wizardevent = 1
wizardevent = TRUE
var/can_be_midround_wizard = TRUE
// Checks if the event can be spawned. Used by event controller and "false alarm" event.
@@ -67,7 +67,7 @@
return EVENT_CANT_RUN
triggering = TRUE
if (alertadmins)
if (alert_observers)
message_admins("Random Event triggering in 10 seconds: [name] (<a href='?src=[REF(src)];cancel=1'>CANCEL</a>)")
sleep(100)
var/gamemode = SSticker.mode.config_tag
@@ -92,7 +92,7 @@
log_admin_private("[key_name(usr)] cancelled event [name].")
SSblackbox.record_feedback("tally", "event_admin_cancelled", 1, typepath)
/datum/round_event_control/proc/runEvent(random)
/datum/round_event_control/proc/runEvent()
var/datum/round_event/E = new typepath()
E.current_players = get_active_player_count(alive_check = 1, afk_check = 1, human_check = 1)
E.control = src
@@ -101,10 +101,9 @@
testing("[time2text(world.time, "hh:mm:ss")] [E.type]")
if(random)
if(alertadmins)
deadchat_broadcast("<span class='deadsay'><b>[name]</b> has just been randomly triggered!</span>") //STOP ASSUMING IT'S BADMINS!
log_game("Random Event triggering: [name] ([typepath])")
if (alert_observers)
deadchat_broadcast("<span class='deadsay'><b>[name]</b> has just been[random ? " randomly" : ""] triggered!</span>") //STOP ASSUMING IT'S BADMINS!
return E
//Special admins setup
@@ -140,6 +139,17 @@
/datum/round_event/proc/start()
return
/**
* Called after something followable has been spawned by an event
* Provides ghosts a follow link to an atom if possible
* Only called once.
*/
/datum/round_event/proc/announce_to_ghosts(atom/atom_of_interest)
if(control.alert_observers)
if (atom_of_interest)
notify_ghosts("[control.name] has an object of interest: [atom_of_interest]!", source=atom_of_interest, action=NOTIFY_ORBIT, header="Something's Interesting!")
return
//Called when the tick is equal to the announceWhen variable.
//Allows you to announce before starting or vice versa.
//Only called once.
+7 -4
View File
@@ -8,7 +8,7 @@
/datum/round_event/anomaly
var/area/impact_area
var/obj/effect/anomaly/newAnomaly
var/obj/effect/anomaly/anomaly_path = /obj/effect/anomaly/flux
announceWhen = 1
@@ -27,7 +27,7 @@
//Subtypes from the above that actually should explode.
var/list/unsafe_area_subtypes = typecacheof(list(/area/engine/break_room))
allowed_areas = make_associative(GLOB.the_station_areas) - safe_area_types + unsafe_area_subtypes
return safepick(typecache_filter_list(GLOB.sortedAreas,allowed_areas))
@@ -44,6 +44,9 @@
priority_announce("Localized energetic flux wave detected on long range scanners. Expected location of impact: [impact_area.name].", "Anomaly Alert")
/datum/round_event/anomaly/start()
var/turf/T = safepick(get_area_turfs(impact_area))
var/turf/T = pick(get_area_turfs(impact_area))
var/newAnomaly
if(T)
newAnomaly = new /obj/effect/anomaly/flux(T)
newAnomaly = new anomaly_path(T)
if (newAnomaly)
announce_to_ghosts(newAnomaly)
+2 -6
View File
@@ -1,6 +1,7 @@
/datum/round_event_control/anomaly/anomaly_bluespace
name = "Anomaly: Bluespace"
typepath = /datum/round_event/anomaly/anomaly_bluespace
max_occurrences = 1
weight = 5
gamemode_blacklist = list("dynamic")
@@ -8,15 +9,10 @@
/datum/round_event/anomaly/anomaly_bluespace
startWhen = 3
announceWhen = 10
anomaly_path = /obj/effect/anomaly/bluespace
/datum/round_event/anomaly/anomaly_bluespace/announce(fake)
if(prob(90))
priority_announce("Unstable bluespace anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
else
print_command_report("Unstable bluespace anomaly detected on long range scanners. Expected location: [impact_area.name].", "Unstable bluespace anomaly")
/datum/round_event/anomaly/anomaly_bluespace/start()
var/turf/T = safepick(get_area_turfs(impact_area))
if(T)
newAnomaly = new /obj/effect/anomaly/bluespace(T)
+1 -5
View File
@@ -10,14 +10,10 @@
/datum/round_event/anomaly/anomaly_flux
startWhen = 10
announceWhen = 3
anomaly_path = /obj/effect/anomaly/flux
/datum/round_event/anomaly/anomaly_flux/announce(fake)
if(prob(90))
priority_announce("Localized hyper-energetic flux wave detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
else
print_command_report("Localized hyper-energetic flux wave detected on long range scanners. Expected location: [impact_area.name].","Localized hyper-energetic flux wave")
/datum/round_event/anomaly/anomaly_flux/start()
var/turf/T = safepick(get_area_turfs(impact_area))
if(T)
newAnomaly = new /obj/effect/anomaly/flux(T)
+2 -5
View File
@@ -1,6 +1,7 @@
/datum/round_event_control/anomaly/anomaly_grav
name = "Anomaly: Gravitational"
typepath = /datum/round_event/anomaly/anomaly_grav
max_occurrences = 5
weight = 20
gamemode_blacklist = list("dynamic")
@@ -9,14 +10,10 @@
/datum/round_event/anomaly/anomaly_grav
startWhen = 3
announceWhen = 20
anomaly_path = /obj/effect/anomaly/grav
/datum/round_event/anomaly/anomaly_grav/announce(fake)
if(prob(90))
priority_announce("Gravitational anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
else
print_command_report("Gravitational anomaly detected on long range scanners. Expected location: [impact_area.name].", "Gravitational anomaly")
/datum/round_event/anomaly/anomaly_grav/start()
var/turf/T = safepick(get_area_turfs(impact_area))
if(T)
newAnomaly = new /obj/effect/anomaly/grav(T)
+2 -5
View File
@@ -1,6 +1,7 @@
/datum/round_event_control/anomaly/anomaly_pyro
name = "Anomaly: Pyroclastic"
typepath = /datum/round_event/anomaly/anomaly_pyro
max_occurrences = 5
weight = 20
gamemode_blacklist = list("dynamic")
@@ -8,14 +9,10 @@
/datum/round_event/anomaly/anomaly_pyro
startWhen = 3
announceWhen = 10
anomaly_path = /obj/effect/anomaly/pyro
/datum/round_event/anomaly/anomaly_pyro/announce(fake)
if(prob(90))
priority_announce("Pyroclastic anomaly detected on long range scanners. Expected location: [impact_area.name].", "Anomaly Alert")
else
print_command_report("Pyroclastic anomaly detected on long range scanners. Expected location: [impact_area.name].", "Pyroclastic anomaly")
/datum/round_event/anomaly/anomaly_pyro/start()
var/turf/T = safepick(get_area_turfs(impact_area))
if(T)
newAnomaly = new /obj/effect/anomaly/pyro(T)
+1 -5
View File
@@ -10,14 +10,10 @@
/datum/round_event/anomaly/anomaly_vortex
startWhen = 10
announceWhen = 3
anomaly_path = /obj/effect/anomaly/bhole
/datum/round_event/anomaly/anomaly_vortex/announce(fake)
if(prob(90))
priority_announce("Localized high-intensity vortex anomaly detected on long range scanners. Expected location: [impact_area.name]", "Anomaly Alert")
else
print_command_report("Localized high-intensity vortex anomaly detected on long range scanners. Expected location: [impact_area.name].","Vortex anomaly")
/datum/round_event/anomaly/anomaly_vortex/start()
var/turf/T = safepick(get_area_turfs(impact_area))
if(T)
newAnomaly = new /obj/effect/anomaly/bhole(T)
+1 -1
View File
@@ -30,4 +30,4 @@
BRAIN_TRAUMA_SPECIAL = 10
))
H.gain_trauma_type(trauma_type, resistance)
H.gain_trauma_type(trauma_type, resistance)
@@ -54,6 +54,7 @@
vendingMachines.Remove(originMachine)
originMachine.shut_up = 0
originMachine.shoot_inventory = 1
announce_to_ghosts(originMachine)
/datum/round_event/brand_intelligence/tick()
+1 -1
View File
@@ -3,7 +3,7 @@
typepath = /datum/round_event/camera_failure
weight = 100
max_occurrences = 20
alertadmins = 0
alert_observers = FALSE
/datum/round_event/camera_failure
fakeable = FALSE
+10 -3
View File
@@ -10,6 +10,7 @@
/datum/round_event/carp_migration
announceWhen = 3
startWhen = 50
var/hasAnnounced = FALSE
/datum/round_event/carp_migration/setup()
startWhen = rand(40, 60)
@@ -22,10 +23,16 @@
/datum/round_event/carp_migration/start()
var/mob/living/simple_animal/hostile/carp/fish
for(var/obj/effect/landmark/carpspawn/C in GLOB.landmarks_list)
if(prob(95))
new /mob/living/simple_animal/hostile/carp(C.loc)
fish = new (C.loc)
else
new /mob/living/simple_animal/hostile/carp/megacarp(C.loc)
fish = new /mob/living/simple_animal/hostile/carp/megacarp(C.loc)
fishannounce(fish) //Prefer to announce the megacarps over the regular fishies
fishannounce(fish)
/datum/round_event/carp_migration/proc/fishannounce(atom/fish)
if (!hasAnnounced)
announce_to_ghosts(fish) //Only anounce the first fish
hasAnnounced = TRUE
+1 -1
View File
@@ -4,7 +4,7 @@
weight = 200
max_occurrences = 1000
earliest_start = 0 MINUTES
alertadmins = 0
alert_observers = FALSE
gamemode_blacklist = list("dynamic")
/datum/round_event/space_dust
+1 -1
View File
@@ -4,7 +4,7 @@
earliest_start = 10 MINUTES
min_players = 5
weight = 40
alertadmins = 0
alert_observers = FALSE
gamemode_blacklist = list("dynamic")
/datum/round_event/electrical_storm
+4 -1
View File
@@ -37,7 +37,10 @@
signing up.")
else if(status == SUCCESSFUL_SPAWN)
message_admins("[role_name] spawned successfully.")
if(!spawned_mobs.len)
if(spawned_mobs.len)
for(var/mob/M in spawned_mobs)
announce_to_ghosts(M)
else
message_admins("No mobs found in the `spawned_mobs` list, this is \
a bug.")
else
+1 -1
View File
@@ -20,4 +20,4 @@
var/mob/living/carbon/human/winner = pickweight(heart_attack_contestants)
var/datum/disease/D = new /datum/disease/heart_failure()
winner.ForceContractDisease(D, FALSE, TRUE)
notify_ghosts("[winner] is beginning to have a heart attack!", enter_link="<a href=?src=[REF(src)];orbit=1>(Click to orbit)</a>", source=winner, action=NOTIFY_ORBIT)
announce_to_ghosts(winner)
+2 -5
View File
@@ -35,7 +35,8 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
var/z = pick(SSmapping.levels_by_trait(ZTRAIT_STATION))
var/turf/startT = spaceDebrisStartLoc(startside, z)
var/turf/endT = spaceDebrisFinishLoc(startside, z)
new /obj/effect/immovablerod(startT, endT, C.special_target)
var/atom/rod = new /obj/effect/immovablerod(startT, endT, C.special_target)
announce_to_ghosts(rod)
/obj/effect/immovablerod
name = "immovable rod"
@@ -61,10 +62,6 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
z_original = z
destination = end
special_target = aimed_at
if(notify)
notify_ghosts("\A [src] is inbound!",
enter_link="<a href=?src=[REF(src)];orbit=1>(Click to orbit)</a>",
source=src, action=NOTIFY_ORBIT)
GLOB.poi_list += src
var/special_target_valid = FALSE
+2 -1
View File
@@ -80,8 +80,9 @@
var/mob/M = candidates[1]
spawner.create(M.ckey)
candidates -= M
announce_to_ghosts(M)
else
notify_ghosts("Space pirates are waking up!", source = spawner, action=NOTIFY_ATTACK, flashwindow = FALSE, ignore_dnr_observers = TRUE)
announce_to_ghosts(spawner)
priority_announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", "commandreport") //CITADEL EDIT also metabreak here too
@@ -30,6 +30,7 @@
/datum/round_event/processor_overload/start()
for(var/obj/machinery/telecomms/processor/P in GLOB.telecomms_list)
if(prob(10))
announce_to_ghosts(P)
// Damage the surrounding area to indicate that it popped
explosion(get_turf(P), 0, 0, 2)
// Only a level 1 explosion actually damages the machine
+3 -1
View File
@@ -383,7 +383,9 @@
/datum/spacevine_controller/New(turf/location, list/muts, potency, production, datum/round_event/event = null)
vines = list()
growth_queue = list()
spawn_spacevine_piece(location, null, muts)
var/obj/structure/spacevine/SV = spawn_spacevine_piece(location, null, muts)
if (event)
event.announce_to_ghosts(SV)
START_PROCESSING(SSobj, src)
vine_mutations_list = list()
init_subtypes(/datum/spacevine_mutation/, vine_mutations_list)
+1 -1
View File
@@ -35,6 +35,6 @@
var/spawn_type = /obj/structure/spider/spiderling
if(prob(66))
spawn_type = /obj/structure/spider/spiderling/nurse
spawn_atom_to_turf(spawn_type, vent, 1, FALSE)
announce_to_ghosts(spawn_atom_to_turf(spawn_type, vent, 1, FALSE))
vents -= vent
spawncount--
+28
View File
@@ -0,0 +1,28 @@
/datum/round_event_control/wizard/madness
name = "Curse of Madness"
weight = 1
typepath = /datum/round_event/wizard/madness
earliest_start = 0 MINUTES
var/forced_secret
/datum/round_event_control/wizard/madness/admin_setup()
if(!check_rights(R_FUN))
return
var/suggested = pick(strings(REDPILL_FILE, "redpill_questions"))
forced_secret = (input(usr, "What horrifying truth will you reveal?", "Curse of Madness", sortList(suggested)) as text|null) || suggested
/datum/round_event/wizard/madness/start()
var/datum/round_event_control/wizard/madness/C = control
var/horrifying_truth
if(C.forced_secret)
horrifying_truth = C.forced_secret
C.forced_secret = null
else
horrifying_truth = pick(strings(REDPILL_FILE, "redpill_questions"))
curse_of_madness(null, horrifying_truth)