From a769b68cc69720bbaf5ae3ede5928e2e24726c73 Mon Sep 17 00:00:00 2001 From: Lexanx <61974560+Lexanx@users.noreply.github.com> Date: Wed, 29 Jan 2025 20:06:33 +0300 Subject: [PATCH] 5.8 --- code/__defines/research.dm | 2 - code/game/machinery/robotics_fabricator.dm | 4 +- .../circuitboards/machinery/research.dm | 2 +- code/modules/events/event_container.dm | 3 +- code/modules/fabrication/_fabricator.dm | 2 +- code/modules/fabrication/fabricator_build.dm | 2 +- code/modules/fabrication/fabricator_food.dm | 2 +- code/modules/fabrication/fabricator_hacked.dm | 2 +- code/modules/fabrication/fabricator_intake.dm | 2 +- .../fabrication/fabricator_microlathe.dm | 2 +- code/modules/fabrication/fabricator_topic.dm | 2 +- code/modules/fabrication/fabricator_ui.dm | 2 +- code/modules/item_worth/worths_list.dm | 2 +- .../programs/generic/file_browser.dm | 4 +- code/modules/research/circuitprinter.dm | 2 +- code/modules/research/designs/_designs.dm | 2 +- code/modules/research/destructive_analyzer.dm | 2 +- code/modules/research/protolathe.dm | 2 +- code/modules/research/rdconsole.dm | 2 +- code/modules/research/rdmachines.dm | 2 +- code/modules/research/research.dm | 2 +- code/unit_tests/machine_tests.dm | 2 +- mods/RnD/code/designownloader.dm | 2 +- .../code/designs_autolathe/designs_general.dm | 3 + mods/RnD/code/event.dm | 29 ++--- mods/RnD/code/itcommand.dm | 101 ++++++++++++++++++ mods/RnD/code/rdconsole.dm | 6 +- 27 files changed, 147 insertions(+), 43 deletions(-) diff --git a/code/__defines/research.dm b/code/__defines/research.dm index 2aad735937043..560872ef16c6a 100644 --- a/code/__defines/research.dm +++ b/code/__defines/research.dm @@ -15,5 +15,3 @@ #define PROTOLATHE FLAG(1) //New stuff. Uses glass/metal/chemicals #define MECHFAB FLAG(2) //Mechfab #define CHASSIS FLAG(3) //For protolathe, but differently -#define BIOPRINTER FLAG(4) -#define ORGAN_GROWER FLAG(5) diff --git a/code/game/machinery/robotics_fabricator.dm b/code/game/machinery/robotics_fabricator.dm index b0ccae7f52e47..d3b5cad2778a4 100644 --- a/code/game/machinery/robotics_fabricator.dm +++ b/code/game/machinery/robotics_fabricator.dm @@ -109,7 +109,7 @@ ui.set_initial_data(data) ui.open() ui.set_auto_update(1) -/* +/* [SIERRA-REMOVE] - MODPACK_RND /obj/machinery/robotics_fabricator/Topic(href, href_list) if(..()) return @@ -152,7 +152,7 @@ if(busy) return SPAN_NOTICE("\The [src] is busy. Please wait for completion of previous operation.") return ..() -/* +/* [SIERRA-REMOVE] - MODPACK_RND /obj/machinery/robotics_fabricator/use_tool(obj/item/I, mob/living/user, list/click_params) if(busy) to_chat(user, SPAN_NOTICE("\The [src] is busy. Please wait for completion of previous operation.")) diff --git a/code/game/objects/items/weapons/circuitboards/machinery/research.dm b/code/game/objects/items/weapons/circuitboards/machinery/research.dm index 50722ec2c2897..512cb8c6e8eda 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/research.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/research.dm @@ -45,7 +45,7 @@ /obj/item/stock_parts/matter_bin = 1, /obj/item/stock_parts/manipulator = 1 ) -/* +/* [SIERRA-REMOVE] - MODPACK_RND /obj/item/stock_parts/circuitboard/replicator name = "circuit board (replicator)" build_path = /obj/machinery/fabricator/replicator diff --git a/code/modules/events/event_container.dm b/code/modules/events/event_container.dm index c2eeee3f9746b..c14ae9884d250 100644 --- a/code/modules/events/event_container.dm +++ b/code/modules/events/event_container.dm @@ -147,7 +147,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Toilet Clog", /datum/event/toilet_clog, 50, list(ASSIGNMENT_JANITOR = 20)), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Drone Malfunction", /datum/event/rogue_maint_drones, 10, list(ASSIGNMENT_ENGINEER = 30)), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Disposals Explosion", /datum/event/disposals_explosion, 50, list(ASSIGNMENT_ENGINEER = 40)), - new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Brain Expansion", /datum/event/brain_expansion, 20, list(ASSIGNMENT_SCIENTIST = 20)), + //new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Brain Expansion", /datum/event/brain_expansion, 20, list(ASSIGNMENT_SCIENTIST = 20)), [SIERRA-REMOVE] RND new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mail Delivery", /datum/event/mail, 5, list(ASSIGNMENT_ANY = 1), 1), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Whale Migration", /datum/event/mob_spawning/whale_migration, 10) ) @@ -176,6 +176,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT new /datum/event_meta(EVENT_LEVEL_MODERATE, "Drone Uprising", /datum/event/rogue_maint_drones, 25, list(ASSIGNMENT_ENGINEER = 30)), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Supermatter Power Surge", /datum/event/power_surge, 100, list(ASSIGNMENT_ENGINEER = 10)), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Bluespace Drive Instability", /datum/event/bsd_instability, 50), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Design Leak", /datum/event/rnd_design_leak, 60), ) /datum/event_container/major diff --git a/code/modules/fabrication/_fabricator.dm b/code/modules/fabrication/_fabricator.dm index 56e9eec3e882e..8e6034f19771d 100644 --- a/code/modules/fabrication/_fabricator.dm +++ b/code/modules/fabrication/_fabricator.dm @@ -1,4 +1,4 @@ -/* +/* [SIERRA-REMOVE] - MODPACK_RND /obj/machinery/fabricator name = "autolathe" desc = "It produces common day to day items from a variety of materials." diff --git a/code/modules/fabrication/fabricator_build.dm b/code/modules/fabrication/fabricator_build.dm index c5f093c7cc350..c219a3f5927a6 100644 --- a/code/modules/fabrication/fabricator_build.dm +++ b/code/modules/fabrication/fabricator_build.dm @@ -1,4 +1,4 @@ -/* +/* [SIERRA-REMOVE] - MODPACK_RND /obj/machinery/fabricator/proc/update_current_build(spend_time) if(!istype(currently_building) || !is_functioning()) diff --git a/code/modules/fabrication/fabricator_food.dm b/code/modules/fabrication/fabricator_food.dm index f01b84d3cfe7b..67bd4e4f4be79 100644 --- a/code/modules/fabrication/fabricator_food.dm +++ b/code/modules/fabrication/fabricator_food.dm @@ -1,4 +1,4 @@ -/*/obj/machinery/fabricator/replicator +/*/obj/machinery/fabricator/replicator [SIERRA-REMOVE] - MODPACK_RND name = "food replicator" desc = "A versatile machine that dispenses nourishing but bland food. Responds to voice commands like 'menu' and 'status'." fabricator_class = FABRICATOR_CLASS_FOOD diff --git a/code/modules/fabrication/fabricator_hacked.dm b/code/modules/fabrication/fabricator_hacked.dm index b4484b8b2523a..6113b16c9792b 100644 --- a/code/modules/fabrication/fabricator_hacked.dm +++ b/code/modules/fabrication/fabricator_hacked.dm @@ -1,4 +1,4 @@ -/*/obj/machinery/fabricator/hacked +/*/obj/machinery/fabricator/hacked [SIERRA-REMOVE] - MODPACK_RND desc = "A typical autolathe. It has an unusual 'CRaCKZ BY C0wCUb3C0NQ3r0R' glyph bouncing around the interface."; name = "jailbroken autolathe" fab_status_flags = FAB_HACKED diff --git a/code/modules/fabrication/fabricator_intake.dm b/code/modules/fabrication/fabricator_intake.dm index 801d14d330452..d41858b42c051 100644 --- a/code/modules/fabrication/fabricator_intake.dm +++ b/code/modules/fabrication/fabricator_intake.dm @@ -1,4 +1,4 @@ -/*#define SUBSTANCE_TAKEN_NONE -1 +/*#define SUBSTANCE_TAKEN_NONE -1 [SIERRA-REMOVE] - MODPACK_RND #define SUBSTANCE_TAKEN_SOME 0 #define SUBSTANCE_TAKEN_FULL 1 #define SUBSTANCE_TAKEN_ALL 2 diff --git a/code/modules/fabrication/fabricator_microlathe.dm b/code/modules/fabrication/fabricator_microlathe.dm index 9823e9753e526..5ea98f98d3cb4 100644 --- a/code/modules/fabrication/fabricator_microlathe.dm +++ b/code/modules/fabrication/fabricator_microlathe.dm @@ -1,4 +1,4 @@ -/*/obj/machinery/fabricator/micro +/*/obj/machinery/fabricator/micro [SIERRA-REMOVE] - MODPACK_RND name = "microlathe" desc = "It produces small items from common resources." icon = 'icons/obj/machines/fabricators/microlathe.dmi' diff --git a/code/modules/fabrication/fabricator_topic.dm b/code/modules/fabrication/fabricator_topic.dm index cbddc00a83d06..5357cca49dd78 100644 --- a/code/modules/fabrication/fabricator_topic.dm +++ b/code/modules/fabrication/fabricator_topic.dm @@ -1,4 +1,4 @@ -/* +/* [SIERRA-REMOVE] - MODPACK_RND /obj/machinery/fabricator/OnTopic(user, href_list, state) if(href_list["change_category"]) var/choice = input("Which category do you wish to display?") as null|anything in SSfabrication.get_categories(fabricator_class)|"All" diff --git a/code/modules/fabrication/fabricator_ui.dm b/code/modules/fabrication/fabricator_ui.dm index 6f6da5e2fa3f0..fb009192270e4 100644 --- a/code/modules/fabrication/fabricator_ui.dm +++ b/code/modules/fabrication/fabricator_ui.dm @@ -1,4 +1,4 @@ -/*#define PRINT_MULTIPLIER_DIVISOR 5 +/*#define PRINT_MULTIPLIER_DIVISOR 5 [SIERRA-REMOVE] - MODPACK_RND /obj/machinery/fabricator/ui_interact(mob/user, ui_key = "rcon", datum/nanoui/ui=null, force_open=1) diff --git a/code/modules/item_worth/worths_list.dm b/code/modules/item_worth/worths_list.dm index 7452ad67ef4e0..83cbf13f2a02b 100644 --- a/code/modules/item_worth/worths_list.dm +++ b/code/modules/item_worth/worths_list.dm @@ -636,7 +636,7 @@ var/global/list/worths = list( /obj/machinery/conveyor = 200, /obj/machinery/conveyor_switch = 100, /obj/machinery/disposal = 500, - //obj/machinery/r_n_d/protolathe = -15000, + /obj/machinery/fabricator/rnd/protolathe = -15000, /obj/machinery/r_n_d/server = -20000, /obj/machinery/r_n_d = -1000, /obj/machinery/auto_cloner = -13000, diff --git a/code/modules/modular_computers/file_system/programs/generic/file_browser.dm b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm index 062eb0582348c..28039a627f849 100644 --- a/code/modules/modular_computers/file_system/programs/generic/file_browser.dm +++ b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm @@ -15,7 +15,7 @@ var/error usage_flags = PROGRAM_ALL category = PROG_UTIL - +/* /datum/computer_file/program/filemanager/Topic(href, href_list) if(..()) return TOPIC_HANDLED @@ -117,7 +117,7 @@ //[/SIERRA-EDIT] if(.) SSnano.update_uis(NM) - +*/ /datum/nano_module/program/computer_filemanager name = "NTOS File Manager" diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index 30123f3756501..6e3b0c9c67c1d 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -1,5 +1,5 @@ -/*///////////////Circuit Imprinter (By Darem)//////////////////////// +/*///////////////Circuit Imprinter (By Darem)//////////////////////// [SIERRA-REMOVE] - MODPACK_RND Used to print new circuit boards (for computers and similar systems) and AI modules. Each circuit board pattern are stored in a /datum/desgin on the linked R&D console. You can then print them out in a fasion similar to a regular lathe. However, instead of using metal and glass, it uses glass and reagents (usually sulphuric acid). diff --git a/code/modules/research/designs/_designs.dm b/code/modules/research/designs/_designs.dm index 7100d83744daf..dc86f4178cf98 100644 --- a/code/modules/research/designs/_designs.dm +++ b/code/modules/research/designs/_designs.dm @@ -1,4 +1,4 @@ -/* +/* [SIERRA-REMOVE] - MODPACK_RND /*************************************************************** ** Design Datums ** ** All the data for building stuff and tracking reliability. ** diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm index 1dd433e43cf8f..86b9200c5f7a7 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -1,4 +1,4 @@ -/* +/* [SIERRA-REMOVE] - MODPACK_RND Destructive Analyzer It is used to destroy hand-held objects and advance technological research. Controls are in the linked R&D console. diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index f7a685b4c0c86..bbfb080a37248 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -1,4 +1,4 @@ -/* +/* [SIERRA-REMOVE] - MODPACK_RND /obj/machinery/r_n_d/protolathe name = "protolathe" desc = "Accessed by a connected core fabricator console, it produces items from various materials." diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index c883d9f373274..74eaebc304690 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -1,4 +1,4 @@ -// ПРОКИ spawn() из коркода ЗАМЕНЕНЫ НА sleep() БУДЬ ВНИМАТЕЛЕН +// ПРОКИ spawn() из коркода ЗАМЕНЕНЫ НА sleep() БУДЬ ВНИМАТЕЛЕН [SIERRA-REMOVE] - MODPACK_RND /* #define CHECK_LATHE \ diff --git a/code/modules/research/rdmachines.dm b/code/modules/research/rdmachines.dm index 2e5830f20e2f7..3cef32b7184d5 100644 --- a/code/modules/research/rdmachines.dm +++ b/code/modules/research/rdmachines.dm @@ -1,7 +1,7 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 //All devices that link into the R&D console fall into thise type for easy identification and some shared procs. -/* +/* [SIERRA-REMOVE] - MODPACK_RND var/global/list/default_material_composition = list(MATERIAL_STEEL = 0, MATERIAL_ALUMINIUM = 0, MATERIAL_PLASTIC = 0, MATERIAL_GLASS = 0, MATERIAL_GOLD = 0, MATERIAL_SILVER = 0, MATERIAL_PHORON = 0, MATERIAL_URANIUM = 0, MATERIAL_DIAMOND = 0) /obj/machinery/r_n_d name = "R&D Device" diff --git a/code/modules/research/research.dm b/code/modules/research/research.dm index 6e4ee2b4b837b..7664cea32e4f9 100644 --- a/code/modules/research/research.dm +++ b/code/modules/research/research.dm @@ -1,5 +1,5 @@ /* // mods\RnD\code\research.dm -/* +/* [SIERRA-REMOVE] - MODPACK_RND General Explination: The research datum is the "folder" where all the research information is stored in a R&D console. It's also a holder for all the various procs used to manipulate it. It has four variables and seven procs: diff --git a/code/unit_tests/machine_tests.dm b/code/unit_tests/machine_tests.dm index 4368d30a55b69..99d64c949fc86 100644 --- a/code/unit_tests/machine_tests.dm +++ b/code/unit_tests/machine_tests.dm @@ -64,7 +64,7 @@ pass("All machines had valid construction states.") return 1 -/* +/* [SIERRA-REMOVE] - MODPACK_RND /datum/unit_test/fabricator_recipes_shall_be_buildable name = "MACHINE: All fabricators will be able to produce all of their recipes" /datum/unit_test/fabricator_recipes_shall_be_buildable/start_test() diff --git a/mods/RnD/code/designownloader.dm b/mods/RnD/code/designownloader.dm index 5c53d048c8ddd..ce819ccef00e2 100644 --- a/mods/RnD/code/designownloader.dm +++ b/mods/RnD/code/designownloader.dm @@ -162,7 +162,7 @@ ui = SSnano.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) - ui = new(user, src, ui_key, "mods-ntnetdsgn_downloader.tmpl", "NTNet Download Program", 600, 700, state = state) + ui = new(user, src, ui_key, "mods-ntnetdsgn_downloader.tmpl", "NTNet Download Design", 600, 700, state = state) ui.auto_update_layout = 1 ui.set_initial_data(data) ui.open() diff --git a/mods/RnD/code/designs_autolathe/designs_general.dm b/mods/RnD/code/designs_autolathe/designs_general.dm index 910649af65b88..b14b927552811 100644 --- a/mods/RnD/code/designs_autolathe/designs_general.dm +++ b/mods/RnD/code/designs_autolathe/designs_general.dm @@ -2,6 +2,9 @@ build_path = /obj/item/reagent_containers/glass/bucket category = list("General") +/datum/design/autolathe/general/datacrystal + build_path = /obj/item/stock_parts/computer/hard_drive/portable + /datum/design/autolathe/general/flashlight build_path = /obj/item/device/flashlight diff --git a/mods/RnD/code/event.dm b/mods/RnD/code/event.dm index 4f84af6d4310a..40467b876617d 100644 --- a/mods/RnD/code/event.dm +++ b/mods/RnD/code/event.dm @@ -1,4 +1,4 @@ -/* + /datum/event/rnd_design_leak announceWhen = 21 @@ -6,25 +6,30 @@ var/list/obj/machinery/vending/infectedVendingMachines = list() var/obj/machinery/vending/originMachine var/nid + var/tries_count = 20 + var/datum/extension/interactive/ntos/os +/datum/event/rnd_design_leak/start() + var/ndesigns = rand(3,12) + var/nidislegal = FALSE + while(tries_count > 0 && !nidislegal) + tries_count-- + nid = pick(ntnet_global.registered_nids) + os = ntnet_global.registered_nids[nid] + if(os.get_ntnet_status_incoming()) + if(os.get_hardware_flag() & !PROGRAM_PDA) + nidislegal = TRUE -/datum/event/rnd_design_leak/announce() command_announcement.Announce("Unusual activity has been detected in Research and Development network. A design leak has been detected in [nid]. Please investigate.", "Research and Development Network") - - -/datum/event/rnd_design_leak/start() - var/ndesigns = rand(1,10) - nid = pick(ntnet_global.registered_nids) - var/datum/extension/interactive/ntos/os = ntnet_global.registered_nids[nid] var/area/A = get_area(os.get_physical_host()) for(var/obj/machinery/r_n_d/server/S in rnd_server_list) if(GLOB.using_map.use_overmap && !(A.z in GetConnectedZlevels(S.z))) break - if(S.disabled) + if(S.stat & MACHINE_STAT_NOPOWER) continue - if((!istype(S, /obj/machinery/r_n_d/server/centcom)) || S.hacked) + if(!istype(S, /obj/machinery/r_n_d/server/centcom)) while(ndesigns > 0) ndesigns-- - var/datum/design/D = pick(S.files) + var/datum/design/D = pick(S.files.known_designs) os.create_file(D) - S.produce_heat(500)*/ + S.produce_heat(400) diff --git a/mods/RnD/code/itcommand.dm b/mods/RnD/code/itcommand.dm index c9c8aeb4763d6..4c87c56ec71b7 100644 --- a/mods/RnD/code/itcommand.dm +++ b/mods/RnD/code/itcommand.dm @@ -65,3 +65,104 @@ if(!terminal.computer.set_autorun(arguments[2])) return "[name]: Error; could not modify autorun data." return "[name]: Autorun updated to '[arguments[2]]'" + + +/datum/computer_file/program/filemanager/Topic(href, href_list) + if(..()) + return TOPIC_HANDLED + + if(href_list["PRG_openfile"]) + . = TOPIC_HANDLED + open_file = href_list["PRG_openfile"] + if(href_list["PRG_newtextfile"]) + . = TOPIC_HANDLED + var/newname = sanitize(input(usr, "Enter file name or leave blank to cancel:", "File rename")) + if(!newname) + return + if(!computer.create_data_file(newname, file_type = /datum/computer_file/data/text)) + error = "File error: Unable to create file on disk." + return + if(href_list["PRG_deletefile"]) + . = TOPIC_HANDLED + computer.delete_file(href_list["PRG_deletefile"]) + if(href_list["PRG_clone"]) + . = TOPIC_HANDLED + computer.clone_file(href_list["PRG_clone"]) + if(href_list["PRG_rename"]) + . = TOPIC_HANDLED + var/newname = sanitize(input(usr, "Enter new file name:", "File rename", href_list["PRG_rename"])) + if(!newname) + return + if(!computer.rename_file(href_list["PRG_rename"], newname)) + error = "File error: Unable to rename file." + return + if(href_list["PRG_usbdeletefile"]) + . = TOPIC_HANDLED + if(istype(computer.holder, /obj/machinery/computer/modular)) + var/obj/machinery/computer/modular/modular_machine = computer.holder + computer.delete_file(href_list["PRG_usbdeletefile"], modular_machine.portable_drive) + else + computer.delete_file(href_list["PRG_usbdeletefile"], computer.get_component(PART_DRIVE)) + if(href_list["PRG_copytousb"]) + . = TOPIC_HANDLED + if(istype(computer.holder, /obj/machinery/computer/modular)) + var/obj/machinery/computer/modular/modular_machine = computer.holder + computer.copy_between_disks(href_list["PRG_copytousb"], computer.get_component(PART_HDD), modular_machine.portable_drive) + else + computer.copy_between_disks(href_list["PRG_copytousb"], computer.get_component(PART_HDD), computer.get_component(PART_DRIVE)) + if(href_list["PRG_copyfromusb"]) + . = TOPIC_HANDLED + if(istype(computer.holder, /obj/machinery/computer/modular)) + var/obj/machinery/computer/modular/modular_machine = computer.holder + computer.copy_between_disks(href_list["PRG_copyfromusb"], modular_machine.portable_drive, computer.get_component(PART_HDD)) + else + computer.copy_between_disks(href_list["PRG_copyfromusb"], computer.get_component(PART_DRIVE), computer.get_component(PART_HDD)) + if(href_list["PRG_closefile"]) + . = TOPIC_HANDLED + open_file = null + error = null + if(href_list["PRG_edit"]) + . = TOPIC_HANDLED + if(!open_file) + return + var/datum/computer_file/data/F = computer.get_file(open_file) + if(!istype(F)) + return + if(F.do_not_edit && (alert("WARNING: This file is not compatible with editor. Editing it may result in permanently corrupted formatting or damaged data consistency. Edit anyway?", "Incompatible File", "No", "Yes") == "No")) + return + if(F.read_only) + error = "This file is read only. You cannot edit it." + return + + var/oldtext = html_decode(F.stored_data) + oldtext = replacetext(oldtext, "\[br\]", "\n") + + var/newtext = sanitize(replacetext(input(usr, "Editing file [open_file]. You may use most tags used in paper formatting:", "Text Editor", oldtext) as message|null, "\n", "\[br\]"), MAX_TEXTFILE_LENGTH) + if(!newtext) + return + + computer.update_data_file(F.filename, newtext, F.type, replace_content = TRUE) + if(href_list["PRG_printfile"]) + . = TOPIC_HANDLED + if(!open_file) + return + var/datum/computer_file/data/F = computer.get_file(open_file) + var/datum/computer_file/binary/photo/P = computer.get_file(open_file) + var/datum/computer_file/data/bodyscan/B = computer.get_file(open_file) + if(istype(B)) + if(!computer.print_bodyscan()) + error = "Hardware error: Unable to print the file." + return + else + var/obj/item/paper/bodyscan/paper = new /obj/item/paper/bodyscan(usr.loc, "Printout error.", "Body scan report - [B.filename]", B.generate_print_data()) + paper.metadata = B.stored_data + else if(istype(F)) + if(!computer.print_paper(F.generate_file_data(),F.filename,F.papertype, F.metadata)) + error = "Hardware error: Unable to print the file." + return + if(istype(P)) + if(!computer.print_photo(P.photo, P.filename)) + error = "Hardware error: Unable to print the photo." + return + if(.) + SSnano.update_uis(NM) diff --git a/mods/RnD/code/rdconsole.dm b/mods/RnD/code/rdconsole.dm index f2e83dbcf503d..e1aa895d09c32 100644 --- a/mods/RnD/code/rdconsole.dm +++ b/mods/RnD/code/rdconsole.dm @@ -491,7 +491,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, var/list/known_designs = list() for(var/i in files.known_designs) var/datum/design/D = i - if(!(D.starts_unlocked && !(D.build_type & (BIOPRINTER)))) + if(!(D.starts_unlocked)) // doesn't make much sense to copy starting designs around, unless you can use them in lathes known_designs += list(list("name" = D.name, "id" = "\ref[D]")) data["known_designs"] = known_designs @@ -667,12 +667,8 @@ won't update every console in existence) but it's more of a hassle to do. Also, build_types += "imprinter" if(D.build_type & PROTOLATHE) build_types += "protolathe" - if(D.build_type & BIOPRINTER) - build_types += "bioprinter" if(D.build_type & MECHFAB) build_types += "exosuit fabricator" - if(D.build_type & ORGAN_GROWER) - build_types += "organ grower" var/list/unlock_data = list( "text" = "[D.shortname]", )