Cleans up signal use in bitrunning [NO GBP] (#79426)

## About The Pull Request
Atomized #78997
Broke up duplicate signal usage - though they do the same thing, this is
convention & it makes it easier to debug
Removed custom alert subtypes in favor of just setting values directly
Removed some unnecessary vars like the console ref from the server
Since I'm just copying this over, it has added exam text for net pods,
which fixes an issue reported to me in Discord
## Why It's Good For The Game
Code improvement
## Changelog
🆑
add: Added some clarity to the range of netpods (4 tiles) in their exam
text.
/🆑
This commit is contained in:
Jeremiah
2023-11-02 13:23:48 +00:00
committed by GitHub
parent cc92cd42da
commit 550ec9b1d9
13 changed files with 169 additions and 170 deletions
+14 -26
View File
@@ -7,19 +7,6 @@
update_appearance()
radio.talk_into(src, "Thermal systems within operational parameters. Proceeding to domain configuration.", RADIO_CHANNEL_SUPPLY)
/// Attempts to connect to a quantum console
/obj/machinery/quantum_server/proc/find_console()
var/obj/machinery/computer/quantum_console/console = console_ref?.resolve()
if(console)
return console
for(var/direction in GLOB.cardinals)
var/obj/machinery/computer/quantum_console/nearby_console = locate(/obj/machinery/computer/quantum_console, get_step(src, direction))
if(nearby_console)
console_ref = WEAKREF(nearby_console)
nearby_console.server_ref = WEAKREF(src)
return nearby_console
/// Compiles a list of available domains.
/obj/machinery/quantum_server/proc/get_available_domains()
var/list/levels = list()
@@ -91,6 +78,15 @@
domain_randomized = TRUE
return available["id"]
/// Locates any turfs with forges on them, returns a random one
/obj/machinery/quantum_server/proc/get_random_nearby_forge()
var/list/nearby_forges = list()
for(var/obj/machinery/byteforge/forge in oview(MAX_DISTANCE, src))
nearby_forges += forge
return pick(nearby_forges)
/// Gets all mobs originally generated by the loaded domain and returns a list that are capable of being antagged
/obj/machinery/quantum_server/proc/get_valid_domain_targets()
// A: No one is playing
@@ -116,20 +112,12 @@
return nearby_forges
/// Finds any mobs with minds in the zones and gives them the bad news
/obj/machinery/quantum_server/proc/notify_spawned_threats()
for(var/datum/weakref/baddie_ref as anything in spawned_threat_refs)
var/mob/living/baddie = baddie_ref.resolve()
if(isnull(baddie) || baddie.stat >= UNCONSCIOUS || isnull(baddie.mind))
continue
/// Severs any connected users
/obj/machinery/quantum_server/proc/sever_connections()
if(isnull(generated_domain) || !length(avatar_connection_refs))
return
baddie.throw_alert(
ALERT_BITRUNNER_RESET,
/atom/movable/screen/alert/bitrunning/qserver_threat_deletion,
new_master = src,
)
to_chat(baddie, span_userdanger("You have been flagged for deletion! Thank you for your service."))
SEND_SIGNAL(src, COMSIG_BITRUNNER_QSRV_SEVER)
/// Do some magic teleport sparks
/obj/machinery/quantum_server/proc/spark_at_location(obj/cache)