Shell May Cry: A comprehensive rework of synthetics. (#20721)

https://www.youtube.com/watch?v=9mPvZ96pHJI

A pull request commissioned by the Synthetic Lore Team to
comprehensively rework synthetics (read: IPCs) and how they work in
Aurora. The objective is to make IPCs as unique as possible from humans,
upgrading the robotic feel and atmosphere, while also preserving a good
sense of balance in-game.

Key features:

- A comprehensive expansion of synthetic organs, all of which now
fulfill a purpose: hydraulics, cooling units, power systems, actuators,
diagnostics units.
- Customizable organs with benefits and drawbacks, such as with cooling
units and power systems.
- Unique ways to repair the organs and more involved steps.
- Unique damage mechanics - every organ has wiring and electronics which
affect its functioning, and they are defended by plating which provides
natural armour.
- Improved and immersive diagnostics.
- Unique features, benefits, and drawbacks for every IPC frame.
- A rework of the positronic brain, which can be either destroyed or
shut down, alongside effects caused by low integrity.
- A rework of how EMPs affect IPC organs.
- Non-binary damage states for each organ.

To-do:

- [x] Finish the unique features for each frame.
- [x] Look into if mechanical synthskin is possible.
- [x] Power system.
- [x] Posibrain mechanics.
- [ ] Passive cooling expansion.
- [x] EMP mechanics.
- [x] Repair mechanics.
- [x] Mob weight mechanics.
- [ ] Gurney for heavy mobs.
- [x] New augments.
- [ ] IPC tag scanning and flashing.

---------

Signed-off-by: Werner <1331699+Arrow768@users.noreply.github.com>
Co-authored-by: Matt Atlas <liermattia@gmail.com>
Co-authored-by: Geeves <22774890+Geevies@users.noreply.github.com>
Co-authored-by: Werner <1331699+Arrow768@users.noreply.github.com>
This commit is contained in:
Matt Atlas
2025-12-21 17:26:23 +01:00
committed by GitHub
parent 1898ad3417
commit e0aa218843
201 changed files with 5962 additions and 896 deletions
@@ -78,6 +78,18 @@
return
found = TRUE
flashlight = H
else if(istype(H, /obj/item/computer_hardware/universal_port))
if(universal_port)
to_chat(user, SPAN_WARNING("\The [src]'s port slot is already occupied by \the [universal_port]."))
return
found = TRUE
universal_port = H
else if(istype(H, /obj/item/computer_hardware/access_cable_dongle))
if(access_cable_dongle)
to_chat(user, SPAN_WARNING("\The [src]'s port slot is already occupied by \the [access_cable_dongle]."))
return
found = TRUE
access_cable_dongle = H
if(found)
to_chat(user, SPAN_NOTICE("You install \the [H] into \the [src]."))
H.parent_computer = src
@@ -128,6 +140,12 @@
personal_ai.pai.parent_computer = null
update_icon()
personal_ai = null
else if(universal_port == H)
universal_port = null
found = TRUE
else if(access_cable_dongle == H)
access_cable_dongle = null
found = TRUE
if(found)
if(user)
@@ -165,6 +183,10 @@
return tesla_link
if(flashlight && initial(flashlight.name) == name)
return flashlight
if(universal_port && initial(universal_port.name) == name)
return universal_port
if(access_cable_dongle && initial(access_cable_dongle.name) == name)
return access_cable_dongle
return null
// Returns list of all components
@@ -192,4 +214,8 @@
all_components.Add(tesla_link)
if(flashlight)
all_components.Add(flashlight)
if(universal_port)
all_components.Add(universal_port)
if(access_cable_dongle)
all_components.Add(access_cable_dongle)
return all_components
@@ -189,6 +189,14 @@
if(response == "Yes")
turn_on(user)
/obj/item/modular_computer/attack_ranged(mob/user, params)
. = ..()
if(ishuman(user) && isipc(user))
var/mob/living/carbon/human/robot = user
var/obj/item/organ/internal/machine/wireless_access/wireless_access_point = robot.internal_organs_by_name[BP_WIRELESS_ACCESS]
if(wireless_access_point?.access_terminal(src))
attack_hand(user)
/obj/item/modular_computer/attack_hand(var/mob/user)
if(anchored)
return attack_self(user)
@@ -321,6 +329,20 @@
return TRUE
uninstall_component(user, H)
return TRUE
if(istype(attacking_item, /obj/item/access_cable))
var/obj/item/access_cable/access_cable = attacking_item
if(!universal_port)
to_chat(user, SPAN_WARNING("There isn't a port to slot \the [access_cable] into!"))
return
if(universal_port.access_cable)
to_chat(user, SPAN_WARNING("There's already a cable in the universal port!"))
return
if(do_after(user, 1 SECONDS))
visible_message(SPAN_NOTICE("[user] slots \the [access_cable] into \the [src]."))
universal_port.insert_cable(access_cable, user)
return ..()
/obj/item/modular_computer/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
@@ -47,6 +47,8 @@
data["PC_stationdate"] = "[time2text(world.realtime, "DDD, Month DD")], [GLOB.game_year]"
data["PC_showexitprogram"] = !!active_program
data["PC_haslight"] = !!flashlight
data["PC_hascable"] = !!access_cable_dongle
data["PC_cableout"] = access_cable_dongle?.access_cable?.loc == access_cable_dongle ? FALSE : TRUE
data["PC_lighton"] = flashlight?.enabled ? TRUE : FALSE
data["PC_programheaders"] = list()
if(idle_threads.len)
@@ -146,6 +148,13 @@
if(flashlight)
flashlight.toggle()
. = TRUE
if(action == "PC_takecable")
if(access_cable_dongle && access_cable_dongle.access_cable)
if(access_cable_dongle.access_cable.loc == access_cable_dongle)
access_cable_dongle.take_cable(usr)
else
access_cable_dongle.access_cable.retract()
. = TRUE
if(action == "PC_shutdown")
shutdown_computer()
return TRUE
@@ -190,6 +199,11 @@
update_icon()
/obj/item/modular_computer/ui_status(mob/user, datum/ui_state/state)
if(universal_port?.access_cable)
if(istype(universal_port.access_cable.source, /obj/item/organ/internal/machine/access_port))
var/obj/item/organ/internal/machine/access_port/port = universal_port.access_cable.source
if(user == port.owner)
return UI_INTERACTIVE
. = ..()
if(. < UI_INTERACTIVE)
if(user.machine)
@@ -125,6 +125,10 @@
var/obj/item/computer_hardware/tesla_link/tesla_link
/// Personal AI, can control the device via a verb when installed
var/obj/item/device/paicard/personal_ai
/// The universal port. Allows connection from IPCs through access cables.
var/obj/item/computer_hardware/universal_port/universal_port
/// The access cable dongle. Allows the computer to have its very own access cable.
var/obj/item/computer_hardware/access_cable_dongle/access_cable_dongle
var/obj/item/computer_hardware/flashlight/flashlight
var/listener/listener
@@ -15,6 +15,7 @@
hard_drive = new /obj/item/computer_hardware/hard_drive/super(src)
network_card = new /obj/item/computer_hardware/network_card/wired(src)
nano_printer = new /obj/item/computer_hardware/nano_printer(src)
universal_port = new /obj/item/computer_hardware/universal_port(src)
/obj/item/modular_computer/console/preset/install_default_programs()
..()
@@ -140,6 +141,7 @@
/obj/item/modular_computer/console/preset/supply/machinist/install_default_hardware()
..()
ai_slot = new /obj/item/computer_hardware/ai_slot(src)
access_cable_dongle = new /obj/item/computer_hardware/access_cable_dongle(src)
// ERT
/obj/item/modular_computer/console/preset/ert/install_default_hardware()
@@ -18,6 +18,7 @@
nano_printer.max_paper = 10
nano_printer.stored_paper = 5
tesla_link = new /obj/item/computer_hardware/tesla_link/charging_cable(src)
universal_port = new /obj/item/computer_hardware/universal_port(src)
// the laptop in the modular computer loadout
/obj/item/modular_computer/laptop/preset/loadout/install_default_hardware()
@@ -122,6 +123,15 @@
desc = "A portable computer belonging to the operation's manager."
_app_preset_type = /datum/modular_computer_app_presets/supply/om
/obj/item/modular_computer/laptop/preset/supply/robotics
name = "robotics laptop"
desc = "A portable computer with support for specialized robotics software."
_app_preset_type = /datum/modular_computer_app_presets/supply/machinist
/obj/item/modular_computer/laptop/preset/supply/robotics/install_default_hardware()
..()
access_cable_dongle = new /obj/item/computer_hardware/access_cable_dongle(src)
// Representative
/obj/item/modular_computer/laptop/preset/representative
name = "representative's laptop"
@@ -8,6 +8,7 @@
tesla_link = new/obj/item/computer_hardware/tesla_link(src)
hard_drive = new/obj/item/computer_hardware/hard_drive(src)
network_card = new/obj/item/computer_hardware/network_card(src)
universal_port = new /obj/item/computer_hardware/universal_port(src)
/obj/item/modular_computer/telescreen/preset/generic
_app_preset_type = /datum/modular_computer_app_presets/wall_generic
@@ -83,7 +83,6 @@
. = ..()
program_list += list(/datum/computer_file/program/comm, /datum/computer_file/program/records/employment)
/*##########################
BRIDGE CREW PRESETS
##########################*/
@@ -273,7 +272,7 @@
/datum/modular_computer_app_presets/supply/machinist/New()
. = ..()
program_list += list(/datum/computer_file/program/records/medical, /datum/computer_file/program/scanner/science)
program_list += list(/datum/computer_file/program/records/medical, /datum/computer_file/program/scanner/science, /datum/computer_file/program/robotics)
//Machinist is the bastard child of supply/operation, it doesn't have access to shit essentially
program_list -= list(/datum/computer_file/program/civilian/cargocontrol, /datum/computer_file/program/civilian/cargodelivery, /datum/computer_file/program/away_manifest)
@@ -0,0 +1,101 @@
/datum/computer_file/program/robotics
filename = "robotics"
filedesc = "Robotics Interface"
program_icon_state = "ai-fixer-empty"
program_key_icon_state = "teal_key"
extended_desc = "A program made to interface with positronics."
size = 14
requires_access_to_run = PROGRAM_ACCESS_LIST_ONE
required_access_run = list(ACCESS_RESEARCH, ACCESS_ROBOTICS)
required_access_download = list(ACCESS_RESEARCH, ACCESS_ROBOTICS)
available_on_ntnet = FALSE
tgui_id = "RoboticsComputer"
/// The diagnostics module associated with this program.
var/datum/tgui_module/ipc_diagnostic/diagnostic
/datum/computer_file/program/robotics/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
. = ..()
if(!ishuman(ui.user))
return
var/mob/living/carbon/human/user = ui.user
if(action == "run_diagnostics")
if(computer.access_cable_dongle && computer.access_cable_dongle.access_cable)
var/mob/living/carbon/human/synthetic = computer.access_cable_dongle.access_cable.target
if(istype(user) && istype(synthetic))
ui.user.visible_message(SPAN_NOTICE("[user] begins running a diagnostic scan..."))
if(do_after(user, 3 SECONDS))
diagnostic = new(user, synthetic)
return TRUE
if(action == "open_diagnostic")
if(computer.access_cable_dongle && computer.access_cable_dongle.access_cable)
if(istype(diagnostic))
if(diagnostic.patient != computer.access_cable_dongle.access_cable.target)
to_chat(user, SPAN_WARNING("This diagnostic is no longer valid and has been deleted."))
qdel(diagnostic)
return TRUE
var/mob/living/carbon/human/synthetic = computer.access_cable_dongle.access_cable.target
if(istype(user) && istype(synthetic))
diagnostic.ui_interact(user)
return TRUE
/datum/computer_file/program/robotics/ui_data(mob/user)
var/list/data = list()
var/mob/living/carbon/human/ipc
if(computer.access_cable_dongle && computer.access_cable_dongle.access_cable)
var/obj/item/organ/internal/machine/access_port/port = computer.access_cable_dongle.access_cable.target
if(istype(port))
ipc = port.owner
if(isipc(ipc))
var/datum/species/machine/machine_species = ipc.species // need to manually set to ipc species because of machine_ui_theme
data["patient_name"] = ipc.real_name
data["temp"] = round(convert_k2c(ipc.bodytemperature))
data["machine_ui_theme"] = machine_species.machine_ui_theme
data["organs"] = list()
for(var/obj/item/organ/internal/organ in ipc.internal_organs)
var/list/organ_data = list()
if(istype(organ, /obj/item/organ/internal/machine))
var/obj/item/organ/internal/machine/machine_organ = organ
if(!machine_organ.diagnostics_suite_visible)
continue
organ_data["wiring_status"] = machine_organ.wiring.get_status()
organ_data["plating_status"] = machine_organ.plating.get_status()
organ_data["electronics_status"] = machine_organ.electronics.get_status()
organ_data["diagnostics_info"] = machine_organ.get_diagnostics_info()
organ_data["name"] = organ.name
organ_data["desc"] = organ.desc
organ_data["damage"] = organ.damage
organ_data["max_damage"] = organ.max_damage
data["organs"] += list(organ_data)
data["robolimb_self_repair_cap"] = ROBOLIMB_SELF_REPAIR_CAP
data["limbs"] = list()
for(var/obj/item/organ/external/limb in ipc.organs)
if(limb.brute_dam || limb.burn_dam)
data["limbs"] += list(list("name" = limb.name, "brute_damage" = limb.brute_dam, "burn_damage" = limb.burn_dam, "max_damage" = limb.max_damage))
var/obj/item/organ/internal/machine/power_core/C = ipc.internal_organs_by_name[BP_CELL]
if(C)
data["charge_percent"] = C.percent()
var/datum/component/synthetic_endoskeleton/endoskeleton = ipc.GetComponent(/datum/component/synthetic_endoskeleton)
if(istype(endoskeleton))
data["endoskeleton_damage"] = endoskeleton.damage
data["endoskeleton_max_damage"] = endoskeleton.max_damage
var/datum/component/armor/synthetic/synth_armor = ipc.GetComponent(/datum/component/armor/synthetic)
if(istype(synth_armor))
data["armor_data"] = list()
var/list/armor_damage = synth_armor.get_visible_damage()
for(var/key in armor_damage)
data["armor_data"] += list(list("key" = key, "status" = armor_damage[key]))
return data
@@ -0,0 +1,44 @@
/obj/item/computer_hardware/access_cable_dongle
name = "access cable dongle"
desc = "A dongle from which a positronic-compatible cable can be extended."
critical = FALSE
icon_state = "aislot"
hardware_size = 3
/// The access cable currently inserted into this slot.
var/obj/item/access_cable/access_cable
/obj/item/computer_hardware/access_cable_dongle/Initialize()
. = ..()
access_cable = new(src, src, parent_computer)
/obj/item/computer_hardware/access_cable_dongle/Destroy()
if(access_cable)
access_cable.retract()
QDEL_NULL(access_cable)
return ..()
/obj/item/computer_hardware/access_cable_dongle/proc/take_cable(mob/user)
if(!ishuman(user))
return
var/mob/living/carbon/human/H = user
if(use_check_and_message(H))
return
if(!access_cable)
to_chat(H, SPAN_WARNING("This table does not have an access cable anymore!"))
return
if(H.get_active_hand())
to_chat(H, SPAN_WARNING("You need a free hand to retrieve \the [access_cable]!"))
return
if(access_cable.loc != src)
to_chat(H, SPAN_WARNING("The access cable is already elsewhere!"))
return
H.visible_message(SPAN_NOTICE("[H] retrieves \the [access_cable] from \the [src]."), SPAN_NOTICE("You retrieve \the [access_cable] from \the [src]."))
access_cable.create_cable(H)
H.put_in_active_hand(access_cable)
@@ -1,4 +1,4 @@
/obj/item/computer_hardware/
/obj/item/computer_hardware
name = "Hardware"
desc = "Unknown Hardware."
icon = 'icons/obj/modular_components.dmi'
@@ -0,0 +1,29 @@
/obj/item/computer_hardware/universal_port
name = "universal port"
desc = "A small, universal slot wherein an access cable can be slotted in."
critical = FALSE
icon_state = "aislot"
hardware_size = 3
/// The access cable currently inserted into this slot.
var/obj/item/access_cable/access_cable
/obj/item/computer_hardware/universal_port/Destroy()
if(access_cable)
access_cable.retract()
access_cable = null
return ..()
/obj/item/computer_hardware/universal_port/remove_cable(obj/item/access_cable/cable)
..()
access_cable = null
/obj/item/computer_hardware/universal_port/insert_cable(obj/item/access_cable/cable, mob/user)
. = ..()
access_cable = cable
cable.create_cable(parent_computer)
/obj/item/computer_hardware/universal_port/cable_interact(obj/item/access_cable/cable, mob/user)
. = ..()
if(parent_computer)
parent_computer.attack_self(user)