Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
74afd1d
wingman
liermattia Jan 12, 2025
3238598
this is either the most stupid idea ever or an all timer
liermattia Jan 16, 2025
9386a96
Merge remote-tracking branch 'Aurora/master' into whereabouts_of_the_…
liermattia Feb 22, 2025
7abf68e
turns out it was really dumb but we can salvage this
liermattia Feb 22, 2025
09d3de0
cooling unit beginning
liermattia Mar 3, 2025
8fa0cdd
Merge remote-tracking branch 'Aurora/master' into whereabouts_of_the_…
liermattia Mar 6, 2025
803c78a
shadows on the walls
liermattia Mar 11, 2025
6785c80
bishop internal pda and ranged interact (it's probably shitcode)
liermattia Mar 23, 2025
09a4d27
Merge remote-tracking branch 'Aurora/master' into whereabouts_of_the_…
liermattia Apr 6, 2025
00a4da3
not entirely sold on damage this diversified
liermattia Apr 6, 2025
17bcfec
that temperature code's gonna be the death of me
liermattia Apr 6, 2025
5a03090
cooling unit v1
liermattia Apr 9, 2025
d11a1fc
cooling unit v2
liermattia Apr 9, 2025
9515899
final cooling unit work, synthetic internals update, plating update, …
liermattia Apr 18, 2025
dc7b3f3
more stuff
liermattia Apr 18, 2025
694e35f
i swear this is probably the final tweak to the cooling unit
liermattia Apr 18, 2025
9aac5a5
quality pass
liermattia Apr 18, 2025
a406aaf
oh right, we don't use that anymore
liermattia Apr 18, 2025
c9065ee
Merge remote-tracking branch 'Aurora/master' into whereabouts_of_the_…
liermattia Apr 18, 2025
f08593e
lint
liermattia Apr 18, 2025
e22af12
power unit v1 and preset refactor
liermattia Apr 29, 2025
f4d5d27
make it compile and change a few things
liermattia Apr 29, 2025
68c4ba7
superfluous code removal
liermattia Apr 29, 2025
86e97f2
surge protector define
liermattia Apr 29, 2025
2b28a6d
power core v2
liermattia May 2, 2025
9404f73
weight, reactor updates
liermattia May 7, 2025
1cf678b
internal storage, bio reactor
liermattia May 13, 2025
d8af630
bioreactor fixes
liermattia May 15, 2025
238781d
some more cleanup
liermattia May 15, 2025
d7ad71f
safeties, beginning of posibrain code (temperature as damage?)
liermattia May 18, 2025
4f8c4ad
standardize probabilities, cooling unit update
liermattia May 19, 2025
0e691e7
access ports part 1
liermattia May 23, 2025
a6893a9
porting cm tethers would've been easier but i like a challenge
liermattia May 24, 2025
cc69896
part 1 of actually using access cable (it's kinda shit)
liermattia May 28, 2025
bc1da0e
yeah okay that's probably better
liermattia May 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion aurorastation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
#include "code\__DEFINES\dcs\signals\signals_atom\signals_atom_movement.dm"
#include "code\__DEFINES\dcs\signals\signals_atom\signals_atom_x_act.dm"
#include "code\__DEFINES\dcs\signals\signals_atom\signals_power_cell.dm"
#include "code\__DEFINES\dcs\signals\signals_mob\signals_mob_human.dm"
#include "code\__DEFINES\dcs\signals\signals_mob\signals_mob_living.dm"
#include "code\__DEFINES\dcs\signals\signals_mob\signals_mob_main.dm"
#include "code\__DEFINES\dcs\signals\signals_object\signals_object.dm"
Expand Down Expand Up @@ -470,7 +471,8 @@
#include "code\datums\components\drift.dm"
#include "code\datums\components\local_network.dm"
#include "code\datums\components\orbiter.dm"
#include "code\datums\components\armor\armor.dm"
#include "code\datums\components\armor\_armor.dm"
#include "code\datums\components\armor\synthetic_armor.dm"
#include "code\datums\components\base_name\base_name.dm"
#include "code\datums\components\eye\_eye.dm"
#include "code\datums\components\eye\blueprints.dm"
Expand Down Expand Up @@ -562,6 +564,10 @@
#include "code\datums\scenarios\scenario.dm"
#include "code\datums\state_machine\state.dm"
#include "code\datums\state_machine\transition.dm"
#include "code\datums\synthetic_internals\_synthetic_internals.dm"
#include "code\datums\synthetic_internals\electronics.dm"
#include "code\datums\synthetic_internals\plating.dm"
#include "code\datums\synthetic_internals\wiring.dm"
#include "code\datums\tips\tips.dm"
#include "code\datums\trading\_trading_defines.dm"
#include "code\datums\trading\ai.dm"
Expand Down Expand Up @@ -3032,6 +3038,25 @@
#include "code\modules\organs\internal\species\tajara.dm"
#include "code\modules\organs\internal\species\unathi.dm"
#include "code\modules\organs\internal\species\vaurca.dm"
#include "code\modules\organs\internal\species\machine\_generic.dm"
#include "code\modules\organs\internal\species\machine\_presets.dm"
#include "code\modules\organs\internal\species\machine\access_port.dm"
#include "code\modules\organs\internal\species\machine\actuators.dm"
#include "code\modules\organs\internal\species\machine\battery.dm"
#include "code\modules\organs\internal\species\machine\cooling_unit.dm"
#include "code\modules\organs\internal\species\machine\cooling_unit_presets.dm"
#include "code\modules\organs\internal\species\machine\data_core.dm"
#include "code\modules\organs\internal\species\machine\hydraulics.dm"
#include "code\modules\organs\internal\species\machine\internal_diagnostics.dm"
#include "code\modules\organs\internal\species\machine\internal_storage.dm"
#include "code\modules\organs\internal\species\machine\ipc_tag.dm"
#include "code\modules\organs\internal\species\machine\optical_sensor.dm"
#include "code\modules\organs\internal\species\machine\posibrain.dm"
#include "code\modules\organs\internal\species\machine\reactor.dm"
#include "code\modules\organs\internal\species\machine\reactor_presets.dm"
#include "code\modules\organs\internal\species\machine\surge_protector.dm"
#include "code\modules\organs\internal\species\machine\voice_synthesizer.dm"
#include "code\modules\organs\internal\species\machine\wireless_access.dm"
#include "code\modules\organs\subtypes\autakh.dm"
#include "code\modules\organs\subtypes\diona.dm"
#include "code\modules\organs\subtypes\industrial.dm"
Expand Down Expand Up @@ -3736,6 +3761,7 @@
#include "code\modules\tgui\modules\armor_values.dm"
#include "code\modules\tgui\modules\flavor_text.dm"
#include "code\modules\tgui\modules\hivenet_manifest.dm"
#include "code\modules\tgui\modules\ipc_diagnostic.dm"
#include "code\modules\tgui\states\admin.dm"
#include "code\modules\tgui\states\always.dm"
#include "code\modules\tgui\states\conscious.dm"
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_human.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
///from datum/species/machine/handle_sprint_cost()
#define COMSIG_IPC_HAS_SPRINTED "ipc_sprinted"
56 changes: 56 additions & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,22 @@
#define BP_CELL "cell"
#define BP_OPTICS "optics"
#define BP_IPCTAG "ipc tag"
#define BP_REACTOR "reactor"
#define BP_VOICE_SYNTHESIZER "voice synthesizer"
#define BP_DIAGNOSTICS_SUITE "internal diagnostics suite"
#define BP_HYDRAULICS "hydraulics system"
#define BP_COOLING_UNIT "cooling unit"
#define BP_ACCESS_PORT "universal access portt"
#define BP_ACTUATORS_LEFT "left arm actuators"
#define BP_ACTUATORS_RIGHT "right arm actuators"
#define BP_SURGE_PROTECTOR "surge"
#define BP_DATACORE "data core"

// Bishop frame only.
#define BP_WIRELESS_ACCESS "wireless access point"

// G2 frame only.
#define BP_INTERNAL_STORAGE "internal storage system"

// Parasite organs
#define BP_ZOMBIE_PARASITE "black tumour"
Expand Down Expand Up @@ -281,6 +297,24 @@
#define MOB_TINY 4
#define MOB_MINISCULE 1

// Mob weight, separate from mob size. Affects how easy a mob is to lift.
/// Light mobs, can be lifted by anyone.
#define MOB_WEIGHT_LIGHT 1
/// Medium weight mobs, the default for humanoids. Can be lifted by medium+.
#define MOB_WEIGHT_MEDIUM 2
/// Heavy mobs. They need speecial equipment or a heavy+ mob to lift.
#define MOB_WEIGHT_HEAVY 3
/// Superheavy mobs. Gonna need a lot of help with those.
#define MOB_WEIGHT_SUPERHEAVY 4

// Mob strength. This allows us to represent stronger mobs with a bit more granularity. Robots should be stronger than normal people. A bonus to the checks on lifting/throwing mobs, essentially.
/// A normal mob, basically. Does not get us any buffs.
#define MOB_STRENGTH_NORMAL 0
/// A strong mob. Small bonus.
#define MOB_STRENGTH_STRONG 1
/// A very strong mob. Big bonus.
#define MOB_STRENGTH_VERY_STRONG 2

#define BASE_MAX_NUTRITION 600
#define HUNGER_FACTOR 0.04 // Factor of how fast mob nutrition decreases over time.

Expand Down Expand Up @@ -550,3 +584,25 @@
#define DO_MISSING_TARGET (-2)
#define DO_INCAPACITATED (-3)
#define DO_EXTRA_CHECKS (-4)

// Threshold defines for integrity damage. Used for when you want to check for a specific threshold to do damage effects.

#define IPC_INTEGRITY_THRESHOLD_LOW 75
#define IPC_INTEGRITY_THRESHOLD_MEDIUM 50
#define IPC_INTEGRITY_THRESHOLD_HIGH 25
#define IPC_INTEGRITY_THRESHOLD_VERY_HIGH 10

// These are the power supply organ defines.
// They are bitflags because it should be technically possible to have a power supply do multiple things at once if you wish.
// Just be wary of balancing issues.

/// The default functioning of a power reactor. Externally powered only. Allows recharging from APCs. Has a multiplier for faster recharging from power stations.
#define POWER_SUPPLY_ELECTRIC 1
/// Recharges by walking/running. Far slower at charging from external sources.
#define POWER_SUPPLY_KINETIC 2
/// Recharges through consuming nutrients/food. Slower at recharging from external sources.
#define POWER_SUPPLY_BIOLOGICAL 4
/// Recharges from external lighting. Slower at recharging from external sources.
#define POWER_SUPPLY_SOLAR 8


16 changes: 16 additions & 0 deletions code/__DEFINES/prefs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,19 @@
/// Internal organ. Removed, used for appendixes.
#define ORGAN_PREF_REMOVED "removed"
/// Note that a "normal" limb or organ has no pref, so there's no define for it.

/// Air cooling. Technically not used, but we need this for the linked lists in cooling_unit.dm.
#define ORGAN_PREF_AIRCOOLED "air"
/// Liquid cooling. For IPC cooling units. Default is air cooling.
#define ORGAN_PREF_LIQUIDCOOLED "liquid"
/// Passive cooling. For IPC cooling units. Default is air cooling.
#define ORGAN_PREF_PASSIVECOOLED "passive"

/// Externally powered only. Technically not used, but we need this for the linked lists in reactor.dm.
#define ORGAN_PREF_ELECTRICPOWER "electric"
/// Biological power reactor. Nutrients, food, etc.
#define ORGAN_PREF_BIOPOWER "biological"
/// Kinetic power reactor. Walking, running.
#define ORGAN_PREF_KINETICPOWER "kinetic"
/// Solar powered. Stand in the sun. Or LED lights. It's the future, fuck you.
#define ORGAN_PREF_SOLARPOWER "solar"
2 changes: 2 additions & 0 deletions code/__DEFINES/span.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#define SPAN_CAUTION(str) ("<span class='caution'>" + str + "</span>")
#define SPAN_STORYTELLER(str) ("<span class='storyteller'>" + str + "</span>")

#define SPAN_MACHINE_WARNING(str) ("<span class='machine-warning'>" + str + "</span>")

#define SPAN_RED(str) "<span style='color:[COLOR_RED]'>[str]</span>"
#define SPAN_YELLOW(str) "<span style='color:[COLOR_YELLOW]'>[str]</span>"
#define SPAN_GREEN(str) "<span style='color:[COLOR_GREEN]'>[str]</span>"
Expand Down
2 changes: 0 additions & 2 deletions code/__DEFINES/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,3 @@
SPECIES_IPC_UNBRANDED, SPECIES_IPC_UNBRANDED_REMOTE, SPECIES_IPC_XION, SPECIES_IPC_ZENGHU, \
SPECIES_IPC_SHELL_ROGUE, SPECIES_IPC_XION_REMOTE, SPECIES_IPC_PURPOSE_HK, \
)


Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@
key = RAD
return key

// Used for natural armor for species.
/datum/component/armor/natural
full_block_message = "Your natural armor blocks the blow!"
partial_block_message = "Your natural armor softens the blow!"

/datum/component/armor/toggle
var/active = TRUE

Expand Down
3 changes: 3 additions & 0 deletions code/datums/components/armor/synthetic_armor.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/datum/component/armor/synthetic
full_block_message = "Your external plating absorbs the blow!"
partial_block_message = "Your external plating dulls the blow!"
2 changes: 1 addition & 1 deletion code/datums/outfits/outfit_antag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
U.hidden_uplink.bluecrystals = round(uplink_uses / 2)
U.hidden_uplink.tgui_menu = 1
if(isipc(H))
var/obj/item/organ/internal/ipc_tag/tag = H.internal_organs_by_name[BP_IPCTAG]
var/obj/item/organ/internal/machine/ipc_tag/tag = H.internal_organs_by_name[BP_IPCTAG]
if(istype(tag))
tag.modify_tag_data(TRUE)

Expand Down
2 changes: 1 addition & 1 deletion code/datums/repositories/crew.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ GLOBAL_DATUM_INIT(crew_repository, /datum/repository/crew, new())
crewmemberData["pulse"] = H.get_pulse(GETPULSE_TOOL)
else
if(isipc(H) && H.internal_organs_by_name[BP_IPCTAG]) // Don't make untagged IPCs obvious
var/obj/item/organ/internal/cell/cell = H.internal_organs_by_name[BP_CELL]
var/obj/item/organ/internal/machine/cell/cell = H.internal_organs_by_name[BP_CELL]
if(cell)
crewmemberData["cellCharge"] = cell.percent()

Expand Down
66 changes: 66 additions & 0 deletions code/datums/synthetic_internals/_synthetic_internals.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// Synthetic internals represent things that are not physically modelled as an organ, but are rather part of the organ.
// That means wiring, plating, and electronics. Damaging organs has adverse effects on these components.
// The goal is to emulate damaging effects similar to arterial bleeding, infections, etc. on organics.

// The specific effects of each synthetic internal can vary organ by organ. They all have different health measurements as well.
// These measurements can change depending on the organ they are attached to.

/datum/synthetic_internal
/// The name of the internal component. Shows up in analysis tools.
var/name = "default synthetic internal"
/// The description. Shows up in analysis tools.
var/desc = "A default synthetic internal component."
/// The organ this synthetic internal belongs to.
var/obj/item/organ/internal/machine/organ

/datum/synthetic_internal/New(obj/item/organ/internal/machine/attached_organ)
. = ..()
if(istype(attached_organ))
if(isipc(attached_organ.owner))
organ = attached_organ
else
LOG_DEBUG("Synthetic internal [type] generated on organ [attached_organ] with invalid owner [attached_organ.owner]. Aborting.")
qdel(src)
else
LOG_DEBUG("Synthetic internal [type] generated on invalid organ [attached_organ]. Aborting.")
qdel(src)

/datum/synthetic_internal/Destroy(force)
organ = null
return ..()

/**
* The proc that handles taking damage. As some components take damage differently,
* this is overridden by them.
*/
/datum/synthetic_internal/proc/take_damage(amount)
return

/**
* This proc returns the status of this synthetic internal as a percentage.
* It will return 100 if the component is 100% healthy, a value between 0 and 100 if not, and 0 if broken.
* This logic can be overridden for custom behaviour.
*/
/datum/synthetic_internal/proc/get_status()
return

/**
* This proc returns the status of this internal component, but imprecisely.
* Basically what could be obvious at an eye-glance.
*/
/datum/synthetic_internal/proc/analyse_integrity_imprecise()
return

/**
* This proc returns the status of this internal component, but precisely.
* Basically the results of an in-depth analysis with an appropriate tool.
*/
/datum/synthetic_internal/proc/analyze_integrity_precise()
return

/**
* Replaces the health by setting a new max health and setting the health to the new max_health value.
* Needs to be overridden on every subtype.
*/
/datum/synthetic_internal/proc/replace_health(new_max_health)
return
17 changes: 17 additions & 0 deletions code/datums/synthetic_internals/electronics.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// The synthetic's electronics. Represents both the hardware and software component.
// The integrity of electronics only goes from 0% to 100%. It does not vary, unlike other components.

/datum/synthetic_internal/electronics
name = "internal electronics"
desc = "The electronics and the code responsible for many internal functions."
/// The maximum integrity percentage of the internals. Represents code coherence and physical damage.
var/max_integrity = 100
/// The integrity of the internals in percentage. Represents code coherence and physical damage.
var/integrity = 100

/datum/synthetic_internal/electronics/get_status()
return (integrity / max_integrity) * 100

/datum/synthetic_internal/electronics/take_damage(amount)
// Integrity is really slow to damage. Hacking does a way better job than just shooting the thing.
integrity = max(integrity - (amount * 0.75), 0)
19 changes: 19 additions & 0 deletions code/datums/synthetic_internals/plating.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// The synthetic organ's plating. Represents its natural armour, which will degrade as it's damaged.

/datum/synthetic_internal/plating
name = "internal steel plating"
desc = "The steel plating that keeps internal components safe and sound from the exterior."
/// The maximum health of the organ's plating. Represents... you know, the plating.
var/max_health = 50
/// The health of the organ's plating. Represents... you know, the plating.
var/health = 50

/datum/synthetic_internal/plating/take_damage(amount)
health = max(health - amount, 0)

/datum/synthetic_internal/plating/get_status()
return (health / max_health) * 100

/datum/synthetic_internal/plating/replace_health(new_max_health)
max_health = new_max_health
health = new_max_health
17 changes: 17 additions & 0 deletions code/datums/synthetic_internals/wiring.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// The synthetic's wiring. Represents the fragile connections between organs and limbs.

/datum/synthetic_internal/wiring
name = "internal wiring"
desc = "The wiring that connects components together and allows them to talk to eachother."
/// The maximum wires on this organ. Wires represent physical connections between components. They are less plentiful than plating, but they are worse to lose.
var/max_wires = 15
/// The wires left on this organ. Wires represent physical connections between components. They are less plentiful than plating, but they are worse to lose.
var/wires = 15

/datum/synthetic_internal/wiring/get_status()
return (wires / max_wires) * 100

/datum/synthetic_internal/wiring/take_damage(amount)
// Not a lot of wires - you can hit some useless ones, or fail.
if(prob(wires * 5))
wires -= max(wires - round(amount / 2), 0)
2 changes: 1 addition & 1 deletion code/game/gamemodes/technomancer/spells/energy_siphon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
if(user.isSynthetic() && ishuman(user)) // Let's do something with it, if we're a robot.
var/mob/living/carbon/human/H = user
charge_to_give = charge_to_give - (core.max_energy - core.energy)
var/obj/item/organ/internal/cell/C = H.internal_organs_by_name[BP_CELL]
var/obj/item/organ/internal/machine/cell/C = H.internal_organs_by_name[BP_CELL]
var/obj/item/cell/potato = C.get_cell()
potato.give(charge_to_give)
to_chat(user, SPAN_NOTICE("Redirected energy to internal microcell."))
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/cryopod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@
var/choice = alert(M, "Would you like to save your tag data?", "Tag Persistence", "Yes", "No")
if(choice == "Yes")
var/mob/living/carbon/human/H = M
var/obj/item/organ/internal/ipc_tag/tag = H.internal_organs_by_name[BP_IPCTAG]
var/obj/item/organ/internal/machine/ipc_tag/tag = H.internal_organs_by_name[BP_IPCTAG]
if(tag)
M.client.prefs.machine_ownership_status = tag.ownership_info
M.client.prefs.machine_serial_number = tag.serial_number
Expand Down
Loading