mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
Adds some bit running construction qol (#92217)
## About The Pull Request - Closes #92210 1) Bit Forge can be deconstructed with a screwdriver & crowbar like a normal machine 2) Adds examines & screentips for netpod, bitforge(icon for panel open state added) & quantum server on how to deconstruct them. New icon state for when bitforge has its panel open is shown below <img width="210" height="103" alt="Screenshot (497)" src="https://github.com/user-attachments/assets/bb44c78d-1f0e-468f-9a79-ebc5800edd09" /> 3) Moved bitrunning machine designs into files that exist to hold that type of code ## Changelog 🆑 code: moved designs & circuitboards for bitrunning into their correct files qol: adds examines & screentips for bitrunning netpod, bitforge & server on how to deconstruct them fix: bitforge can be deconstructed with a screwdriver & crowbar /🆑
This commit is contained in:
@@ -1,74 +0,0 @@
|
||||
// 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
|
||||
@@ -48,9 +48,37 @@
|
||||
QDEL_LIST(cached_outfits)
|
||||
|
||||
|
||||
/obj/machinery/netpod/add_context(atom/source, list/context, obj/item/held_item, mob/user)
|
||||
. = ..()
|
||||
|
||||
if(isnull(held_item))
|
||||
context[SCREENTIP_CONTEXT_LMB] = "Select Outfit"
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
if(held_item.tool_behaviour == TOOL_SCREWDRIVER && !occupant && !state_open)
|
||||
context[SCREENTIP_CONTEXT_LMB] = "[panel_open ? "Close" : "Open"] Panel"
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
if(held_item.tool_behaviour == TOOL_CROWBAR)
|
||||
if(isnull(occupant))
|
||||
if(panel_open)
|
||||
context[SCREENTIP_CONTEXT_LMB] = "Deconstruct"
|
||||
else
|
||||
context[SCREENTIP_CONTEXT_LMB] = "[state_open ? "Close" : "Open"] Cover"
|
||||
else
|
||||
context[SCREENTIP_CONTEXT_LMB] = "Break out"
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/obj/machinery/netpod/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
. += span_notice("Its maintainance panel can be [EXAMINE_HINT("screwed")] [panel_open ? "close" : "open"].")
|
||||
if(isnull(occupant))
|
||||
if(panel_open)
|
||||
. += span_notice("It can be [EXAMINE_HINT("pried")] apart.")
|
||||
else
|
||||
. += span_notice("Its hatch can be [EXAMINE_HINT("pried")] [state_open ? "closed" : "open"]")
|
||||
|
||||
if(isnull(server_ref?.resolve()))
|
||||
. += span_infoplain("It's not connected to anything.")
|
||||
. += span_infoplain("Netpods must be built within 4 tiles of a server.")
|
||||
@@ -74,18 +102,6 @@
|
||||
. += span_notice("It can be pried open with a crowbar, but its safety mechanisms will alert the occupant.")
|
||||
|
||||
|
||||
/obj/machinery/netpod/add_context(atom/source, list/context, obj/item/held_item, mob/user)
|
||||
. = ..()
|
||||
|
||||
if(isnull(held_item))
|
||||
context[SCREENTIP_CONTEXT_LMB] = "Select Outfit"
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
if(istype(held_item, /obj/item/crowbar) && occupant)
|
||||
context[SCREENTIP_CONTEXT_LMB] = "Pry Open"
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
|
||||
/obj/machinery/netpod/update_icon_state()
|
||||
if(!is_operational)
|
||||
icon_state = base_icon_state
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
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
|
||||
@@ -12,18 +13,49 @@
|
||||
/obj/machinery/byteforge/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
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("Make sure this is 4 tiles from the quantum server")
|
||||
|
||||
. += span_notice("Its maintainance 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)
|
||||
. = ITEM_INTERACT_FAILURE
|
||||
if(default_deconstruction_screwdriver(user, "[base_icon_state]_panel", base_icon_state, screwdriver))
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/obj/machinery/byteforge/crowbar_act(mob/living/user, obj/item/crowbar)
|
||||
. = ITEM_INTERACT_FAILURE
|
||||
if(default_deconstruction_crowbar(crowbar))
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/// Does some sparks after it's done
|
||||
/obj/machinery/byteforge/proc/flash(atom/movable/thing)
|
||||
playsound(src, 'sound/effects/magic/blink.ogg', 50, TRUE)
|
||||
|
||||
@@ -16,6 +16,11 @@
|
||||
. = ..()
|
||||
find_server()
|
||||
|
||||
/obj/machinery/computer/quantum_console/examine(mob/user)
|
||||
. = ..()
|
||||
if(!server_ref)
|
||||
. += span_warning("Please install an quantum server in any tile next to this console.")
|
||||
|
||||
/obj/machinery/computer/quantum_console/ui_interact(mob/user, datum/tgui/ui)
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -51,6 +51,9 @@
|
||||
/// Cooldown for how often you're allowed to harass deadchat for PVP domains
|
||||
COOLDOWN_DECLARE(polling_cooldown)
|
||||
|
||||
/obj/machinery/quantum_server/Initialize(mapload)
|
||||
. = ..()
|
||||
register_context()
|
||||
|
||||
/obj/machinery/quantum_server/post_machine_initialize()
|
||||
. = ..()
|
||||
@@ -58,7 +61,6 @@
|
||||
RegisterSignals(src, list(COMSIG_MACHINERY_BROKEN, COMSIG_MACHINERY_POWER_LOST), PROC_REF(on_broken))
|
||||
RegisterSignal(src, COMSIG_QDELETING, PROC_REF(on_delete))
|
||||
|
||||
|
||||
/obj/machinery/quantum_server/Destroy(force)
|
||||
mutation_candidate_refs.Cut()
|
||||
avatar_connection_refs.Cut()
|
||||
@@ -67,11 +69,27 @@
|
||||
QDEL_NULL(generated_domain)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/quantum_server/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/quantum_server/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
. += span_infoplain("Can be resource intensive to run. Ensure adequate power supply.")
|
||||
|
||||
. += span_notice("Its maintainance panel can be [EXAMINE_HINT("screwed")] [panel_open ? "close" : "open"].")
|
||||
if(panel_open)
|
||||
. += span_notice("It can be [EXAMINE_HINT("pried")] apart.")
|
||||
|
||||
var/upgraded = FALSE
|
||||
if(capacitor_coefficient < 1)
|
||||
. += span_infoplain("- Its coolant capacity reduces cooldown time by [(1 - capacitor_coefficient) * 100]%.")
|
||||
@@ -138,29 +156,23 @@
|
||||
|
||||
|
||||
/obj/machinery/quantum_server/crowbar_act(mob/living/user, obj/item/crowbar)
|
||||
. = ..()
|
||||
|
||||
. = NONE
|
||||
if(!is_ready)
|
||||
balloon_alert(user, "it's scalding hot!")
|
||||
return TRUE
|
||||
return ITEM_INTERACT_FAILURE
|
||||
if(length(avatar_connection_refs))
|
||||
balloon_alert(user, "all clients must disconnect!")
|
||||
return TRUE
|
||||
return ITEM_INTERACT_FAILURE
|
||||
if(default_deconstruction_crowbar(crowbar))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/obj/machinery/quantum_server/screwdriver_act(mob/living/user, obj/item/screwdriver)
|
||||
. = ..()
|
||||
|
||||
. = NONE
|
||||
if(!is_ready)
|
||||
balloon_alert(user, "it's scalding hot!")
|
||||
return TRUE
|
||||
if(default_deconstruction_screwdriver(user, "[base_icon_state]_panel", icon_state, screwdriver))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
return ITEM_INTERACT_FAILURE
|
||||
if(default_deconstruction_screwdriver(user, "[base_icon_state]_panel", base_icon_state, screwdriver))
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/obj/machinery/quantum_server/RefreshParts()
|
||||
var/capacitor_rating = 1.15
|
||||
|
||||
Reference in New Issue
Block a user