Mirror 72339 & 71284 (#18645)

* Renews a bunch of old roundend new reports that got lost. Plus, some roundend report QoL for cult and revs. (#71284)

A few roundend reports got lost from moving to dynamic and other prs.
This PRs re-allows them to occur. Namely: "Wizard Killed" (lost in
dynamic), "Blob nuked" (lost in dynamic), "Cult escaped" (lost in cult
rework), and "Nuke Ops Victory" (station destroyed via nuke) (lost from,
what I can see, an oversight / accidental swap of report values).

Additionally, small roundend report QOL for cult: Removes antag datums
from spirit realm ghosts after being dusted, so they do not show up on
the report. And in reverse, heads of staff who were dusted / destroyed
in revolution rounds are now also shown in roundend reports.

Some of these reports are dead, which is is a shame because I think
they're cool and fun.

🆑 Melbert
qol: Successfully fending off a blob now has a cross station news report
again. More pressing reports will take priority over it, though.
qol: Successfully killing a wizard (and all of their apprentices) now
has a cross station news report again.
qol: If more than half of a cultist team manages to escape on the
shuttle (rather than summoning Nar'sie), they will send a unique cross
station news report. This is still a loss, by the way. Summon Nar'sie!
qol: Nuclear Operatives successfully nuking the station now has its
unique cross station news report again, and no longer uses the generic
"The station was nuked" report.
qol: Nuking the station to stop a blob infection now has a unique cross
station news report again. Good luck convincing admins to allow this.
qol: Cult ghosts from "Spirit Realm" no longer persist on the cult's
team after being desummoned, meaning they will not show up on roundend
report.
qol: Heads of staff will now always show up on revolution roundend
report - even if their body was fully destroyed.
/🆑

* Adds support for Rulesets having intrinsic template requirements (#72339)

Title

Ensures that we load templates for a ruleset before we attempt to place
or cache characters for that ruleset
Also makes wizard and abductor async load their template to improve
(apparent) loading times for them

This is the only thing left that I can think of that would cause antags
like nukies and abductors to spawn in wrong

This should not be player facing

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
Zonespace
2023-01-11 22:18:18 -08:00
committed by GitHub
parent 8c0555856d
commit aa441a9633
25 changed files with 228 additions and 87 deletions
+22 -25
View File
@@ -958,42 +958,39 @@ SUBSYSTEM_DEF(job)
living_mob.forceMove(toLaunch)
new /obj/effect/pod_landingzone(spawn_turf, toLaunch)
///////////////////////////////////
//Keeps track of all living heads//
///////////////////////////////////
/// Returns a list of minds of all heads of staff who are alive
/datum/controller/subsystem/job/proc/get_living_heads()
. = list()
for(var/mob/living/carbon/human/player as anything in GLOB.human_list)
if(player.stat != DEAD && (player.mind?.assigned_role.departments_bitflags & DEPARTMENT_BITFLAG_COMMAND))
. += player.mind
for(var/datum/mind/head as anything in get_crewmember_minds())
if(!(head.assigned_role.departments_bitflags & DEPARTMENT_BITFLAG_COMMAND))
continue
if(isnull(head.current) || head.current.stat == DEAD)
continue
. += head
////////////////////////////
//Keeps track of all heads//
////////////////////////////
/// Returns a list of minds of all heads of staff
/datum/controller/subsystem/job/proc/get_all_heads()
. = list()
for(var/mob/living/carbon/human/player as anything in GLOB.human_list)
if(player.mind?.assigned_role.departments_bitflags & DEPARTMENT_BITFLAG_COMMAND)
. += player.mind
for(var/datum/mind/head as anything in get_crewmember_minds())
if(head.assigned_role.departments_bitflags & DEPARTMENT_BITFLAG_COMMAND)
. += head
//////////////////////////////////////////////
//Keeps track of all living security members//
//////////////////////////////////////////////
/// Returns a list of minds of all security members who are alive
/datum/controller/subsystem/job/proc/get_living_sec()
. = list()
for(var/mob/living/carbon/human/player as anything in GLOB.human_list)
if(player.stat != DEAD && (player.mind?.assigned_role.departments_bitflags & DEPARTMENT_BITFLAG_SECURITY))
. += player.mind
for(var/datum/mind/sec as anything in get_crewmember_minds())
if(!(sec.assigned_role.departments_bitflags & DEPARTMENT_BITFLAG_SECURITY))
continue
if(isnull(sec.current) || sec.current.stat == DEAD)
continue
. += sec
////////////////////////////////////////
//Keeps track of all security members//
////////////////////////////////////////
/// Returns a list of minds of all security members
/datum/controller/subsystem/job/proc/get_all_sec()
. = list()
for(var/mob/living/carbon/human/player as anything in GLOB.human_list)
if(player.mind?.assigned_role.departments_bitflags & DEPARTMENT_BITFLAG_SECURITY)
. += player.mind
for(var/datum/mind/sec as anything in get_crewmember_minds())
if(sec.assigned_role.departments_bitflags & DEPARTMENT_BITFLAG_SECURITY)
. += sec
/datum/controller/subsystem/job/proc/JobDebug(message)
log_job_debug(message)
+11 -1
View File
@@ -861,6 +861,17 @@ GLOBAL_LIST_EMPTY(the_station_areas)
/datum/controller/subsystem/mapping/proc/lazy_load_template(template_key, force = FALSE)
RETURN_TYPE(/datum/turf_reservation)
var/static/lazy_loading = FALSE
UNTIL(!lazy_loading)
lazy_loading = TRUE
. = _lazy_load_template(template_key, force)
lazy_loading = FALSE
return .
/datum/controller/subsystem/mapping/proc/_lazy_load_template(template_key, force = FALSE)
PRIVATE_PROC(TRUE)
if(LAZYACCESS(loaded_lazy_templates, template_key) && !force)
var/datum/lazy_template/template = GLOB.lazy_templates[template_key]
return template.reservations[1]
@@ -869,7 +880,6 @@ GLOBAL_LIST_EMPTY(the_station_areas)
var/datum/lazy_template/target = GLOB.lazy_templates[template_key]
if(!target)
CRASH("Attempted to lazy load a template key that does not exist: '[template_key]'")
return target.lazy_load()
/proc/generate_lighting_appearance_by_z(z_level)
+70 -20
View File
@@ -48,6 +48,7 @@ SUBSYSTEM_DEF(ticker)
var/queue_delay = 0
var/list/queued_players = list() //used for join queues when the server exceeds the hard population cap
/// What is going to be reported to other stations at end of round?
var/news_report
@@ -582,47 +583,96 @@ SUBSYSTEM_DEF(ticker)
/datum/controller/subsystem/ticker/proc/send_news_report()
var/news_message
var/news_source = "Nanotrasen News Network"
var/decoded_station_name = html_decode("[CONFIG_GET(string/cross_comms_name)]([station_name()])") //decode station_name to avoid minor_announce double encode //SKYRAT EDIT CHANGE
var/decoded_station_name = html_decode(CONFIG_GET(string/cross_comms_name)) //decode station_name to avoid minor_announce double encode // SKYRAT EDIT: CROSS COMMS CONFIG
switch(news_report)
// The nuke was detonated on the syndicate recon outpost
if(NUKE_SYNDICATE_BASE)
news_message = "In a daring raid, the heroic crew of [decoded_station_name] detonated a nuclear device in the heart of a terrorist base."
news_message = "In a daring raid, the heroic crew of [decoded_station_name] \
detonated a nuclear device in the heart of a terrorist base."
// The station was destroyed by nuke ops
if(STATION_DESTROYED_NUKE)
news_message = "We would like to reassure all employees that the reports of a Syndicate backed nuclear attack on [decoded_station_name] are, in fact, a hoax. Have a secure day!"
news_message = "We would like to reassure all employees that the reports of a Syndicate \
backed nuclear attack on [decoded_station_name] are, in fact, a hoax. Have a secure day!"
// The station was evacuated (normal result)
if(STATION_EVACUATED)
// Had an emergency reason supplied to pass along
if(emergency_reason)
news_message = "[decoded_station_name] has been evacuated after transmitting the following distress beacon:\n\n[html_decode(emergency_reason)]"
news_message = "[decoded_station_name] has been evacuated after transmitting \
the following distress beacon:\n\n[html_decode(emergency_reason)]"
else
news_message = "The crew of [decoded_station_name] has been evacuated amid unconfirmed reports of enemy activity."
news_message = "The crew of [decoded_station_name] has been \
evacuated amid unconfirmed reports of enemy activity."
// A blob won
if(BLOB_WIN)
news_message = "[decoded_station_name] was overcome by an unknown biological outbreak, killing all crew on board. Don't let it happen to you! Remember, a clean work station is a safe work station."
if(BLOB_NUKE)
news_message = "[decoded_station_name] is currently undergoing decontanimation after a controlled burst of radiation was used to remove a biological ooze. All employees were safely evacuated prior, and are enjoying a relaxing vacation."
news_message = "[decoded_station_name] was overcome by an unknown biological outbreak, killing \
all crew on board. Don't let it happen to you! Remember, a clean work station is a safe work station."
// A blob was destroyed
if(BLOB_DESTROYED)
news_message = "[decoded_station_name] is currently undergoing decontamination procedures after the destruction of a biological hazard. As a reminder, any crew members experiencing cramps or bloating should report immediately to security for incineration."
news_message = "[decoded_station_name] is currently undergoing decontamination procedures \
after the destruction of a biological hazard. As a reminder, any crew members experiencing \
cramps or bloating should report immediately to security for incineration."
// A certain percentage of all cultists managed to escape at the end of round
if(CULT_ESCAPE)
news_message = "Security Alert: A group of religious fanatics have escaped from [decoded_station_name]."
// Cult was completely or almost completely wiped out
if(CULT_FAILURE)
news_message = "Following the dismantling of a restricted cult aboard [decoded_station_name], we would like to remind all employees that worship outside of the Chapel is strictly prohibited, and cause for termination."
news_message = "Following the dismantling of a restricted cult aboard [decoded_station_name], \
we would like to remind all employees that worship outside of the Chapel is strictly prohibited, \
and cause for termination."
// Cult summoned Nar'sie
if(CULT_SUMMON)
news_message = "Company officials would like to clarify that [decoded_station_name] was scheduled to be decommissioned following meteor damage earlier this year. Earlier reports of an unknowable eldritch horror were made in error."
news_message = "Company officials would like to clarify that [decoded_station_name] was scheduled \
to be decommissioned following meteor damage earlier this year. Earlier reports of an \
unknowable eldritch horror were made in error."
// Nuke detonated, but missed the station entirely
if(NUKE_MISS)
news_message = "The Syndicate have bungled a terrorist attack [decoded_station_name], detonating a nuclear weapon in empty space nearby."
news_message = "The Syndicate have bungled a terrorist attack [decoded_station_name], \
detonating a nuclear weapon in empty space nearby."
// All nuke ops got killed
if(OPERATIVES_KILLED)
news_message = "Repairs to [decoded_station_name] are underway after an elite Syndicate death squad was wiped out by the crew."
news_message = "Repairs to [decoded_station_name] are underway after an elite \
Syndicate death squad was wiped out by the crew."
// Nuke ops results inconclusive - Crew escaped without the disk, or nukies were left alive, or something
if(OPERATIVE_SKIRMISH)
news_message = "A skirmish between security forces and Syndicate agents aboard [decoded_station_name] ended with both sides bloodied but intact."
news_message = "A skirmish between security forces and Syndicate agents aboard [decoded_station_name] \
ended with both sides bloodied but intact."
// Revolution victory
if(REVS_WIN)
news_message = "Company officials have reassured investors that despite a union led revolt aboard [decoded_station_name] there will be no wage increases for workers."
news_message = "Company officials have reassured investors that despite a union led revolt \
aboard [decoded_station_name] there will be no wage increases for workers."
// Revolution defeat
if(REVS_LOSE)
news_message = "[decoded_station_name] quickly put down a misguided attempt at mutiny. Remember, unionizing is illegal!"
news_message = "[decoded_station_name] quickly put down a misguided attempt at mutiny. \
Remember, unionizing is illegal!"
// All wizards (plus apprentices) have been killed
if(WIZARD_KILLED)
news_message = "Tensions have flared with the Space Wizard Federation following the death of one of their members aboard [decoded_station_name]."
news_message = "Tensions have flared with the Space Wizard Federation following the death \
of one of their members aboard [decoded_station_name]."
// The station was nuked generically
if(STATION_NUKED)
news_message = "[decoded_station_name] activated its self-destruct device for unknown reasons. Attempts to clone the Captain for arrest and execution are underway."
// There was a blob on board, guess it was nuked to stop it
if(length(GLOB.overminds))
for(var/mob/camera/blob/overmind as anything in GLOB.overminds)
if(overmind.max_count < overmind.announcement_size)
continue
news_message = "[decoded_station_name] is currently undergoing decontanimation after a controlled \
burst of radiation was used to remove a biological ooze. All employees were safely evacuated prior, \
and are enjoying a relaxing vacation."
break
// A self destruct or something else
else
news_message = "[decoded_station_name] activated its self-destruct device for unknown reasons. \
Attempts to clone the Captain for arrest and execution are underway."
// The emergency escape shuttle was hijacked
if(SHUTTLE_HIJACK)
news_message = "During routine evacuation procedures, the emergency shuttle of [decoded_station_name] had its navigation protocols corrupted and went off course, but was recovered shortly after."
news_message = "During routine evacuation procedures, the emergency shuttle of [decoded_station_name] \
had its navigation protocols corrupted and went off course, but was recovered shortly after."
// A supermatter cascade triggered
if(SUPERMATTER_CASCADE)
news_message = "Officials are advising nearby colonies about a newly declared exclusion zone in the sector surrounding [decoded_station_name]."
news_message = "Officials are advising nearby colonies about a newly declared exclusion zone in \
the sector surrounding [decoded_station_name]."
//SKYRAT EDIT - START
if(SSblackbox.first_death)