mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-15 20:22:07 +00:00
## About The Pull Request This swaps out the pirate spawner on the Meta Central VDOM with the subtype specifically meant for virtual domains. That thing wasn't actually a virtual domain spawner, it was just a regular one. This applies the necessary restrictions/roles being applied to pirates who spawn on that map. It will also make #86794 work on the Metastation Central map, rather than only affect the Corsair Cove map (which used the correct spawner type). This also adds the Announce to Ghosts flag to Meta Central, as is uniform for maps with ghost roles. Doing so also enables the VDOM selector UI indicator that ghost roles can spawn on the map. This whole thing started as an attempt to fix #86785 but I was too slow and someone beat me too it. Darn. ## Why It's Good For The Game Ensures #86785 will be closed properly. ## Changelog 🆑 Rhials fix: The Meta Central Virtual Domain now uses the proper ghost role spawner, meaning you can't eavesdrop on syndie comms using their headset. /🆑
62 lines
2.1 KiB
Plaintext
62 lines
2.1 KiB
Plaintext
#define REDACTED "???"
|
|
|
|
SUBSYSTEM_DEF(bitrunning)
|
|
name = "Bitrunning"
|
|
flags = SS_NO_FIRE
|
|
|
|
var/list/all_domains = list()
|
|
|
|
/datum/controller/subsystem/bitrunning/Initialize()
|
|
InitializeDomains()
|
|
return SS_INIT_SUCCESS
|
|
|
|
/datum/controller/subsystem/bitrunning/proc/InitializeDomains()
|
|
for(var/path in subtypesof(/datum/lazy_template/virtual_domain))
|
|
all_domains += new path()
|
|
|
|
/// Compiles a list of available domains.
|
|
/datum/controller/subsystem/bitrunning/proc/get_available_domains(scanner_tier, points)
|
|
var/list/levels = list()
|
|
|
|
for(var/datum/lazy_template/virtual_domain/domain as anything in all_domains)
|
|
if(domain.test_only)
|
|
continue
|
|
var/can_view = domain.difficulty < scanner_tier && domain.cost <= points + 5
|
|
var/can_view_reward = domain.difficulty < (scanner_tier + 1) && domain.cost <= points + 3
|
|
|
|
UNTYPED_LIST_ADD(levels, list(
|
|
"announce_ghosts" = domain.announce_to_ghosts,
|
|
"cost" = domain.cost,
|
|
"desc" = can_view ? domain.desc : "Limited scanning capabilities. Cannot infer domain details.",
|
|
"difficulty" = domain.difficulty,
|
|
"id" = domain.key,
|
|
"is_modular" = domain.is_modular,
|
|
"has_secondary_objectives" = assoc_value_sum(domain.secondary_loot) ? TRUE : FALSE,
|
|
"name" = can_view ? domain.name : REDACTED,
|
|
"reward" = can_view_reward ? domain.reward_points : REDACTED,
|
|
))
|
|
|
|
return levels
|
|
|
|
/datum/controller/subsystem/bitrunning/proc/pick_secondary_loot(completed_domain)
|
|
var/datum/lazy_template/virtual_domain/domain = completed_domain
|
|
var/choice
|
|
|
|
if(assoc_value_sum(domain.secondary_loot))
|
|
choice = pick_weight(domain.secondary_loot)
|
|
domain.secondary_loot[choice] -= 1
|
|
else
|
|
choice = /obj/item/paper/paperslip/bitrunning_error
|
|
CRASH("Virtual domain [domain.name] tried to pick secondary objective loot, but secondary_loot list was empty.")
|
|
return choice
|
|
|
|
/obj/item/paper/paperslip/bitrunning_error
|
|
name = "Apology Letter"
|
|
desc = "Something went wrong here."
|
|
|
|
/obj/item/paper/paperslip/bitrunning_error/Initialize(mapload)
|
|
default_raw_text = "Your reward for collecting the encrypted curiosity failed to arrive, please report this to technical support."
|
|
return ..()
|
|
|
|
#undef REDACTED
|