Skip to content

Commit

Permalink
5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Lexanx committed Jan 29, 2025
1 parent a4161b1 commit a769b68
Show file tree
Hide file tree
Showing 27 changed files with 147 additions and 43 deletions.
2 changes: 0 additions & 2 deletions code/__defines/research.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions code/game/machinery/robotics_fabricator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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."))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion code/modules/events/event_container.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/fabrication/_fabricator.dm
Original file line number Diff line number Diff line change
@@ -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."
Expand Down
2 changes: 1 addition & 1 deletion code/modules/fabrication/fabricator_build.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/* [SIERRA-REMOVE] - MODPACK_RND
/obj/machinery/fabricator/proc/update_current_build(spend_time)
if(!istype(currently_building) || !is_functioning())
Expand Down
2 changes: 1 addition & 1 deletion code/modules/fabrication/fabricator_food.dm
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/fabrication/fabricator_hacked.dm
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/fabrication/fabricator_intake.dm
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/fabrication/fabricator_microlathe.dm
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion code/modules/fabrication/fabricator_topic.dm
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/fabrication/fabricator_ui.dm
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/item_worth/worths_list.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -117,7 +117,7 @@
//[/SIERRA-EDIT]
if(.)
SSnano.update_uis(NM)

*/
/datum/nano_module/program/computer_filemanager
name = "NTOS File Manager"

Expand Down
2 changes: 1 addition & 1 deletion code/modules/research/circuitprinter.dm
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
2 changes: 1 addition & 1 deletion code/modules/research/designs/_designs.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/* [SIERRA-REMOVE] - MODPACK_RND
/***************************************************************
** Design Datums **
** All the data for building stuff and tracking reliability. **
Expand Down
2 changes: 1 addition & 1 deletion code/modules/research/destructive_analyzer.dm
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion code/modules/research/protolathe.dm
Original file line number Diff line number Diff line change
@@ -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."
Expand Down
2 changes: 1 addition & 1 deletion code/modules/research/rdconsole.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ПРОКИ spawn() из коркода ЗАМЕНЕНЫ НА sleep() БУДЬ ВНИМАТЕЛЕН
// ПРОКИ spawn() из коркода ЗАМЕНЕНЫ НА sleep() БУДЬ ВНИМАТЕЛЕН [SIERRA-REMOVE] - MODPACK_RND

/*
#define CHECK_LATHE \
Expand Down
2 changes: 1 addition & 1 deletion code/modules/research/rdmachines.dm
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/research/research.dm
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion code/unit_tests/machine_tests.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion mods/RnD/code/designownloader.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 3 additions & 0 deletions mods/RnD/code/designs_autolathe/designs_general.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
29 changes: 17 additions & 12 deletions mods/RnD/code/event.dm
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
/*

/datum/event/rnd_design_leak
announceWhen = 21

var/list/obj/machinery/vending/vendingMachines = list()
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)
101 changes: 101 additions & 0 deletions mods/RnD/code/itcommand.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 1 addition & 5 deletions mods/RnD/code/rdconsole.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]",
)
Expand Down

0 comments on commit a769b68

Please sign in to comment.