Bitrunning hotfix 3 (#78818)

## About The Pull Request
The next round of small changes to how bitrunning works - mostly from
feedback, bug reports etc.

- The loot crate delivery spot is now a buildable machine (the
byteforge), making it replaceable in the event of a disaster
- Same for netpods and quantum consoles. These boards are now
researchable and buildable.
- New icons for the byteforge and the health monitor
- Some bug fixes around despawning avatars
- Reimplements one of the bitrunning unit tests

<details>
<summary>Pictures ⬇️</summary>

Host monitor

![hostmon](https://github.com/tgstation/tgstation/assets/42397676/dc6811bc-7ce9-4eae-a91b-96975bd13c65)

Byteforge

![dreamseeker_LewhZG8bEl](https://github.com/tgstation/tgstation/assets/42397676/3071bc5f-b2c1-47d5-8a56-b0e6c216be20)

Spawning a crate

![dreamseeker_mHGSfoeMu5](https://github.com/tgstation/tgstation/assets/42397676/d5f84e91-b9bc-4bb8-8f1c-f8931154ff6d)
</details>

## Why It's Good For The Game
Bitrunning bug fixes and personal requests
Fixes #78571 
Fixes an issue reported in discord - players stuck as gondola spawn

## Changelog
🆑
fix: Added extra checks to bitrunning domain cleanup so avatars are
deleted properly.
add: Quantum servers now look for a new machine called a byteforge to
spawn loot on- no longer on an invisible landmark. This should make the
rooms rebuildable after disasters.
add: *Most* bitrunning machinery is now researchable and buildable via
circuits in the engineering protolathe.
/🆑
This commit is contained in:
Jeremiah
2023-10-09 00:26:16 -04:00
committed by GitHub
parent 7061c67a2d
commit 235ebba7e0
26 changed files with 238 additions and 154 deletions
+4 -12
View File
@@ -32991,15 +32991,10 @@
/turf/open/floor/iron,
/area/station/security/checkpoint/escape)
"lLq" = (
/obj/effect/turf_decal/box/corners{
dir = 1
},
/obj/effect/turf_decal/box/corners{
dir = 4
},
/obj/machinery/firealarm/directional/east,
/obj/effect/decal/cleanable/oil,
/obj/effect/landmark/bitrunning/station_reward_spawn,
/obj/machinery/byteforge,
/obj/effect/turf_decal/box,
/turf/open/floor/iron/dark/smooth_large,
/area/station/bitrunning/den)
"lLr" = (
@@ -37938,13 +37933,10 @@
/turf/open/floor/circuit/telecomms/mainframe,
/area/station/science/xenobiology)
"nyf" = (
/obj/effect/turf_decal/box/corners{
dir = 8
},
/obj/effect/turf_decal/box/corners,
/obj/machinery/camera/autoname/directional/east,
/obj/effect/decal/cleanable/dirt,
/obj/effect/landmark/bitrunning/station_reward_spawn,
/obj/structure/table,
/obj/item/food/cornchips/green,
/turf/open/floor/iron/dark/smooth_large,
/area/station/bitrunning/den)
"nyi" = (
+9 -16
View File
@@ -10151,12 +10151,9 @@
/turf/open/floor/iron/dark,
/area/station/command/heads_quarters/hop)
"cwd" = (
/obj/effect/turf_decal/box/corners,
/obj/effect/turf_decal/box/corners{
dir = 4
},
/obj/machinery/light/directional/south,
/obj/effect/landmark/bitrunning/station_reward_spawn,
/obj/machinery/byteforge,
/obj/effect/turf_decal/box,
/turf/open/floor/iron/dark/smooth_large,
/area/station/bitrunning/den)
"cwe" = (
@@ -39286,15 +39283,15 @@
/turf/open/floor/iron/white,
/area/station/command/heads_quarters/cmo)
"jKY" = (
/obj/effect/turf_decal/box/corners{
dir = 8
},
/obj/effect/turf_decal/box/corners{
dir = 1
},
/obj/effect/decal/cleanable/oil/streak,
/obj/machinery/camera/directional/south,
/obj/effect/landmark/bitrunning/station_reward_spawn,
/obj/structure/table,
/obj/item/storage/toolbox/mechanical{
pixel_y = 7
},
/obj/item/reagent_containers/cup/soda_cans/space_mountain_wind{
pixel_x = 5
},
/turf/open/floor/iron/dark/smooth_large,
/area/station/bitrunning/den)
"jLa" = (
@@ -86574,10 +86571,6 @@
dir = 1
},
/obj/effect/decal/cleanable/dirt/dust,
/obj/item/storage/toolbox/mechanical{
pixel_x = -8;
pixel_y = 17
},
/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4,
/obj/structure/cable,
/obj/machinery/holopad,
@@ -10091,15 +10091,10 @@
/area/mine/laborcamp)
"cWa" = (
/obj/machinery/light_switch/directional/west,
/obj/effect/turf_decal/box/corners{
dir = 1
},
/obj/effect/turf_decal/box/corners{
dir = 4
},
/obj/effect/decal/cleanable/cobweb,
/obj/effect/decal/cleanable/dirt/dust,
/obj/effect/landmark/bitrunning/station_reward_spawn,
/obj/machinery/byteforge,
/obj/effect/turf_decal/box,
/turf/open/floor/iron/dark/smooth_large,
/area/station/bitrunning/den)
"cWq" = (
@@ -62098,11 +62093,7 @@
/turf/open/floor/plating/snowed/icemoon,
/area/icemoon/underground/explored)
"sVW" = (
/obj/effect/turf_decal/box/corners{
dir = 8
},
/obj/effect/turf_decal/box/corners,
/obj/effect/landmark/bitrunning/station_reward_spawn,
/obj/effect/decal/cleanable/dirt/dust,
/turf/open/floor/iron/dark/smooth_large,
/area/station/bitrunning/den)
"sWl" = (
+2 -12
View File
@@ -3343,16 +3343,9 @@
/turf/open/floor/iron,
/area/station/hallway/primary/starboard)
"bje" = (
/obj/effect/turf_decal/box/corners{
dir = 8
},
/obj/effect/turf_decal/box/corners{
dir = 1
},
/obj/effect/decal/cleanable/oil/streak,
/obj/machinery/atmospherics/components/unary/vent_pump/on/layer4,
/obj/structure/extinguisher_cabinet/directional/north,
/obj/effect/landmark/bitrunning/station_reward_spawn,
/turf/open/floor/iron/dark/smooth_large,
/area/station/bitrunning/den)
"bjl" = (
@@ -29712,14 +29705,11 @@
/turf/open/floor/engine,
/area/station/science/explab)
"kHU" = (
/obj/effect/turf_decal/box/corners,
/obj/effect/turf_decal/box/corners{
dir = 4
},
/obj/effect/decal/cleanable/dirt/dust,
/obj/machinery/light_switch/directional/north,
/obj/effect/decal/cleanable/dirt/dust,
/obj/effect/landmark/bitrunning/station_reward_spawn,
/obj/machinery/byteforge,
/obj/effect/turf_decal/box,
/turf/open/floor/iron/dark/smooth_large,
/area/station/bitrunning/den)
"kIG" = (
+8 -19
View File
@@ -17161,9 +17161,6 @@
/obj/item/cigbutt/cigarbutt{
pixel_x = 7
},
/obj/effect/turf_decal/stripes{
dir = 8
},
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer2{
dir = 1
},
@@ -34844,12 +34841,10 @@
/turf/open/floor/pod/light,
/area/station/maintenance/floor1/starboard/fore)
"jhP" = (
/obj/effect/turf_decal/box/corners,
/obj/effect/turf_decal/box/corners{
dir = 4
},
/obj/effect/decal/cleanable/dirt/dust,
/obj/effect/landmark/bitrunning/station_reward_spawn,
/obj/effect/turf_decal/stripes{
dir = 8
},
/turf/open/floor/iron/dark/smooth_large,
/area/station/bitrunning/den)
"jhU" = (
@@ -50980,9 +50975,6 @@
/obj/structure/cable,
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
/obj/effect/turf_decal/trimline/brown/line,
/obj/effect/turf_decal/stripes/corner{
dir = 8
},
/obj/structure/disposalpipe/segment{
dir = 4
},
@@ -55648,11 +55640,13 @@
},
/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4,
/obj/structure/cable,
/obj/effect/turf_decal/stripes,
/obj/effect/turf_decal/trimline/brown/line,
/obj/structure/disposalpipe/segment{
dir = 5
},
/obj/effect/turf_decal/stripes/corner{
dir = 8
},
/turf/open/floor/iron/dark/smooth_half,
/area/station/bitrunning/den)
"owo" = (
@@ -78519,16 +78513,11 @@
/turf/open/floor/iron,
/area/station/hallway/floor2/aft)
"uDm" = (
/obj/effect/turf_decal/box/corners{
dir = 8
},
/obj/effect/turf_decal/box/corners{
dir = 1
},
/obj/machinery/firealarm/directional/south,
/obj/machinery/light/directional/south,
/obj/effect/decal/cleanable/oil/streak,
/obj/effect/landmark/bitrunning/station_reward_spawn,
/obj/machinery/byteforge,
/obj/effect/turf_decal/box,
/turf/open/floor/iron/dark/smooth_large,
/area/station/bitrunning/den)
"uDr" = (
+3 -3
View File
@@ -2184,7 +2184,7 @@
/turf/open/floor/iron,
/area/station/command/bridge)
"FW" = (
/obj/effect/landmark/bitrunning/station_reward_spawn,
/obj/machinery/byteforge,
/turf/open/floor/circuit/green,
/area/station/bitrunning/den)
"Ht" = (
@@ -3196,7 +3196,7 @@ aa
aa
aa
uI
FW
hU
hU
jR
Oq
@@ -3288,8 +3288,8 @@ aa
aa
aa
uI
FW
hU
FW
jR
Oq
uI
+2 -12
View File
@@ -42017,14 +42017,9 @@
/turf/open/floor/iron/white,
/area/station/science/lobby)
"nUF" = (
/obj/effect/turf_decal/box/corners,
/obj/effect/turf_decal/box/corners{
dir = 4
},
/obj/effect/decal/cleanable/dirt/dust,
/obj/machinery/light/directional/north,
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer2,
/obj/effect/landmark/bitrunning/station_reward_spawn,
/turf/open/floor/iron/dark/smooth_large,
/area/station/bitrunning/den)
"nUM" = (
@@ -45391,17 +45386,12 @@
/turf/open/floor/plating,
/area/station/commons/vacant_room)
"plH" = (
/obj/effect/turf_decal/box/corners{
dir = 8
},
/obj/effect/turf_decal/box/corners{
dir = 1
},
/obj/effect/decal/cleanable/oil/streak,
/obj/structure/sign/poster/random/directional/north,
/obj/machinery/power/apc/auto_name/directional/west,
/obj/structure/cable,
/obj/effect/landmark/bitrunning/station_reward_spawn,
/obj/machinery/byteforge,
/obj/effect/turf_decal/box,
/turf/open/floor/iron/dark/smooth_large,
/area/station/bitrunning/den)
"plQ" = (
@@ -29,3 +29,6 @@
/// from /obj/machinery/quantum_server/refreshParts(): (servo rating)
#define COMSIG_BITRUNNER_SERVER_UPGRADED "bitrunner_server_upgraded"
/// from /obj/machinery/quantum_server/scrub_vdom()
#define COMSIG_BITRUNNER_DOMAIN_SCRUBBED "bitrunner_domain_scrubbed"
@@ -605,8 +605,3 @@
name = "Medical Order"
greyscale_colors = CIRCUIT_COLOR_SUPPLY
build_path = /obj/machinery/computer/department_orders/medical
/obj/item/circuitboard/computer/quantum_console
name = "Quantum Server Console"
greyscale_colors = CIRCUIT_COLOR_SUPPLY
build_path = /obj/machinery/computer/quantum_console
@@ -1529,21 +1529,3 @@
/obj/item/stack/sheet/plasteel = 2,
)
/obj/item/circuitboard/machine/quantum_server
name = "Quantum Server"
greyscale_colors = CIRCUIT_COLOR_SUPPLY
build_path = /obj/machinery/quantum_server
req_components = list(
/datum/stock_part/servo = 2,
/datum/stock_part/scanning_module = 1,
/datum/stock_part/capacitor = 1,
)
/obj/item/circuitboard/machine/netpod
name = "Netpod"
greyscale_colors = CIRCUIT_COLOR_SUPPLY
build_path = /obj/machinery/netpod
req_components = list(
/datum/stock_part/servo = 1,
/datum/stock_part/matter_bin = 2,
)
@@ -68,7 +68,7 @@
/datum/component/avatar_connection/RegisterWithParent()
ADD_TRAIT(parent, TRAIT_TEMPORARY_BODY, REF(src))
RegisterSignal(parent, COMSIG_BITRUNNER_SAFE_DISCONNECT, PROC_REF(on_safe_disconnect))
RegisterSignal(parent, COMSIG_LIVING_DEATH, PROC_REF(on_sever_connection), override = TRUE)
RegisterSignal(parent, COMSIG_LIVING_DEATH, PROC_REF(on_sever_connection))
RegisterSignal(parent, COMSIG_MOB_APPLY_DAMAGE, PROC_REF(on_linked_damage))
/datum/component/avatar_connection/UnregisterFromParent()
@@ -79,7 +79,9 @@
/// Disconnects the avatar and returns the mind to the old_body.
/datum/component/avatar_connection/proc/full_avatar_disconnect(forced = FALSE, datum/source)
#ifndef UNIT_TESTS
return_to_old_body()
#endif
var/obj/machinery/netpod/hosting_netpod = netpod_ref?.resolve()
if(isnull(hosting_netpod) && istype(source, /obj/machinery/netpod))
+87
View File
@@ -0,0 +1,87 @@
// Quantum server
/obj/item/circuitboard/machine/quantum_server
name = "Quantum Server"
greyscale_colors = CIRCUIT_COLOR_SUPPLY
build_path = /obj/machinery/quantum_server
req_components = list(
/datum/stock_part/servo = 2,
/datum/stock_part/scanning_module = 1,
/datum/stock_part/capacitor = 1,
)
/**
* quantum server design
* are you absolutely sure??
*/
// Netpod
/obj/item/circuitboard/machine/netpod
name = "Netpod"
greyscale_colors = CIRCUIT_COLOR_SUPPLY
build_path = /obj/machinery/netpod
req_components = list(
/datum/stock_part/servo = 1,
/datum/stock_part/matter_bin = 2,
)
/datum/design/board/netpod
name = "Netpod Board"
desc = "The circuit board for a netpod."
id = "netpod"
build_path = /obj/item/circuitboard/machine/netpod
category = list(
RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_CARGO
)
departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING
// Quantum console
/obj/item/circuitboard/computer/quantum_console
name = "Quantum Console"
greyscale_colors = CIRCUIT_COLOR_SUPPLY
build_path = /obj/machinery/computer/quantum_console
/datum/design/board/quantum_console
name = "Quantum Console Board"
desc = "Allows for the construction of circuit boards used to build a Quantum Console."
id = "quantum_console"
build_path = /obj/item/circuitboard/computer/quantum_console
category = list(
RND_CATEGORY_COMPUTER + RND_SUBCATEGORY_COMPUTER_CARGO
)
departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING
// Byteforge
/obj/item/circuitboard/machine/byteforge
name = "Byteforge"
greyscale_colors = CIRCUIT_COLOR_SUPPLY
build_path = /obj/machinery/byteforge
req_components = list(
/datum/stock_part/micro_laser = 1,
)
/datum/design/board/byteforge
name = "Byteforge Board"
desc = "Allows for the construction of circuit boards used to build a Byteforge."
id = "byteforge"
build_path = /obj/item/circuitboard/machine/byteforge
category = list(
RND_CATEGORY_COMPUTER + RND_SUBCATEGORY_COMPUTER_CARGO
)
departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING
/datum/techweb_node/bitrunning
id = "bitrunning"
display_name = "Bitrunning Technology"
description = "Bluespace technology has led to the development of quantum-scale computing, which unlocks the means to materialize atomic structures while executing advanced programs."
prereq_ids = list("practical_bluespace")
design_ids = list(
"byteforge",
"quantum_console",
"netpod",
)
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
@@ -0,0 +1,55 @@
/obj/machinery/byteforge
name = "byteforge"
circuit = /obj/item/circuitboard/machine/byteforge
desc = "A machine used by the quantum server. Quantum code converges here, materializing decrypted assets from the virtual abyss."
icon = 'icons/obj/machines/bitrunning.dmi'
icon_state = "byteforge"
obj_flags = BLOCKS_CONSTRUCTION
/// Idle particles
var/mutable_appearance/byteforge_particles
/obj/machinery/byteforge/Initialize(mapload)
. = ..()
return INITIALIZE_HINT_LATELOAD
/obj/machinery/byteforge/LateInitialize()
. = ..()
byteforge_particles = mutable_appearance(initial(icon), "on_particles", ABOVE_MOB_LAYER)
setup_particles()
/obj/machinery/byteforge/update_appearance(updates)
. = ..()
setup_particles()
/// Adds the particle overlays to the byteforge
/obj/machinery/byteforge/proc/setup_particles()
cut_overlays()
if(is_operational)
add_overlay(byteforge_particles)
/// Begins spawning the crate - lights, overlays, etc
/obj/machinery/byteforge/proc/start_to_spawn(obj/structure/closet/crate/secure/bitrunning/encrypted/cache)
addtimer(CALLBACK(src, PROC_REF(spawn_crate), cache), 1 SECONDS, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_STOPPABLE)
var/mutable_appearance/lighting = mutable_appearance(initial(icon), "on_overlay")
flick_overlay_view(lighting, 1 SECONDS)
set_light(l_range = 2, l_power = 1.5, l_color = LIGHT_COLOR_BABY_BLUE, l_on = TRUE)
/// Sparks, moves the crate to the location
/obj/machinery/byteforge/proc/spawn_crate(obj/structure/closet/crate/secure/bitrunning/encrypted/cache)
if(QDELETED(cache))
return
playsound(src, 'sound/magic/blink.ogg', 50, TRUE)
var/datum/effect_system/spark_spread/quantum/sparks = new()
sparks.set_up(5, 1, loc)
sparks.start()
cache.forceMove(loc)
set_light(l_on = FALSE)
@@ -2,10 +2,10 @@
name = "host monitor"
custom_materials = list(/datum/material/iron = SMALL_MATERIAL_AMOUNT * 2)
desc = "A complex medical device that, when attached to an avatar's data stream, can detect the user of their host's health."
desc = "A complex electronic that will analyze the connection health between host and avatar."
flags_1 = CONDUCT_1
icon = 'icons/obj/device.dmi'
icon_state = "gps-b"
icon_state = "host_monitor"
inhand_icon_state = "electronic"
item_flags = NOBLUDGEON
lefthand_file = 'icons/mob/inhands/items/devices_lefthand.dmi'
@@ -44,11 +44,6 @@
qdel(src)
/// Where the crates get ported to station
/obj/effect/landmark/bitrunning/station_reward_spawn
name = "Bitrunning rewards spawn"
icon_state = "station"
/// Where the exit hololadder spawns
/obj/effect/landmark/bitrunning/hololadder_spawn
name = "Bitrunning hololadder spawn"
+16 -14
View File
@@ -189,7 +189,7 @@
return TRUE
/obj/machinery/netpod/ui_interact(mob/user, datum/tgui/ui)
if(!is_operational)
if(!is_operational || occupant)
return
ui = SStgui.try_update_ui(user, src, ui)
@@ -242,20 +242,12 @@
to_chat(player, span_notice("The machine disconnects itself and begins to drain."))
open_machine()
/**
* ### Disconnect occupant
* If this goes smoothly, should reconnect a receiving mind to the occupant's body
*
* This is the second stage of the process - if you want to disconn avatars start at the mind first
*/
/// Handles occupant post-disconnection effects like damage, sounds, etc
/obj/machinery/netpod/proc/disconnect_occupant(forced = FALSE)
var/mob/living/mob_occupant = occupant
if(isnull(occupant) || !isliving(occupant))
return
connected = FALSE
if(mob_occupant.stat == DEAD)
var/mob/living/mob_occupant = occupant
if(isnull(occupant) || !isliving(occupant) || mob_occupant.stat == DEAD)
open_machine()
return
@@ -347,8 +339,9 @@
return
server_ref = WEAKREF(server)
RegisterSignal(server, COMSIG_BITRUNNER_SERVER_UPGRADED, PROC_REF(on_server_upgraded), override = TRUE)
RegisterSignal(server, COMSIG_BITRUNNER_DOMAIN_COMPLETE, PROC_REF(on_domain_complete), override = TRUE)
RegisterSignal(server, COMSIG_BITRUNNER_SERVER_UPGRADED, PROC_REF(on_server_upgraded))
RegisterSignal(server, COMSIG_BITRUNNER_DOMAIN_COMPLETE, PROC_REF(on_domain_complete))
RegisterSignal(server, COMSIG_BITRUNNER_DOMAIN_SCRUBBED, PROC_REF(on_domain_scrubbed))
return server
@@ -395,6 +388,7 @@
account.bitrunning_points += reward_points * 100
/// User inspects the machine
/obj/machinery/netpod/proc/on_examine(datum/source, mob/examiner, list/examine_text)
SIGNAL_HANDLER
@@ -409,7 +403,15 @@
examine_text += span_notice("It is currently occupied by [occupant].")
examine_text += span_notice("It can be pried open with a crowbar, but its safety mechanisms will alert the occupant.")
/// The domain has been fully purged, so we should double check our avatar is deleted
/obj/machinery/netpod/proc/on_domain_scrubbed(datum/source)
SIGNAL_HANDLER
var/mob/living/current_avatar = avatar_ref?.resolve()
if(isnull(current_avatar))
return
QDEL_NULL(current_avatar)
/// When the server is upgraded, drops brain damage a little
/obj/machinery/netpod/proc/on_server_upgraded(datum/source, servo_rating)
+7 -5
View File
@@ -16,14 +16,16 @@
/// Generates a reward based on the given domain
/obj/machinery/quantum_server/proc/generate_loot()
if(!length(receive_turfs) && !locate_receive_turfs())
var/list/obj/machinery/byteforge/nearby_forges = get_nearby_forges()
if(isnull(nearby_forges))
say(src, "No nearby byteforges detected.")
return FALSE
points += generated_domain.reward_points
playsound(src, 'sound/machines/terminal_success.ogg', 30, 2)
var/turf/dest_turf = pick(receive_turfs)
if(isnull(dest_turf))
var/obj/machinery/byteforge/chosen_forge = pick(nearby_forges)
if(isnull(chosen_forge))
stack_trace("Failed to find a turf to spawn loot crate on.")
return FALSE
@@ -34,11 +36,11 @@
certificate.name = "certificate of domain completion"
certificate.update_appearance()
var/obj/structure/closet/crate/secure/bitrunning/decrypted/reward_crate = new(dest_turf, generated_domain, bonus)
var/obj/structure/closet/crate/secure/bitrunning/decrypted/reward_crate = new(src, generated_domain, bonus)
reward_crate.manifest = certificate
reward_crate.update_appearance()
spark_at_location(reward_crate)
chosen_forge.start_to_spawn(reward_crate)
return TRUE
/// Returns the markdown text containing domain completion information
@@ -1,3 +1,4 @@
#define ONLY_TURF 1
/// Gives all current occupants a notification that the server is going down
/obj/machinery/quantum_server/proc/begin_shutdown(mob/user)
@@ -119,7 +120,6 @@
new /obj/structure/closet/crate/secure/bitrunning/encrypted(pick(crate_turfs))
return TRUE
#define ONLY_TURF 1 // There should only ever be one turf at the bottom left of the map.
/// Loads the safehouse
/obj/machinery/quantum_server/proc/initialize_safehouse()
@@ -160,7 +160,8 @@
/// Deletes all the tile contents
/obj/machinery/quantum_server/proc/scrub_vdom()
SEND_SIGNAL(src, COMSIG_BITRUNNER_SEVER_AVATAR) // just in case
SEND_SIGNAL(src, COMSIG_BITRUNNER_SEVER_AVATAR) /// just in case someone's connected
SEND_SIGNAL(src, COMSIG_BITRUNNER_DOMAIN_SCRUBBED) // avatar cleanup just in case
if(length(generated_domain.reservations))
var/datum/turf_reservation/res = generated_domain.reservations[1]
@@ -48,8 +48,6 @@
var/servo_bonus = 0
/// The turfs we can place a hololadder on.
var/turf/exit_turfs = list()
/// The turfs on station where we generate loot.
var/turf/receive_turfs = list()
/obj/machinery/quantum_server/Initialize(mapload)
. = ..()
@@ -84,18 +82,17 @@
avatar_connection_refs.Cut()
spawned_threat_refs.Cut()
QDEL_NULL(exit_turfs)
QDEL_NULL(receive_turfs)
QDEL_NULL(generated_domain)
QDEL_NULL(generated_safehouse)
QDEL_NULL(radio)
/obj/machinery/quantum_server/update_appearance(updates)
if(isnull(generated_domain) || !is_operational)
set_light(0)
set_light(l_on = FALSE)
return ..()
set_light_color(is_ready ? LIGHT_COLOR_BABY_BLUE : LIGHT_COLOR_FIRE)
set_light(2, 1.5)
set_light(l_range = 2, l_power = 1.5, l_on = TRUE)
return ..()
+10 -10
View File
@@ -107,14 +107,14 @@
return shuffle(mutation_candidate_refs)
/// Locates any turfs with crate out landmarks
/obj/machinery/quantum_server/proc/locate_receive_turfs()
for(var/obj/effect/landmark/bitrunning/station_reward_spawn/spawner in GLOB.landmarks_list)
if(IN_GIVEN_RANGE(src, spawner, MAX_DISTANCE))
receive_turfs += get_turf(spawner)
qdel(spawner)
/// Locates any turfs with forges on them
/obj/machinery/quantum_server/proc/get_nearby_forges()
var/list/obj/machinery/byteforge/nearby_forges = list()
return length(receive_turfs) > 0
for(var/obj/machinery/byteforge/forge in oview(MAX_DISTANCE, src))
nearby_forges += forge
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()
@@ -132,10 +132,10 @@
to_chat(baddie, span_userdanger("You have been flagged for deletion! Thank you for your service."))
/// Do some magic teleport sparks
/obj/machinery/quantum_server/proc/spark_at_location(obj/crate)
playsound(crate, 'sound/magic/blink.ogg', 50, TRUE)
/obj/machinery/quantum_server/proc/spark_at_location(obj/cache)
playsound(cache, 'sound/magic/blink.ogg', 50, TRUE)
var/datum/effect_system/spark_spread/quantum/sparks = new()
sparks.set_up(5, 1, get_turf(crate))
sparks.set_up(5, 1, get_turf(cache))
sparks.start()
#undef REDACTED
+1
View File
@@ -100,6 +100,7 @@
#include "baseturfs.dm"
#include "bespoke_id.dm"
#include "binary_insert.dm"
#include "bitrunning.dm"
#include "blindness.dm"
#include "bloody_footprints.dm"
#include "breath.dm"
+15
View File
@@ -0,0 +1,15 @@
/// Ensures settings on vdoms are correct
/datum/unit_test/bitrunner_vdom_settings
/datum/unit_test/bitrunner_vdom_settings/Run()
var/obj/structure/closet/crate/secure/bitrunning/decrypted/cache = allocate(/obj/structure/closet/crate/secure/bitrunning/decrypted)
for(var/path in subtypesof(/datum/lazy_template/virtual_domain))
var/datum/lazy_template/virtual_domain/vdom = new path
TEST_ASSERT_NOTNULL(vdom.key, "[path] should have a key")
TEST_ASSERT_NOTNULL(vdom.map_name, "[path] should have a map name")
if(!length(vdom.extra_loot))
continue
TEST_ASSERT_EQUAL(cache.spawn_loot(vdom.extra_loot), TRUE, "[path] didn't spawn loot. Extra loot should be an associative list")
Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 23 KiB

+3 -1
View File
@@ -3244,6 +3244,7 @@
#include "code\modules\bitrunning\abilities.dm"
#include "code\modules\bitrunning\alerts.dm"
#include "code\modules\bitrunning\areas.dm"
#include "code\modules\bitrunning\designs.dm"
#include "code\modules\bitrunning\event.dm"
#include "code\modules\bitrunning\job.dm"
#include "code\modules\bitrunning\turfs.dm"
@@ -3252,7 +3253,7 @@
#include "code\modules\bitrunning\components\avatar_connection.dm"
#include "code\modules\bitrunning\components\bitrunning_points.dm"
#include "code\modules\bitrunning\components\netpod_healing.dm"
#include "code\modules\bitrunning\objects\bit_vendor.dm"
#include "code\modules\bitrunning\objects\byteforge.dm"
#include "code\modules\bitrunning\objects\clothing.dm"
#include "code\modules\bitrunning\objects\disks.dm"
#include "code\modules\bitrunning\objects\hololadder.dm"
@@ -3261,6 +3262,7 @@
#include "code\modules\bitrunning\objects\loot_crate.dm"
#include "code\modules\bitrunning\objects\netpod.dm"
#include "code\modules\bitrunning\objects\quantum_console.dm"
#include "code\modules\bitrunning\objects\vendor.dm"
#include "code\modules\bitrunning\orders\disks.dm"
#include "code\modules\bitrunning\orders\flair.dm"
#include "code\modules\bitrunning\orders\tech.dm"