From c276f166c0948290aa70093063b0b202be7ea038 Mon Sep 17 00:00:00 2001 From: Bop Date: Sun, 22 Dec 2024 01:50:28 +0700 Subject: [PATCH 1/6] e --- code/__DEFINES/research.dm | 4 ++-- code/controllers/subsystem/research.dm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/__DEFINES/research.dm b/code/__DEFINES/research.dm index fcb397cc99c7..2e99e8835cbd 100644 --- a/code/__DEFINES/research.dm +++ b/code/__DEFINES/research.dm @@ -91,5 +91,5 @@ ///This determines how many general points that the ruin_tech techweb gets, since they don't utilize servers #define RUIN_GENERATION_PER_TICK 70 -///This determines how many nanites points that the ruin_tech techweb gets, since they lack research tools. -#define NANITES_RESEARCH_RUIN_PER_TICK 10 +///This determines how many nanites/AI points that the ruin_tech techweb gets, since they lack research tools. +#define NANITES_AI_RESEARCH_RUIN_PER_TICK 10 diff --git a/code/controllers/subsystem/research.dm b/code/controllers/subsystem/research.dm index 21f998f831de..c17b4794d232 100644 --- a/code/controllers/subsystem/research.dm +++ b/code/controllers/subsystem/research.dm @@ -91,7 +91,7 @@ SUBSYSTEM_DEF(research) science_tech.remove_stored_point_type(i, boost_amt) science_tech.add_point_list(bitcoins) //add RUIN_GENERATION_PER_TICK even without any servers, for things like freeminers - ruin_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = RUIN_GENERATION_PER_TICK, TECHWEB_POINT_TYPE_NANITES = NANITES_RESEARCH_RUIN_PER_TICK)) + ruin_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = RUIN_GENERATION_PER_TICK, TECHWEB_POINT_TYPE_NANITES = NANITES_AI_RESEARCH_RUIN_PER_TICK, TECHWEB_POINT_TYPE_AI = NANITES_AI_RESEARCH_RUIN_PER_TICK)) last_income = world.time /datum/controller/subsystem/research/proc/calculate_server_coefficient() //Diminishing returns. From 232ba8d3d39d93544966b8b9fd0e8810129caef3 Mon Sep 17 00:00:00 2001 From: Bop Date: Sun, 22 Dec 2024 03:11:02 +0700 Subject: [PATCH 2/6] e --- code/game/mecha/mech_fabricator.dm | 1 + .../circuitboards/machine_circuitboards.dm | 15 ++++++++++++ .../ai/decentralized/systech/rack_creator.dm | 24 ++++++++++++------- 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 75d11b4379e9..e889eff57c05 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -783,6 +783,7 @@ link_on_init = FALSE authorization_override = TRUE hacked = TRUE + circuit = /obj/item/circuitboard/machine/mechfab/ruin /obj/machinery/mecha_part_fabricator/ruin/Initialize(mapload) . = ..() diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm index 7b014b3b0677..5c2de0b37a40 100644 --- a/code/game/objects/items/circuitboards/machine_circuitboards.dm +++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm @@ -984,6 +984,10 @@ /obj/item/stock_parts/micro_laser = 1, /obj/item/stack/sheet/glass = 1) +/obj/item/circuitboard/machine/mechfab/ruin + desc = "This board is unofficial, and can be linked experimental R&D console, do not lose this because it's very expensive to accquire." + build_path = /obj/machinery/mecha_part_fabricator/ruin + /obj/item/circuitboard/machine/monkey_recycler name = "Monkey Recycler (Machine Board)" greyscale_colors = CIRCUIT_COLOR_SCIENCE @@ -1128,6 +1132,17 @@ req_components = list( /obj/item/stock_parts/manipulator = 2, /obj/item/reagent_containers/glass/beaker = 2) + var/unlocked = FALSE + +/obj/item/circuitboard/machine/rack_creator/multitool_act(mob/living/user, obj/item/I) + . = ..() + user.visible_message(span_notice("[user] fiddles with [src]."), span_notice( "You fiddle with [src].")) + if(I.use_tool(src, user, 2 SECONDS, volume = 75)) + var/datum/effect_system/spark_spread/p = new /datum/effect_system/spark_spread + p.set_up(6, 1, user) + p.start() + unlocked = !unlocked + to_chat(user, span_notice("You changed [src] to [unlocked? "unofficial type" : "official type"].")) /obj/item/circuitboard/machine/plort name = "Plort Redemption Machine (Machine Board)" diff --git a/code/modules/mob/living/silicon/ai/decentralized/systech/rack_creator.dm b/code/modules/mob/living/silicon/ai/decentralized/systech/rack_creator.dm index fd7aa24d5496..716ac5b09bbd 100644 --- a/code/modules/mob/living/silicon/ai/decentralized/systech/rack_creator.dm +++ b/code/modules/mob/living/silicon/ai/decentralized/systech/rack_creator.dm @@ -18,9 +18,15 @@ var/datum/component/remote_materials/rmat var/efficiency_coeff = 1 - + var/datum/techweb/stored_research /obj/machinery/rack_creator/Initialize(mapload) + var/obj/item/circuitboard/machine/rack_creator/rack_creator = circuit + if(rack_creator.unlocked) + stored_research = SSresearch.ruin_tech + desc += " This one is unofficial, you shouldn't let the NT officicals see this." + else + stored_research = SSresearch.science_tech rmat = AddComponent(/datum/component/remote_materials, "rackcreator", mapload) rmat.set_local_size(200000) RefreshParts() @@ -104,7 +110,7 @@ materials_string += "[M.name]: [D.materials[mat] / efficiency_coeff]" else materials_string += ", [M.name]: [D.materials[mat] / efficiency_coeff]" - data["possible_ram"] += list(list("name" = D.name, "capacity" = D.capacity, "cost" = materials_string,"id" = D.id, "unlocked" = SSresearch.science_tech.isDesignResearchedID(D.id) ? TRUE : FALSE)) + data["possible_ram"] += list(list("name" = D.name, "capacity" = D.capacity, "cost" = materials_string,"id" = D.id, "unlocked" = stored_research.isDesignResearchedID(D.id) ? TRUE : FALSE)) data["unlocked_ram"] = 1 data["unlocked_cpu"] = 1 @@ -192,23 +198,23 @@ if(1) . = TRUE if(2) - . = SSresearch.science_tech.isNodeResearchedID("ai_cpu_2") + . = stored_research.isNodeResearchedID("ai_cpu_2") if(3) - . = SSresearch.science_tech.isNodeResearchedID("ai_cpu_3") + . = stored_research.isNodeResearchedID("ai_cpu_3") if(4) - . = SSresearch.science_tech.isNodeResearchedID("ai_cpu_4") + . = stored_research.isNodeResearchedID("ai_cpu_4") /obj/machinery/rack_creator/proc/slotUnlockedRAM(slot_number) switch(slot_number) if(1) . = TRUE if(2) - . = SSresearch.science_tech.isNodeResearchedID("ai_ram_2") + . = stored_research.isNodeResearchedID("ai_ram_2") if(3) - . = SSresearch.science_tech.isNodeResearchedID("ai_ram_3") + . = stored_research.isNodeResearchedID("ai_ram_3") if(4) - . = SSresearch.science_tech.isNodeResearchedID("ai_ram_4") + . = stored_research.isNodeResearchedID("ai_ram_4") /obj/machinery/rack_creator/ui_act(action, params) @@ -252,7 +258,7 @@ var/ram_type = params["ram_type"] if(!ram_type) return - var/datum/design/ram/D = SSresearch.science_tech.isDesignResearchedID(ram_type) + var/datum/design/ram/D = stored_research.isDesignResearchedID(ram_type) if(!D) return if(slotUnlockedRAM(ram_expansions.len + 1)) From 1a36ef646ce3282ebde568c8e39afd8036c33cbf Mon Sep 17 00:00:00 2001 From: Bop Date: Sun, 22 Dec 2024 03:28:45 +0700 Subject: [PATCH 3/6] guh --- .../mob/living/silicon/ai/decentralized/systech/rack_creator.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/silicon/ai/decentralized/systech/rack_creator.dm b/code/modules/mob/living/silicon/ai/decentralized/systech/rack_creator.dm index 716ac5b09bbd..fdca37b9412c 100644 --- a/code/modules/mob/living/silicon/ai/decentralized/systech/rack_creator.dm +++ b/code/modules/mob/living/silicon/ai/decentralized/systech/rack_creator.dm @@ -21,6 +21,7 @@ var/datum/techweb/stored_research /obj/machinery/rack_creator/Initialize(mapload) + . = ..() var/obj/item/circuitboard/machine/rack_creator/rack_creator = circuit if(rack_creator.unlocked) stored_research = SSresearch.ruin_tech @@ -30,7 +31,6 @@ rmat = AddComponent(/datum/component/remote_materials, "rackcreator", mapload) rmat.set_local_size(200000) RefreshParts() - return ..() /obj/machinery/rack_creator/RefreshParts() From 7ce1dddc57fcecda454cede63f899188a2f387e2 Mon Sep 17 00:00:00 2001 From: Bop Date: Sun, 22 Dec 2024 03:29:39 +0700 Subject: [PATCH 4/6] bye --- code/game/objects/items/circuitboards/machine_circuitboards.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm index 5c2de0b37a40..1752807ad582 100644 --- a/code/game/objects/items/circuitboards/machine_circuitboards.dm +++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm @@ -1131,7 +1131,6 @@ build_path = /obj/machinery/rack_creator req_components = list( /obj/item/stock_parts/manipulator = 2, - /obj/item/reagent_containers/glass/beaker = 2) var/unlocked = FALSE /obj/item/circuitboard/machine/rack_creator/multitool_act(mob/living/user, obj/item/I) From cd8f0bc2708cad62a8c8c4a4a4362390a3cdeacc Mon Sep 17 00:00:00 2001 From: Bop Date: Sun, 22 Dec 2024 03:30:06 +0700 Subject: [PATCH 5/6] fuck --- code/game/objects/items/circuitboards/machine_circuitboards.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm index 1752807ad582..95d8a882647a 100644 --- a/code/game/objects/items/circuitboards/machine_circuitboards.dm +++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm @@ -1129,8 +1129,7 @@ name = "Rack Creator (Machine Board)" greyscale_colors = CIRCUIT_COLOR_SCIENCE build_path = /obj/machinery/rack_creator - req_components = list( - /obj/item/stock_parts/manipulator = 2, + req_components = list(/obj/item/stock_parts/manipulator = 2) var/unlocked = FALSE /obj/item/circuitboard/machine/rack_creator/multitool_act(mob/living/user, obj/item/I) From cded4b0002d1605e3d2c81a4d7b392c568f73c8a Mon Sep 17 00:00:00 2001 From: Bop Date: Sun, 22 Dec 2024 04:35:34 +0700 Subject: [PATCH 6/6] fix --- .../ai/decentralized/systech/rack_creator.dm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/silicon/ai/decentralized/systech/rack_creator.dm b/code/modules/mob/living/silicon/ai/decentralized/systech/rack_creator.dm index fdca37b9412c..8f19dd8c3985 100644 --- a/code/modules/mob/living/silicon/ai/decentralized/systech/rack_creator.dm +++ b/code/modules/mob/living/silicon/ai/decentralized/systech/rack_creator.dm @@ -21,19 +21,18 @@ var/datum/techweb/stored_research /obj/machinery/rack_creator/Initialize(mapload) - . = ..() + rmat = AddComponent(/datum/component/remote_materials, "rackcreator", mapload) + rmat.set_local_size(200000) + RefreshParts() + return ..() + +/obj/machinery/rack_creator/RefreshParts() var/obj/item/circuitboard/machine/rack_creator/rack_creator = circuit if(rack_creator.unlocked) stored_research = SSresearch.ruin_tech desc += " This one is unofficial, you shouldn't let the NT officicals see this." else stored_research = SSresearch.science_tech - rmat = AddComponent(/datum/component/remote_materials, "rackcreator", mapload) - rmat.set_local_size(200000) - RefreshParts() - - -/obj/machinery/rack_creator/RefreshParts() calculate_efficiency() /obj/machinery/rack_creator/proc/calculate_efficiency()