diff --git a/code/game/objects/items/circuitboards/machines/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machines/machine_circuitboards.dm index cda10cabdd3..0ecb7cc5c14 100644 --- a/code/game/objects/items/circuitboards/machines/machine_circuitboards.dm +++ b/code/game/objects/items/circuitboards/machines/machine_circuitboards.dm @@ -1888,3 +1888,35 @@ /obj/item/circuitboard/machine/engine/propulsion name = "Shuttle Engine Propulsion" build_path = /obj/machinery/power/shuttle_engine/propulsion + +/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, + ) + +/obj/item/circuitboard/computer/quantum_console + name = "Quantum Console" + greyscale_colors = CIRCUIT_COLOR_SUPPLY + build_path = /obj/machinery/computer/quantum_console + +/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, + ) diff --git a/code/modules/bitrunning/designs.dm b/code/modules/bitrunning/designs.dm deleted file mode 100644 index 96ae65d41e9..00000000000 --- a/code/modules/bitrunning/designs.dm +++ /dev/null @@ -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 diff --git a/code/modules/bitrunning/netpod/_netpod.dm b/code/modules/bitrunning/netpod/_netpod.dm index 2208c56a741..e372f004255 100644 --- a/code/modules/bitrunning/netpod/_netpod.dm +++ b/code/modules/bitrunning/netpod/_netpod.dm @@ -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 diff --git a/code/modules/bitrunning/objects/byteforge.dm b/code/modules/bitrunning/objects/byteforge.dm index cc18d2011a2..29ca48d0af1 100644 --- a/code/modules/bitrunning/objects/byteforge.dm +++ b/code/modules/bitrunning/objects/byteforge.dm @@ -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) diff --git a/code/modules/bitrunning/objects/quantum_console.dm b/code/modules/bitrunning/objects/quantum_console.dm index 71b952c46e1..d79ae60c3a7 100644 --- a/code/modules/bitrunning/objects/quantum_console.dm +++ b/code/modules/bitrunning/objects/quantum_console.dm @@ -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) . = ..() diff --git a/code/modules/bitrunning/server/_parent.dm b/code/modules/bitrunning/server/_parent.dm index 09ea24ae2da..71e02f45a1c 100644 --- a/code/modules/bitrunning/server/_parent.dm +++ b/code/modules/bitrunning/server/_parent.dm @@ -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 diff --git a/code/modules/research/designs/comp_board_designs.dm b/code/modules/research/designs/comp_board_designs.dm index 50ed6e43f61..078e3aabcc0 100644 --- a/code/modules/research/designs/comp_board_designs.dm +++ b/code/modules/research/designs/comp_board_designs.dm @@ -411,3 +411,13 @@ desc = "Allows for the construction of circuit boards used to build a console that enables the targetting of custom flight locations" id = "shuttle_docker" build_path = /obj/item/circuitboard/computer/shuttle/docker + +/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 diff --git a/code/modules/research/designs/machine_designs.dm b/code/modules/research/designs/machine_designs.dm index fb7744459f4..086b4ca947b 100644 --- a/code/modules/research/designs/machine_designs.dm +++ b/code/modules/research/designs/machine_designs.dm @@ -1395,3 +1395,23 @@ RND_CATEGORY_MACHINE + RND_SUBCATEGORY_MACHINE_ATMOS ) departmental_flags = DEPARTMENT_BITFLAG_SCIENCE | DEPARTMENT_BITFLAG_ENGINEERING + +/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 + +/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 diff --git a/icons/obj/machines/bitrunning.dmi b/icons/obj/machines/bitrunning.dmi index d61e910d195..626ab4ff4f3 100644 Binary files a/icons/obj/machines/bitrunning.dmi and b/icons/obj/machines/bitrunning.dmi differ diff --git a/tgstation.dme b/tgstation.dme index c94dd622749..ead07988859 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3690,7 +3690,6 @@ #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\outfits.dm"