Files
Alexis 21b4095dfd [MDB IGNORE] [IDB IGNORE] Upstream Sync - 04/17/2026 (#5453)
Upstream 04/17/2026

fixes https://github.com/Bubberstation/Bubberstation/issues/5549

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com>
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com>
Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com>
Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com>
Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com>
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com>
Co-authored-by: loganuk <fakeemail123@aol.com>
Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com>
Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com>
Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com>
Co-authored-by: Lucy <lucy@absolucy.moe>
Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com>
Co-authored-by: Isratosh <Isratosh@hotmail.com>
Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com>
Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Co-authored-by: Alexander V. <volas@ya.ru>
Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com>
Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com>
Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com>
Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com>
Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com>
Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com>
Co-authored-by: Josh <josh.adam.powell@gmail.com>
Co-authored-by: Josh Powell <josh.powell@softwire.com>
Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com>
Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com>
Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com>
Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
2026-05-16 00:56:00 +02:00

96 lines
3.0 KiB
Plaintext

/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"
base_icon_state = "byteforge"
obj_flags = BLOCKS_CONSTRUCTION | CAN_BE_HIT
/// Idle particles
var/mutable_appearance/byteforge_particles
/obj/machinery/byteforge/Initialize(mapload)
. = ..()
register_context()
/obj/machinery/byteforge/post_machine_initialize()
. = ..()
setup_particles()
/obj/machinery/byteforge/add_context(atom/source, list/context, obj/item/held_item, mob/user)
. = NONE
if(isnull(held_item))
return
if(held_item.tool_behaviour == TOOL_SCREWDRIVER)
context[SCREENTIP_CONTEXT_LMB] = "[panel_open ? "Close" : "Open"] Panel"
return CONTEXTUAL_SCREENTIP_SET
else if(held_item.tool_behaviour == TOOL_CROWBAR && panel_open)
context[SCREENTIP_CONTEXT_LMB] = "Deconstruct"
return CONTEXTUAL_SCREENTIP_SET
/obj/machinery/byteforge/examine(mob/user)
. = ..()
. += span_notice("Must be within 4 tiles of the quantum server.")
. += span_notice("Its maintenance panel can be [EXAMINE_HINT("screwed")] [panel_open ? "close" : "open"].")
if(panel_open)
. += span_notice("It can be [EXAMINE_HINT("pried")] apart.")
/obj/machinery/byteforge/update_appearance(updates)
. = ..()
setup_particles()
/obj/machinery/byteforge/screwdriver_act(mob/living/user, obj/item/screwdriver)
return default_deconstruction_screwdriver(user, screwdriver)
/obj/machinery/byteforge/crowbar_act(mob/living/user, obj/item/crowbar)
return default_deconstruction_crowbar(user, crowbar)
/obj/machinery/byteforge/update_icon_state()
. = ..()
icon_state = panel_open ? "[base_icon_state]_panel" : base_icon_state
/// Does some sparks after it's done
/obj/machinery/byteforge/proc/flash(atom/movable/thing)
playsound(src, 'sound/effects/magic/blink.ogg', 50, TRUE)
do_sparks(5, TRUE, loc, spark_type = /datum/effect_system/basic/spark_spread/quantum)
set_light(l_on = FALSE)
/// Forge begins to process
/obj/machinery/byteforge/proc/flicker(angry = FALSE)
var/mutable_appearance/lighting = mutable_appearance(initial(icon), "on_overlay[angry ? "_angry" : ""]")
flick_overlay_view(lighting, 1 SECONDS)
set_light(l_range = 2, l_power = 1.5, l_color = angry ? LIGHT_COLOR_BUBBLEGUM : LIGHT_COLOR_BABY_BLUE, l_on = TRUE)
/// Adds the particle overlays to the byteforge
/obj/machinery/byteforge/proc/setup_particles(angry = FALSE)
cut_overlay(byteforge_particles)
byteforge_particles = mutable_appearance(initial(icon), "on_particles[angry ? "_angry" : ""]", ABOVE_MOB_LAYER)
if(is_operational)
add_overlay(byteforge_particles)
/// Forge is done processing
/obj/machinery/byteforge/proc/spawn_cache(obj/cache)
if(QDELETED(cache))
return
flash()
cache.forceMove(loc)
/// Timed flash
/obj/machinery/byteforge/proc/start_to_spawn(obj/cache)
flicker()
addtimer(CALLBACK(src, PROC_REF(spawn_cache), cache), 1 SECONDS)