From 9faf2a16ecb16b936de4a0050d7806a1918481bb Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 29 Mar 2023 23:19:32 +0200 Subject: [PATCH] [MIRROR] Removes bepis Techweb and reworks tech disks in general [MDB IGNORE] (#20102) * Removes bepis Techweb and reworks tech disks in general * e Co-Authored-By: san7890 * e * it will be done --------- Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com> Co-authored-by: san7890 Co-authored-by: Paxilmaniac --- .../SpaceRuins/skyrat/ghostship.dmm | 2 +- .../SpaceRuins/skyrat/scrapheap.dmm | 12 +-- .../SpaceRuins/skyrat/shuttle8532.dmm | 4 +- .../SpaceRuins/skyrat/syndibase.dmm | 7 +- .../SpaceRuins/skyrat/waypointstation.dmm | 4 +- .../tramstation/tramstation_arrivals.dmm | 73 +++++++-------- .../objects/effects/spawners/random/exotic.dm | 2 +- code/modules/cargo/bounties/science.dm | 4 +- code/modules/jobs/job_types/scientist.dm | 2 +- .../mapfluff/ruins/lavaland_ruin_code.dm | 14 +-- .../ruins/spaceruin_code/clericsden.dm | 7 +- code/modules/mining/lavaland/tendril_loot.dm | 2 +- code/modules/research/bepis.dm | 2 +- code/modules/research/designs.dm | 60 +++++++++--- .../research/designs/electronics_designs.dm | 24 ----- .../research/designs/limbgrower_designs.dm | 1 - code/modules/research/rdconsole.dm | 68 ++------------ code/modules/research/research_disk.dm | 20 ---- code/modules/research/techweb/_techweb.dm | 13 +-- code/modules/research/techweb/all_nodes.dm | 1 - .../modules/research/techweb/techweb_types.dm | 19 ---- .../research/xenoarch/xenoarch_reward.dm | 2 - tgui/packages/tgui/interfaces/Techweb.js | 92 +------------------ .../Scripts/74147_tech_disk_repath.txt | 7 ++ 24 files changed, 134 insertions(+), 308 deletions(-) create mode 100644 tools/UpdatePaths/Scripts/74147_tech_disk_repath.txt diff --git a/_maps/RandomRuins/SpaceRuins/skyrat/ghostship.dmm b/_maps/RandomRuins/SpaceRuins/skyrat/ghostship.dmm index 547a62c5c64..74c41d6259a 100644 --- a/_maps/RandomRuins/SpaceRuins/skyrat/ghostship.dmm +++ b/_maps/RandomRuins/SpaceRuins/skyrat/ghostship.dmm @@ -243,7 +243,7 @@ }, /obj/item/stack/cable_coil, /obj/effect/decal/cleanable/dirt/dust, -/obj/item/disk/tech_disk/spaceloot, +/obj/item/disk/design_disk/bepis, /turf/open/floor/plating, /area/ruin/unpowered) "mW" = ( diff --git a/_maps/RandomRuins/SpaceRuins/skyrat/scrapheap.dmm b/_maps/RandomRuins/SpaceRuins/skyrat/scrapheap.dmm index 6e542bf6eae..fe023d48032 100644 --- a/_maps/RandomRuins/SpaceRuins/skyrat/scrapheap.dmm +++ b/_maps/RandomRuins/SpaceRuins/skyrat/scrapheap.dmm @@ -227,9 +227,9 @@ "gd" = ( /obj/structure/closet/crate/secure/science, /obj/effect/turf_decal/bot, -/obj/item/disk/tech_disk/spaceloot, -/obj/item/disk/tech_disk/spaceloot, -/obj/item/disk/tech_disk/spaceloot, +/obj/item/disk/design_disk/bepis, +/obj/item/disk/design_disk/bepis, +/obj/item/disk/design_disk/bepis, /obj/effect/decal/cleanable/dirt/dust, /obj/item/raw_anomaly_core/random, /obj/item/raw_anomaly_core/random, @@ -349,7 +349,7 @@ /area/ruin/space/has_grav/powered/skyrat/scrapheap) "iT" = ( /obj/structure/table, -/obj/item/disk/tech_disk/spaceloot, +/obj/item/disk/design_disk/bepis, /obj/effect/spawner/random/medical/surgery_tool_advanced, /obj/effect/spawner/random/medical/surgery_tool_advanced, /turf/open/floor/iron/white/smooth_half, @@ -914,8 +914,8 @@ /obj/machinery/light/red/directional/west, /obj/structure/table/reinforced, /obj/item/camera_bug, -/obj/item/disk/tech_disk/spaceloot, -/obj/item/disk/tech_disk/spaceloot, +/obj/item/disk/design_disk/bepis, +/obj/item/disk/design_disk/bepis, /obj/item/stack/spacecash/c500, /turf/open/floor/iron/dark/side{ dir = 9 diff --git a/_maps/RandomRuins/SpaceRuins/skyrat/shuttle8532.dmm b/_maps/RandomRuins/SpaceRuins/skyrat/shuttle8532.dmm index 248be05da61..ee332c42500 100644 --- a/_maps/RandomRuins/SpaceRuins/skyrat/shuttle8532.dmm +++ b/_maps/RandomRuins/SpaceRuins/skyrat/shuttle8532.dmm @@ -1158,7 +1158,7 @@ dir = 8 }, /obj/structure/table/reinforced, -/obj/item/disk/tech_disk/spaceloot, +/obj/item/disk/design_disk/bepis, /obj/item/stack/spacecash/c1000, /obj/item/raw_anomaly_core/random, /turf/open/floor/iron/airless, @@ -1169,7 +1169,7 @@ /area/ruin/space/has_grav/shuttle8532engineering) "zg" = ( /obj/structure/table/reinforced, -/obj/item/disk/tech_disk/spaceloot, +/obj/item/disk/design_disk/bepis, /turf/open/floor/plating/airless, /area/ruin/space/has_grav/shuttle8532researchbay) "zi" = ( diff --git a/_maps/RandomRuins/SpaceRuins/skyrat/syndibase.dmm b/_maps/RandomRuins/SpaceRuins/skyrat/syndibase.dmm index 8efe4a47495..8eedf7574fa 100644 --- a/_maps/RandomRuins/SpaceRuins/skyrat/syndibase.dmm +++ b/_maps/RandomRuins/SpaceRuins/skyrat/syndibase.dmm @@ -386,11 +386,8 @@ /area/ruin/space/has_grav/powered) "MG" = ( /obj/structure/table, -/obj/item/disk/tech_disk/spaceloot{ - pixel_x = 5; - pixel_y = 5 - }, -/obj/item/disk/tech_disk/spaceloot, +/obj/item/disk/design_disk/bepis, +/obj/item/disk/design_disk/bepis, /turf/open/floor/iron/dark, /area/ruin/space/has_grav/powered) "MZ" = ( diff --git a/_maps/RandomRuins/SpaceRuins/skyrat/waypointstation.dmm b/_maps/RandomRuins/SpaceRuins/skyrat/waypointstation.dmm index 7e06a54c3e8..627ff863763 100644 --- a/_maps/RandomRuins/SpaceRuins/skyrat/waypointstation.dmm +++ b/_maps/RandomRuins/SpaceRuins/skyrat/waypointstation.dmm @@ -251,8 +251,8 @@ /area/ruin/space/has_grav/waypoint) "oa" = ( /obj/structure/table, -/obj/item/disk/tech_disk/spaceloot, -/obj/item/disk/tech_disk/spaceloot, +/obj/item/disk/design_disk/bepis, +/obj/item/disk/design_disk/bepis, /turf/open/floor/iron/airless, /area/ruin/space/has_grav/waypoint) "og" = ( diff --git a/_maps/skyrat/automapper/templates/tramstation/tramstation_arrivals.dmm b/_maps/skyrat/automapper/templates/tramstation/tramstation_arrivals.dmm index 05a3b64a7d6..53a18664774 100644 --- a/_maps/skyrat/automapper/templates/tramstation/tramstation_arrivals.dmm +++ b/_maps/skyrat/automapper/templates/tramstation/tramstation_arrivals.dmm @@ -27,15 +27,15 @@ /turf/open/floor/iron, /area/station/hallway/secondary/entry) "cS" = ( -/obj/effect/turf_decal/tile{ - dir = 8 - }, /obj/effect/turf_decal/tile/blue, /obj/machinery/light/directional/south, /obj/machinery/camera/directional/south{ c_tag = "Arrivals - Central Docking Wing" }, /obj/effect/landmark/event_spawn, +/obj/effect/turf_decal/tile/neutral{ + dir = 8 + }, /turf/open/floor/iron, /area/station/hallway/secondary/entry) "dl" = ( @@ -86,21 +86,20 @@ /turf/open/floor/iron, /area/station/hallway/secondary/entry) "fK" = ( -/obj/effect/turf_decal/tile{ - dir = 1 - }, /obj/effect/turf_decal/tile/blue{ dir = 4 }, /obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, /obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, +/obj/effect/turf_decal/tile/neutral{ + dir = 1 + }, /turf/open/floor/iron, /area/station/hallway/secondary/entry) "gh" = ( /obj/effect/turf_decal/tile/blue{ dir = 4 }, -/obj/effect/turf_decal/tile, /obj/structure/cable, /obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, /obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, @@ -158,7 +157,6 @@ /obj/effect/turf_decal/tile/blue{ dir = 4 }, -/obj/effect/turf_decal/tile, /obj/machinery/camera{ c_tag = "Arrivals - North Docking Hall"; dir = 6 @@ -270,11 +268,11 @@ /turf/open/floor/iron, /area/station/hallway/secondary/entry) "yi" = ( -/obj/effect/turf_decal/tile{ - dir = 8 - }, /obj/effect/turf_decal/tile/blue, /obj/machinery/light/directional/west, +/obj/effect/turf_decal/tile/neutral{ + dir = 8 + }, /turf/open/floor/iron, /area/station/hallway/secondary/entry) "yF" = ( @@ -336,11 +334,11 @@ /turf/open/floor/iron, /area/station/hallway/secondary/entry) "CS" = ( -/obj/effect/turf_decal/tile{ - dir = 1 - }, /obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, /obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, +/obj/effect/turf_decal/tile/neutral{ + dir = 1 + }, /turf/open/floor/iron, /area/station/hallway/secondary/entry) "Da" = ( @@ -356,13 +354,13 @@ /turf/open/floor/iron, /area/station/hallway/secondary/entry) "Du" = ( -/obj/effect/turf_decal/tile{ - dir = 8 - }, /obj/effect/turf_decal/tile/blue, /obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer2{ dir = 1 }, +/obj/effect/turf_decal/tile/neutral{ + dir = 8 + }, /turf/open/floor/iron, /area/station/hallway/secondary/entry) "Dz" = ( @@ -372,15 +370,8 @@ }, /turf/open/floor/iron, /area/station/hallway/secondary/entry) -"DG" = ( -/obj/effect/turf_decal/tile{ - dir = 8 - }, -/obj/effect/turf_decal/tile/blue, -/turf/open/floor/iron, -/area/station/hallway/secondary/entry) "EO" = ( -/obj/effect/turf_decal/tile{ +/obj/effect/turf_decal/tile/neutral{ dir = 8 }, /turf/open/floor/iron, @@ -453,9 +444,6 @@ /turf/open/floor/iron/dark/textured_large, /area/station/hallway/secondary/entry) "NA" = ( -/obj/effect/turf_decal/tile{ - dir = 1 - }, /obj/effect/turf_decal/tile/blue{ dir = 4 }, @@ -463,12 +451,12 @@ /obj/machinery/atmospherics/components/unary/vent_pump/on/layer4{ dir = 4 }, +/obj/effect/turf_decal/tile/neutral{ + dir = 1 + }, /turf/open/floor/iron, /area/station/hallway/secondary/entry) "NG" = ( -/obj/effect/turf_decal/tile{ - dir = 1 - }, /obj/effect/turf_decal/tile/blue{ dir = 4 }, @@ -480,6 +468,9 @@ /obj/effect/landmark/event_spawn, /obj/structure/extinguisher_cabinet/directional/north, /obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, +/obj/effect/turf_decal/tile/neutral{ + dir = 1 + }, /turf/open/floor/iron, /area/station/hallway/secondary/entry) "NV" = ( @@ -548,13 +539,13 @@ /turf/open/space/openspace, /area/space) "Rh" = ( -/obj/effect/turf_decal/tile{ - dir = 1 - }, /obj/effect/turf_decal/tile/blue{ dir = 4 }, /obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, +/obj/effect/turf_decal/tile/neutral{ + dir = 1 + }, /turf/open/floor/iron, /area/station/hallway/secondary/entry) "Se" = ( @@ -617,7 +608,7 @@ /area/station/hallway/secondary/entry) "WD" = ( /obj/effect/turf_decal/tile/blue, -/obj/effect/turf_decal/tile{ +/obj/effect/turf_decal/tile/neutral{ dir = 8 }, /turf/open/floor/iron, @@ -1567,7 +1558,7 @@ Pv uq ZH nM -DG +WD Us GC GC @@ -1601,7 +1592,7 @@ Pv xq ZH nM -DG +WD Pv ZU ZU @@ -1669,7 +1660,7 @@ Pv Ql Dp ps -DG +WD Pv ZU ZU @@ -1703,7 +1694,7 @@ Pv Pv Pv kq -DG +WD Pv ZU ZU @@ -1737,7 +1728,7 @@ Pc Hp Ab nM -DG +WD Pv ZU ZU @@ -1805,7 +1796,7 @@ ZU Pv Wa Il -DG +WD Pv ZU ZU diff --git a/code/game/objects/effects/spawners/random/exotic.dm b/code/game/objects/effects/spawners/random/exotic.dm index a4356b5ec3a..ce48a31e5fd 100644 --- a/code/game/objects/effects/spawners/random/exotic.dm +++ b/code/game/objects/effects/spawners/random/exotic.dm @@ -8,7 +8,7 @@ spawn_loot_count = 2 loot = list( // Space loot spawner. Couple of random bits of technology-adjacent stuff including anomaly cores and BEPIS techs. /obj/item/raw_anomaly_core/random, - /obj/item/disk/tech_disk/spaceloot, + /obj/item/disk/design_disk/bepis, /obj/item/camera_bug, ) diff --git a/code/modules/cargo/bounties/science.dm b/code/modules/cargo/bounties/science.dm index aab8429b394..1807c5ae56f 100644 --- a/code/modules/cargo/bounties/science.dm +++ b/code/modules/cargo/bounties/science.dm @@ -18,8 +18,8 @@ description = "It turns out the diskettes the BEPIS prints experimental nodes on are extremely space-efficient. Send us one of your spares when you're done with it." reward = CARGO_CRATE_VALUE * 8 wanted_types = list( - /obj/item/disk/tech_disk/major = TRUE, - /obj/item/disk/tech_disk/spaceloot = TRUE, + /obj/item/disk/design_disk/bepis/remove_tech = TRUE, + /obj/item/disk/design_disk/bepis = TRUE, ) /datum/bounty/item/science/genetics diff --git a/code/modules/jobs/job_types/scientist.dm b/code/modules/jobs/job_types/scientist.dm index 709d4b76c87..2cbc2f288d0 100644 --- a/code/modules/jobs/job_types/scientist.dm +++ b/code/modules/jobs/job_types/scientist.dm @@ -29,7 +29,7 @@ mail_goodies = list( /obj/item/raw_anomaly_core/random = 10, - /obj/item/disk/tech_disk/spaceloot = 2, + /obj/item/disk/design_disk/bepis = 2, /obj/item/camera_bug = 1 ) rpg_title = "Thaumaturgist" diff --git a/code/modules/mapfluff/ruins/lavaland_ruin_code.dm b/code/modules/mapfluff/ruins/lavaland_ruin_code.dm index 17496462304..00f2124f13d 100644 --- a/code/modules/mapfluff/ruins/lavaland_ruin_code.dm +++ b/code/modules/mapfluff/ruins/lavaland_ruin_code.dm @@ -1,15 +1,13 @@ //If you're looking for spawners like ash walker eggs, check ghost_role_spawners.dm ///Wizard tower item -/obj/item/disk/design_disk/adv/knight_gear +/obj/item/disk/design_disk/knight_gear name = "Magic Disk of Smithing" -/obj/item/disk/design_disk/adv/knight_gear/Initialize(mapload) +/obj/item/disk/design_disk/knight_gear/Initialize(mapload) . = ..() - var/datum/design/knight_armour/A = new - var/datum/design/knight_helmet/H = new - blueprints[1] = A - blueprints[2] = H + blueprints += new /datum/design/knight_armour + blueprints += new /datum/design/knight_helmet //Free Golems @@ -17,12 +15,10 @@ name = "Golem Creation Disk" desc = "A gift from the Liberator." icon_state = "datadisk1" - max_blueprints = 1 /obj/item/disk/design_disk/golem_shell/Initialize(mapload) . = ..() - var/datum/design/golem_shell/G = new - blueprints[1] = G + blueprints += new /datum/design/golem_shell /datum/design/golem_shell name = "Golem Shell Construction" diff --git a/code/modules/mapfluff/ruins/spaceruin_code/clericsden.dm b/code/modules/mapfluff/ruins/spaceruin_code/clericsden.dm index 5f0e8f43803..2ea63245661 100644 --- a/code/modules/mapfluff/ruins/spaceruin_code/clericsden.dm +++ b/code/modules/mapfluff/ruins/spaceruin_code/clericsden.dm @@ -1,13 +1,12 @@ /////////// cleric's den items. //Primary reward: the cleric's mace design disk. -/obj/item/disk/design_disk/adv/cleric_mace +/obj/item/disk/design_disk/cleric_mace name = "Enshrined Disc of Smiting" -/obj/item/disk/design_disk/adv/cleric_mace/Initialize(mapload) +/obj/item/disk/design_disk/cleric_mace/Initialize(mapload) . = ..() - var/datum/design/cleric_mace/M = new - blueprints[1] = M + blueprints += new /datum/design/cleric_mace /obj/item/paper/fluff/ruins/clericsden/contact default_raw_text = "Father Aurellion, the ritual is complete, and soon our brothers at the bastion will see the error of our ways. After all, a god of clockwork or blood? Preposterous. Only the TRUE GOD should have so much power. Signed, Father Odivallus." diff --git a/code/modules/mining/lavaland/tendril_loot.dm b/code/modules/mining/lavaland/tendril_loot.dm index 91d653cc6d5..7921c667f47 100644 --- a/code/modules/mining/lavaland/tendril_loot.dm +++ b/code/modules/mining/lavaland/tendril_loot.dm @@ -9,7 +9,7 @@ /obj/item/disk/design_disk/modkit_disc/Initialize(mapload) . = ..() - blueprints[1] = new modkit_design + blueprints += new modkit_design /obj/item/disk/design_disk/modkit_disc/mob_and_turf_aoe name = "Offensive Mining Explosion Mod Disk" diff --git a/code/modules/research/bepis.dm b/code/modules/research/bepis.dm index 01357ad2736..22142e2d331 100644 --- a/code/modules/research/bepis.dm +++ b/code/modules/research/bepis.dm @@ -269,7 +269,7 @@ if((gauss_real >= gauss_major)) //Major Success. if(SSresearch.techweb_nodes_experimental.len > 0) say("Experiment concluded with major success. New technology node discovered on technology disc.") - new /obj/item/disk/tech_disk/major(dropturf,1) + new /obj/item/disk/design_disk/bepis/remove_tech(dropturf,1) return say("Expended all available experimental technology nodes. Resorting to minor rewards.") if(gauss_real >= gauss_minor) //Minor Success. diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index 8be33e7540b..07fe7aac490 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -98,19 +98,57 @@ other types of metals and chemistry for reagents). name = "Component Design Disk" desc = "A disk for storing device design data for construction in lathes." icon_state = "datadisk1" - custom_materials = list(/datum/material/iron =300, /datum/material/glass =100) + custom_materials = list(/datum/material/iron = 300, /datum/material/glass = 100) + + ///List of all `/datum/design` stored on the disk. var/list/blueprints = list() - var/max_blueprints = 1 /obj/item/disk/design_disk/Initialize(mapload) . = ..() - pixel_x = base_pixel_x + rand(-5, 5) - pixel_y = base_pixel_y + rand(-5, 5) - for(var/i in 1 to max_blueprints) - blueprints += null + if(mapload) + pixel_x = base_pixel_x + rand(-5, 5) + pixel_y = base_pixel_y + rand(-5, 5) + +/** + * Used for special interactions with a techweb when uploading the designs. + * Args: + * - stored_research - The techweb that's storing us. + */ +/obj/item/disk/design_disk/proc/on_upload(datum/techweb/stored_research) + return + +/obj/item/disk/design_disk/bepis + name = "Old experimental technology disk" + desc = "A disk containing some long-forgotten technology from a past age. You hope it still works after all these years. Upload the disk to an R&D Console to redeem the tech." + icon_state = "rndmajordisk" + + ///The bepis node we have the design id's of + var/datum/techweb_node/bepis_node + +/obj/item/disk/design_disk/bepis/Initialize(mapload) + . = ..() + var/bepis_id = pick(SSresearch.techweb_nodes_experimental) + bepis_node = (SSresearch.techweb_node_by_id(bepis_id)) + + for(var/entry in bepis_node.design_ids) + var/datum/design/new_entry = SSresearch.techweb_design_by_id(entry) + blueprints += new_entry + +///Unhide and research our node so we show up in the R&D console. +/obj/item/disk/design_disk/bepis/on_upload(datum/techweb/stored_research) + stored_research.hidden_nodes -= bepis_node.id + stored_research.research_node(bepis_node, force = TRUE, auto_adjust_cost = FALSE) + +/** + * Subtype of Bepis tech disk + * Removes the tech disk that's held on it from the experimental node list, making them not show up in future disks. + */ +/obj/item/disk/design_disk/bepis/remove_tech + name = "Reformatted technology disk" + desc = "A disk containing a new, completed tech from the B.E.P.I.S. Upload the disk to an R&D Console to redeem the tech." + +/obj/item/disk/design_disk/bepis/remove_tech/Initialize(mapload) + . = ..() + SSresearch.techweb_nodes_experimental -= bepis_node.id + log_research("[bepis_node.display_name] has been removed from experimental nodes through the BEPIS techweb's \"remove tech\" feature.") -/obj/item/disk/design_disk/adv - name = "Advanced Component Design Disk" - desc = "A disk for storing device design data for construction in lathes. This one has extra storage space." - custom_materials = list(/datum/material/iron =300, /datum/material/glass = 100, /datum/material/silver = 50) - max_blueprints = 5 diff --git a/code/modules/research/designs/electronics_designs.dm b/code/modules/research/designs/electronics_designs.dm index 9bf02b2c4a5..c4922b092a6 100644 --- a/code/modules/research/designs/electronics_designs.dm +++ b/code/modules/research/designs/electronics_designs.dm @@ -42,30 +42,6 @@ //////////////////////////////////////// //////////Disk Construction Disks/////// //////////////////////////////////////// -/datum/design/design_disk - name = "Design Storage Disk" - desc = "Produce additional disks for storing device designs." - id = "design_disk" - build_type = PROTOLATHE | AWAY_LATHE | AUTOLATHE - materials = list(/datum/material/iron = 300, /datum/material/glass = 100) - build_path = /obj/item/disk/design_disk - category = list( - RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_SCIENCE - ) - departmental_flags = DEPARTMENT_BITFLAG_SCIENCE - -/datum/design/design_disk_adv - name = "Advanced Design Storage Disk" - desc = "Produce additional disks for storing device designs." - id = "design_disk_adv" - build_type = PROTOLATHE | AWAY_LATHE - materials = list(/datum/material/iron = 300, /datum/material/glass = 100, /datum/material/silver=50) - build_path = /obj/item/disk/design_disk/adv - category = list( - RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_SCIENCE - ) - departmental_flags = DEPARTMENT_BITFLAG_SCIENCE - /datum/design/tech_disk name = "Technology Data Storage Disk" desc = "Produce additional disks for storing technology data." diff --git a/code/modules/research/designs/limbgrower_designs.dm b/code/modules/research/designs/limbgrower_designs.dm index 53b56265ff4..d38b7a42d64 100644 --- a/code/modules/research/designs/limbgrower_designs.dm +++ b/code/modules/research/designs/limbgrower_designs.dm @@ -224,7 +224,6 @@ /obj/item/disk/design_disk/limbs/Initialize(mapload) . = ..() - max_blueprints = limb_designs.len for(var/design in limb_designs) var/datum/design/new_design = design blueprints += new new_design diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 790f7c8ab72..2ad80a0ed10 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -181,16 +181,9 @@ Nothing else in the console has ID requirements. "stored_research" = t_disk.stored_research.researched_nodes, ) if (d_disk) - data["d_disk"] = list ( - "max_blueprints" = d_disk.max_blueprints, - "blueprints" = list(), - ) - for (var/i in 1 to d_disk.max_blueprints) - if (d_disk.blueprints[i]) - var/datum/design/D = d_disk.blueprints[i] - data["d_disk"]["blueprints"] += D.id - else - data["d_disk"]["blueprints"] += null + data["d_disk"] = list("blueprints" = list()) + for (var/datum/design/D in d_disk.blueprints) + data["d_disk"]["blueprints"] += D.id // Serialize all nodes to display @@ -295,7 +288,7 @@ Nothing else in the console has ID requirements. .["static_data"] = list( "node_cache" = node_cache, "design_cache" = design_cache, - "id_cache" = flat_id_cache + "id_cache" = flat_id_cache, ) /obj/machinery/computer/rdconsole/ui_act(action, list/params) @@ -326,55 +319,6 @@ Nothing else in the console has ID requirements. if ("ejectDisk") eject_disk(params["type"]) return TRUE - if ("writeDesign") - if(QDELETED(d_disk)) - say("No Design Disk Inserted!") - return TRUE - var/slot = text2num(params["slot"]) - var/design_id = params["selectedDesign"] - if(!stored_research.researched_designs.Find(design_id)) - stack_trace("ID did not map to a researched datum [design_id]") - return - var/datum/design/design = SSresearch.techweb_design_by_id(design_id) - if(design) - if(design.build_type & (AUTOLATHE|PROTOLATHE|AWAY_LATHE)) // Specifically excludes circuit imprinter and mechfab - if(design.autolathe_exportable && !design.reagents_list.len) - design.build_type |= AUTOLATHE - design.category |= RND_CATEGORY_IMPORTED - d_disk.blueprints[slot] = design - return TRUE - if ("uploadDesignSlot") - if(QDELETED(d_disk)) - say("No design disk found.") - return TRUE - var/n = text2num(params["slot"]) - stored_research.add_design(d_disk.blueprints[n], TRUE) - return TRUE - if ("clearDesignSlot") - if(QDELETED(d_disk)) - say("No design disk inserted!") - return TRUE - var/n = text2num(params["slot"]) - var/datum/design/D = d_disk.blueprints[n] - say("Wiping design [D.name] from design disk.") - d_disk.blueprints[n] = null - return TRUE - if ("eraseDisk") - if (params["type"] == RND_DESIGN_DISK) - if(QDELETED(d_disk)) - say("No design disk inserted!") - return TRUE - say("Wiping design disk.") - for(var/i in 1 to d_disk.max_blueprints) - d_disk.blueprints[i] = null - if (params["type"] == RND_TECH_DISK) - if(QDELETED(t_disk)) - say("No tech disk inserted!") - return TRUE - qdel(t_disk.stored_research) - t_disk.stored_research = new - say("Wiping technology disk.") - return TRUE if ("uploadDisk") if (params["type"] == RND_DESIGN_DISK) if(QDELETED(d_disk)) @@ -383,6 +327,9 @@ Nothing else in the console has ID requirements. for(var/D in d_disk.blueprints) if(D) stored_research.add_design(D, TRUE) + say("Uploading blueprints from disk.") + d_disk.on_upload(stored_research) + return TRUE if (params["type"] == RND_TECH_DISK) if (QDELETED(t_disk)) say("No tech disk inserted!") @@ -390,6 +337,7 @@ Nothing else in the console has ID requirements. say("Uploading technology disk.") t_disk.stored_research.copy_research_to(stored_research) return TRUE + //Tech disk-only action. if ("loadTech") if(QDELETED(t_disk)) say("No tech disk inserted!") diff --git a/code/modules/research/research_disk.dm b/code/modules/research/research_disk.dm index 1d88fe78494..16f0ed7e646 100644 --- a/code/modules/research/research_disk.dm +++ b/code/modules/research/research_disk.dm @@ -21,23 +21,3 @@ /obj/item/disk/tech_disk/debug/Initialize(mapload) stored_research = SSresearch.admin_tech return ..() - -/obj/item/disk/tech_disk/major - name = "Reformatted technology disk" - desc = "A disk containing a new, completed tech from the B.E.P.I.S. Upload the disk to an R&D Console to redeem the tech." - icon_state = "rndmajordisk" - custom_materials = list(/datum/material/iron=300, /datum/material/glass=100) - -/obj/item/disk/tech_disk/major/Initialize(mapload) - stored_research = new /datum/techweb/bepis - return ..() - -/obj/item/disk/tech_disk/spaceloot - name = "Old experimental technology disk" - desc = "A disk containing some long-forgotten technology from a past age. You hope it still works after all these years. Upload the disk to an R&D Console to redeem the tech." - icon_state = "rndmajordisk" - custom_materials = list(/datum/material/iron=300, /datum/material/glass=100) - -/obj/item/disk/tech_disk/spaceloot/Initialize(mapload) - stored_research = new /datum/techweb/bepis(remove_tech = FALSE) - return ..() diff --git a/code/modules/research/techweb/_techweb.dm b/code/modules/research/techweb/_techweb.dm index 810ac7cbb0a..ba9c5b6709c 100644 --- a/code/modules/research/techweb/_techweb.dm +++ b/code/modules/research/techweb/_techweb.dm @@ -143,12 +143,11 @@ l[i] = amount modify_point_list(l) -/datum/techweb/proc/copy_research_to(datum/techweb/receiver, unlock_hidden = TRUE) //Adds any missing research to theirs. - if(unlock_hidden) - for(var/i in receiver.hidden_nodes) - CHECK_TICK - if(available_nodes[i] || researched_nodes[i] || visible_nodes[i]) - receiver.hidden_nodes -= i //We can see it so let them see it too. +/datum/techweb/proc/copy_research_to(datum/techweb/receiver) //Adds any missing research to theirs. + for(var/i in receiver.hidden_nodes) + CHECK_TICK + if(available_nodes[i] || researched_nodes[i] || visible_nodes[i]) + receiver.hidden_nodes -= i //We can see it so let them see it too. for(var/i in researched_nodes) CHECK_TICK receiver.research_node_id(i, TRUE, FALSE, FALSE) @@ -217,6 +216,8 @@ else researched_designs[design.id] = TRUE + hidden_nodes -= design.id + return TRUE /datum/techweb/proc/remove_design_by_id(id, custom = FALSE) diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index 3bdf23b5366..da032f640b6 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -38,7 +38,6 @@ "conveyor_belt", "conveyor_switch", "custom_vendor_refill", - "design_disk", "destructive_analyzer", "destructive_scanner", "desttagger", diff --git a/code/modules/research/techweb/techweb_types.dm b/code/modules/research/techweb/techweb_types.dm index 5a8e7cf42b4..fef8e51b09d 100644 --- a/code/modules/research/techweb/techweb_types.dm +++ b/code/modules/research/techweb/techweb_types.dm @@ -29,25 +29,6 @@ research_points[i] = INFINITY hidden_nodes = list() -/** - * Techweb made through BEPIS machine - * Should only contain 1 BEPIS tech at random. - */ -/datum/techweb/bepis - id = "EXPERIMENTAL" - organization = "Nanotrasen R&D" - -/datum/techweb/bepis/New(remove_tech = TRUE) - . = ..() - var/bepis_id = pick(SSresearch.techweb_nodes_experimental) //To add a new tech to the BEPIS, add the ID to this pick list. - var/datum/techweb_node/BN = (SSresearch.techweb_node_by_id(bepis_id)) - hidden_nodes -= BN.id //Has to be removed from hidden nodes - research_node(BN, TRUE, FALSE, FALSE) - update_node_status(BN) - if(remove_tech) - SSresearch.techweb_nodes_experimental -= bepis_id - log_research("[BN.display_name] has been removed from experimental nodes through the BEPIS techweb's \"remove tech\" feature.") - /** * Techweb made through tech disks * Contains nothing, subtype mostly meant to make it easy for admins to see. diff --git a/modular_skyrat/modules/xenoarch/code/modules/research/xenoarch/xenoarch_reward.dm b/modular_skyrat/modules/xenoarch/code/modules/research/xenoarch/xenoarch_reward.dm index b5f4f658aa8..7969ae79894 100644 --- a/modular_skyrat/modules/xenoarch/code/modules/research/xenoarch/xenoarch_reward.dm +++ b/modular_skyrat/modules/xenoarch/code/modules/research/xenoarch/xenoarch_reward.dm @@ -30,7 +30,6 @@ GLOBAL_LIST_INIT(tech_reward, list( /obj/item/megaphone = 1, /obj/item/bodybag/bluespace = 1, /obj/item/relic = 1, - /obj/item/disk/tech_disk/spaceloot = 1, /obj/item/raw_anomaly_core/random = 1, /obj/item/bag_of_holding_inert = 1, /obj/item/construction/plumbing = 1, @@ -76,7 +75,6 @@ GLOBAL_LIST_INIT(clothing_reward, list( GLOBAL_LIST_INIT(illegal_reward, list( /obj/item/stack/telecrystal = 1, /obj/item/storage/box/rndboards = 1, - /obj/item/disk/tech_disk/spaceloot = 6 )) GLOBAL_LIST_INIT(plant_reward, list( diff --git a/tgui/packages/tgui/interfaces/Techweb.js b/tgui/packages/tgui/interfaces/Techweb.js index 34ce108ac7f..7b9d0814e6e 100644 --- a/tgui/packages/tgui/interfaces/Techweb.js +++ b/tgui/packages/tgui/interfaces/Techweb.js @@ -1,7 +1,6 @@ -import { filter, map, sortBy } from 'common/collections'; -import { flow } from 'common/fp'; +import { map, sortBy } from 'common/collections'; import { useBackend, useLocalState } from '../backend'; -import { Button, Section, Modal, Dropdown, Tabs, Box, Input, Flex, ProgressBar, Collapsible, Icon, Divider } from '../components'; +import { Button, Section, Modal, Tabs, Box, Input, Flex, ProgressBar, Collapsible, Icon, Divider } from '../components'; import { Window, NtosWindow } from '../layouts'; import { Experiment } from './ExperimentConfigure'; @@ -352,11 +351,6 @@ const TechwebDiskMenu = (props, context) => { onClick={() => act('uploadDisk', { type: diskType })}> Disk → Web - - - - - - )} {blueprints.map((x, i) => ( -
- {x !== null && ( - - )} - - {x !== null && ( - - )} - - }> +
{(x === null && 'Empty') || ( <> Contains the design for {design_cache[x].name}:
diff --git a/tools/UpdatePaths/Scripts/74147_tech_disk_repath.txt b/tools/UpdatePaths/Scripts/74147_tech_disk_repath.txt new file mode 100644 index 00000000000..6b5a0e4c5e6 --- /dev/null +++ b/tools/UpdatePaths/Scripts/74147_tech_disk_repath.txt @@ -0,0 +1,7 @@ +# removes advanced design, and moves bepis tech disks to its new type + +/obj/item/disk/design_disk/adv : /obj/item/disk/design_disk{@OLD} +/obj/item/disk/design_disk/adv/@SUBTPYES : /obj/item/disk/design_disk/@SUBTYPES{@OLD} + +/obj/item/disk/tech_disk/major : /obj/item/disk/design_disk/bepis/remove_tech +/obj/item/disk/tech_disk/spaceloot : /obj/item/disk/design_disk/bepis