mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 11:05:16 +01:00
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  Byteforge  Spawning a crate  </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:
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user