Bodysystem and damagesystem rework (#1544)
* Things and stuff with grids, unfinished w/ code debug changes. * Updated submodule and also lost some progress cause I fucked it up xd * First unfinished draft of the BodySystem. Doesn't compile. * More changes to make it compile, but still just a framework. Doesn't do anything at the moment. * Many cleanup changes. * Revert "Merge branch 'master' of https://github.com/GlassEclipse/space-station-14 into body_system" This reverts commit ddd4aebbc76cf2a0b7b102f72b93d55a0816c88c, reversing changes made to 12d0dd752706bdda8879393bd8191a1199a0c978. * Commit human.yml * Updated a lot of things to be more classy, more progress overall, etc. etc. * Latest update with many changes * Minor changes * Fixed Travis build bug * Adds first draft of Body Scanner console, apparently I also forgot to tie Mechanisms into body parts so now a heart just sits in the Torso like a good boy :) * Commit rest of stuff * Latest changes * Latest changes again * 14 naked cowboys * Yay! * Latest changes (probably doesnt compile) * Surgery!!!!!!!!!~1116y * Cleaned some stuff up * More cleanup * Refactoring of code. Basic surgery path now done. * Removed readme, has been added to HackMD * Fixes typo (and thus test errors) * WIP changes, committing so I can pull latest master changes * Still working on that god awful merge * Latest changes * Latest changes!! * Beginning of refactor to BoundUserInterface * Surgery! * Latest changes - fixes pr change requests and random fixes * oops * Fixes bodypart recursion * Beginning of work on revamping the damage system. * More latest changes * Latest changes * Finished merge * Commit before removing old healthcode * Almost done with removing speciescomponent... * It compiles!!! * yahoo more work * Fixes to make it work * Merge conflict fixes * Deleting species visualizer was a mistake * IDE warnings are VERBOTEN * makes the server not kill itself on startup, some cleanup (#1) * Namespaces, comments and exception fixes * Fix conveyor and conveyor switch serialization SS14 in reactive when * Move damage, acts and body to shared Damage cleanup Comment cleanup * Rename SpeciesComponent to RotationComponent and cleanup Damage cleanup Comment cleanup * Fix nullable warnings * Address old reviews Fix off welder suicide damage type, deathmatch and suspicion * Fix new test fail with units being able to accept items when unpowered * Remove RotationComponent, change references to IBodyManagerComponent * Add a bloodstream to humans * More cleanups * Add body conduits, connections, connectors substances and valves * Revert "Add body conduits, connections, connectors substances and valves" This reverts commit 9ab0b50e6b15fe98852d7b0836c0cdbf4bd76d20. * Implement the heart mechanism behavior with the circulatory network * Added network property to mechanism behaviors * Changed human organ sprites and added missing ones * Fix tests * Add individual body part sprite rendering * Fix error where dropped mechanisms are not initialized * Implement client/server body damage * Make DamageContainer take care of raising events * Reimplement medical scanner with the new body system * Improve the medical scanner ui * Merge conflict fixes * Fix crash when colliding with something * Fix microwave suicides and eyes sprite rendering * Fix nullable reference error * Fix up surgery client side * Fix missing using from merge conflict * Add breathing *inhale * Merge conflict fixes * Fix accumulatedframetime being reset to 0 instead of decreased by the threshold https://github.com/space-wizards/space-station-14/pull/1617 * Use and add to the new AtmosHelpers * Fix feet * Add proper coloring to dropped body parts * Fix Urist's lungs being too strong * Merge conflict fixes * Merge conflict fixes * Merge conflict fixes Co-authored-by: GlassEclipse <tsymall5@gmail.com> Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com> Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com>
This commit is contained in:
93
Resources/Prototypes/Body/Mechanisms/basic_human_organs.yml
Normal file
93
Resources/Prototypes/Body/Mechanisms/basic_human_organs.yml
Normal file
@@ -0,0 +1,93 @@
|
||||
- type: entity
|
||||
parent: BaseDroppedMechanism
|
||||
id: HeartMechanismDebug
|
||||
name: "human heart (debug)"
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Mobs/Species/Human/organs.rsi
|
||||
state: heart-on
|
||||
- type: Icon
|
||||
sprite: Mobs/Species/Human/organs.rsi
|
||||
state: heart-on
|
||||
- type: DroppedMechanism
|
||||
debugLoadMechanismData: mechanism.Heart.BasicHuman
|
||||
behaviors:
|
||||
- Content.Server.Body.Mechanisms.Behaviors.HeartBehavior
|
||||
|
||||
- type: mechanism
|
||||
id: mechanism.Brain.BasicHuman
|
||||
name: "human brain"
|
||||
rsiPath: Mobs/Species/Human/organs.rsi
|
||||
rsiState: "brain_human"
|
||||
description: "The source of incredible, unending intelligence. Honk."
|
||||
durability: 10
|
||||
size: 1
|
||||
compatibility: Biological
|
||||
behaviors:
|
||||
- Content.Server.Body.Mechanisms.Behaviors.BrainBehavior
|
||||
|
||||
- type: mechanism
|
||||
id: mechanism.Eyes.BasicHuman
|
||||
name: "human eyes"
|
||||
rsiPath: Mobs/Species/Human/organs.rsi
|
||||
rsiState: "eyeballs"
|
||||
description: "Ocular organ capable of turning light into a colorful visual."
|
||||
durability: 10
|
||||
size: 1
|
||||
compatibility: Biological
|
||||
|
||||
- type: mechanism
|
||||
id: mechanism.Heart.BasicHuman
|
||||
name: "human heart"
|
||||
rsiPath: Mobs/Species/Human/organs.rsi
|
||||
rsiState: "heart-on"
|
||||
description: "Pumps blood throughout a body. Essential for any entity with blood."
|
||||
durability: 10
|
||||
size: 1
|
||||
compatibility: Biological
|
||||
behaviors:
|
||||
- Content.Server.Body.Mechanisms.Behaviors.HeartBehavior
|
||||
|
||||
- type: mechanism
|
||||
id: mechanism.Lungs.BasicHuman
|
||||
name: "human lungs"
|
||||
rsiPath: Mobs/Species/Human/organs.rsi
|
||||
rsiState: "lungs"
|
||||
description: "Filters oxygen from an atmosphere, which is then sent into the bloodstream to be used as an electron carrier."
|
||||
durability: 13
|
||||
size: 1
|
||||
compatibility: Biological
|
||||
behaviors:
|
||||
- Content.Server.Body.Mechanisms.Behaviors.LungBehavior
|
||||
|
||||
- type: mechanism
|
||||
id: mechanism.Stomach.BasicHuman
|
||||
name: "human stomach"
|
||||
rsiPath: Mobs/Species/Human/organs.rsi
|
||||
rsiState: "stomach"
|
||||
description: "Gross. This is hard to stomach."
|
||||
durability: 13
|
||||
size: 1
|
||||
compatibility: Biological
|
||||
behaviors:
|
||||
- Content.Server.Body.Mechanisms.Behaviors.StomachBehavior
|
||||
|
||||
- type: mechanism
|
||||
id: mechanism.Liver.BasicHuman
|
||||
name: "human liver"
|
||||
rsiPath: Mobs/Species/Human/organs.rsi
|
||||
rsiState: "liver"
|
||||
description: "Filters impurities out of a bloodstream and provides other important functionality to a human."
|
||||
durability: 15
|
||||
size: 1
|
||||
compatibility: Biological
|
||||
|
||||
- type: mechanism
|
||||
id: mechanism.Kidneys.BasicHuman
|
||||
name: "human kidneys"
|
||||
rsiPath: Mobs/Species/Human/organs.rsi
|
||||
rsiState: "kidneys"
|
||||
description: "Filters toxins out of a bloodstream."
|
||||
durability: 20
|
||||
size: 1
|
||||
compatibility: Biological
|
||||
18
Resources/Prototypes/Body/Mechanisms/basic_tests.yml
Normal file
18
Resources/Prototypes/Body/Mechanisms/basic_tests.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
- type: mechanism
|
||||
id: mechanism.EMPStriker
|
||||
name: "EMP striker"
|
||||
description: "When activated, this arm implant will apply a small EMP on the target of a physical strike for 10 watts per use."
|
||||
durability: 80
|
||||
size: 4
|
||||
compatibility: Universal
|
||||
implantableParts:
|
||||
- Arm
|
||||
- Hand
|
||||
|
||||
- type: mechanism
|
||||
id: mechanism.HonkModule
|
||||
name: "HONK module 3000"
|
||||
description: "Mandatory implant for all clowns after the Genevo Convention of 2459."
|
||||
durability: 50
|
||||
size: 3
|
||||
compatibility: Universal
|
||||
192
Resources/Prototypes/Body/Parts/humanoid_parts.yml
Normal file
192
Resources/Prototypes/Body/Parts/humanoid_parts.yml
Normal file
@@ -0,0 +1,192 @@
|
||||
- type: bodyPart
|
||||
id: bodyPart.Torso.BasicHuman
|
||||
name: "human torso"
|
||||
plural: "human torsos"
|
||||
rsiPath: Mobs/Species/Human/parts.rsi
|
||||
rsiState: "torso_m"
|
||||
partType: Torso
|
||||
durability: 100
|
||||
destroyThreshold: -150
|
||||
size: 14
|
||||
compatibility: Biological
|
||||
damageContainer: biologicalDamageContainer
|
||||
resistances: defaultResistances
|
||||
surgeryDataType: Content.Server.Body.Surgery.BiologicalSurgeryData
|
||||
mechanisms:
|
||||
- mechanism.Heart.BasicHuman
|
||||
- mechanism.Lungs.BasicHuman
|
||||
- mechanism.Stomach.BasicHuman
|
||||
- mechanism.Liver.BasicHuman
|
||||
- mechanism.Kidneys.BasicHuman
|
||||
|
||||
- type: bodyPart
|
||||
id: bodyPart.Head.BasicHuman
|
||||
name: "human head"
|
||||
plural: "human heads"
|
||||
rsiPath: Mobs/Species/Human/parts.rsi
|
||||
rsiState: head_m
|
||||
partType: Head
|
||||
durability: 50
|
||||
destroyThreshold: -120
|
||||
size: 7
|
||||
compatibility: Biological
|
||||
damageContainer: biologicalDamageContainer
|
||||
resistances: defaultResistances
|
||||
surgeryDataType: Content.Server.Body.Surgery.BiologicalSurgeryData
|
||||
mechanisms:
|
||||
- mechanism.Brain.BasicHuman
|
||||
- mechanism.Eyes.BasicHuman
|
||||
|
||||
- type: bodyPart
|
||||
id: bodyPart.LArm.BasicHuman
|
||||
name: "left human arm"
|
||||
plural: "left human arms"
|
||||
rsiPath: Mobs/Species/Human/parts.rsi
|
||||
rsiState: l_arm
|
||||
partType: Arm
|
||||
durability: 40
|
||||
destroyThreshold: -80
|
||||
size: 5
|
||||
compatibility: Biological
|
||||
damageContainer: biologicalDamageContainer
|
||||
resistances: defaultResistances
|
||||
surgeryDataType: Content.Server.Body.Surgery.BiologicalSurgeryData
|
||||
properties:
|
||||
- !type:ExtensionProperty
|
||||
active: true
|
||||
reachDistance: 2.4
|
||||
|
||||
- type: bodyPart
|
||||
id: bodyPart.RArm.BasicHuman
|
||||
name: "right human arm"
|
||||
plural: "right human arms"
|
||||
rsiPath: Mobs/Species/Human/parts.rsi
|
||||
rsiState: r_arm
|
||||
partType: Arm
|
||||
durability: 40
|
||||
destroyThreshold: -80
|
||||
size: 5
|
||||
compatibility: Biological
|
||||
damageContainer: biologicalDamageContainer
|
||||
resistances: defaultResistances
|
||||
surgeryDataType: Content.Server.Body.Surgery.BiologicalSurgeryData
|
||||
properties:
|
||||
- !type:ExtensionProperty
|
||||
active: true
|
||||
reachDistance: 2.4
|
||||
|
||||
- type: bodyPart
|
||||
id: bodyPart.LHand.BasicHuman
|
||||
name: "left human hand"
|
||||
plural: "left human hands"
|
||||
rsiPath: Mobs/Species/Human/parts.rsi
|
||||
rsiState: l_hand
|
||||
partType: Hand
|
||||
durability: 30
|
||||
destroyThreshold: -60
|
||||
size: 3
|
||||
compatibility: Biological
|
||||
damageContainer: biologicalDamageContainer
|
||||
resistances: defaultResistances
|
||||
surgeryDataType: Content.Server.Body.Surgery.BiologicalSurgeryData
|
||||
properties:
|
||||
- !type:GraspProperty
|
||||
active: true
|
||||
|
||||
- type: bodyPart
|
||||
id: bodyPart.RHand.BasicHuman
|
||||
name: "right human hand"
|
||||
plural: "right human hands"
|
||||
rsiPath: Mobs/Species/Human/parts.rsi
|
||||
rsiState: r_hand
|
||||
partType: Hand
|
||||
durability: 30
|
||||
destroyThreshold: -60
|
||||
size: 3
|
||||
compatibility: Biological
|
||||
damageContainer: biologicalDamageContainer
|
||||
resistances: defaultResistances
|
||||
surgeryDataType: Content.Server.Body.Surgery.BiologicalSurgeryData
|
||||
properties:
|
||||
- !type:GraspProperty
|
||||
active: true
|
||||
|
||||
- type: bodyPart
|
||||
id: bodyPart.LLeg.BasicHuman
|
||||
name: "left human leg"
|
||||
plural: "left human legs"
|
||||
rsiPath: Mobs/Species/Human/parts.rsi
|
||||
rsiState: l_leg
|
||||
partType: Leg
|
||||
durability: 45
|
||||
destroyThreshold: -90
|
||||
size: 6
|
||||
compatibility: Biological
|
||||
damageContainer: biologicalDamageContainer
|
||||
resistances: defaultResistances
|
||||
surgeryDataType: Content.Server.Body.Surgery.BiologicalSurgeryData
|
||||
properties:
|
||||
- !type:ExtensionProperty
|
||||
active: true
|
||||
reachDistance: 3.0
|
||||
- !type:LegProperty
|
||||
active: true
|
||||
speed: 2.6
|
||||
|
||||
- type: bodyPart
|
||||
id: bodyPart.RLeg.BasicHuman
|
||||
name: "right human leg"
|
||||
plural: "right human legs"
|
||||
rsiPath: Mobs/Species/Human/parts.rsi
|
||||
rsiState: r_leg
|
||||
partType: Leg
|
||||
durability: 45
|
||||
destroyThreshold: -90
|
||||
size: 6
|
||||
compatibility: Biological
|
||||
damageContainer: biologicalDamageContainer
|
||||
resistances: defaultResistances
|
||||
surgeryDataType: Content.Server.Body.Surgery.BiologicalSurgeryData
|
||||
properties:
|
||||
- !type:ExtensionProperty
|
||||
active: true
|
||||
reachDistance: 3.0
|
||||
- !type:LegProperty
|
||||
active: true
|
||||
speed: 2.6
|
||||
|
||||
- type: bodyPart
|
||||
id: bodyPart.LFoot.BasicHuman
|
||||
name: "left human foot"
|
||||
plural: "left human feet"
|
||||
rsiPath: Mobs/Species/Human/parts.rsi
|
||||
rsiState: l_foot
|
||||
partType: Foot
|
||||
durability: 30
|
||||
destroyThreshold: -60
|
||||
size: 2
|
||||
compatibility: Biological
|
||||
damageContainer: biologicalDamageContainer
|
||||
resistances: defaultResistances
|
||||
surgeryDataType: Content.Server.Body.Surgery.BiologicalSurgeryData
|
||||
properties:
|
||||
- !type:FootProperty
|
||||
active: true
|
||||
|
||||
- type: bodyPart
|
||||
id: bodyPart.RFoot.BasicHuman
|
||||
name: "right human foot"
|
||||
plural: "right human feet"
|
||||
rsiPath: Mobs/Species/Human/parts.rsi
|
||||
rsiState: r_foot
|
||||
partType: Foot
|
||||
durability: 30
|
||||
destroyThreshold: -60
|
||||
size: 2
|
||||
compatibility: Biological
|
||||
damageContainer: biologicalDamageContainer
|
||||
resistances: defaultResistances
|
||||
surgeryDataType: Content.Server.Body.Surgery.BiologicalSurgeryData
|
||||
properties:
|
||||
- !type:FootProperty
|
||||
active: true
|
||||
14
Resources/Prototypes/Body/Presets/basic_human.yml
Normal file
14
Resources/Prototypes/Body/Presets/basic_human.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
- type: bodyPreset
|
||||
name: "basic human"
|
||||
id: bodyPreset.BasicHuman
|
||||
partIDs:
|
||||
head: bodyPart.Head.BasicHuman
|
||||
torso: bodyPart.Torso.BasicHuman
|
||||
right arm: bodyPart.RArm.BasicHuman
|
||||
left arm: bodyPart.LArm.BasicHuman
|
||||
right hand: bodyPart.RHand.BasicHuman
|
||||
left hand: bodyPart.LHand.BasicHuman
|
||||
right leg: bodyPart.RLeg.BasicHuman
|
||||
left leg: bodyPart.LLeg.BasicHuman
|
||||
right foot: bodyPart.RFoot.BasicHuman
|
||||
left foot: bodyPart.LFoot.BasicHuman
|
||||
44
Resources/Prototypes/Body/Templates/humanoid.yml
Normal file
44
Resources/Prototypes/Body/Templates/humanoid.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
- type: bodyTemplate
|
||||
id: bodyTemplate.Humanoid
|
||||
name: "humanoid"
|
||||
centerSlot: "torso"
|
||||
slots:
|
||||
head: Head
|
||||
torso: Torso
|
||||
left arm: Arm
|
||||
left hand: Hand
|
||||
right arm: Arm
|
||||
right hand: Hand
|
||||
left leg: Leg
|
||||
left foot: Foot
|
||||
right leg: Leg
|
||||
right foot: Foot
|
||||
connections:
|
||||
head:
|
||||
- torso
|
||||
torso:
|
||||
- left arm
|
||||
- right arm
|
||||
- left leg
|
||||
- right leg
|
||||
left arm:
|
||||
- left hand
|
||||
right arm:
|
||||
- right hand
|
||||
left leg:
|
||||
- left foot
|
||||
right leg:
|
||||
- right foot
|
||||
layers:
|
||||
head: "enum.HumanoidVisualLayers.Head"
|
||||
torso: "enum.HumanoidVisualLayers.Chest"
|
||||
left arm: "enum.HumanoidVisualLayers.LArm"
|
||||
left hand: "enum.HumanoidVisualLayers.LHand"
|
||||
right arm: "enum.HumanoidVisualLayers.RArm"
|
||||
right hand: "enum.HumanoidVisualLayers.RHand"
|
||||
left leg: "enum.HumanoidVisualLayers.LLeg"
|
||||
left foot: "enum.HumanoidVisualLayers.LFoot"
|
||||
right leg: "enum.HumanoidVisualLayers.RLeg"
|
||||
right foot: "enum.HumanoidVisualLayers.RFoot"
|
||||
mechanismLayers:
|
||||
mechanism.Eyes.BasicHuman: "enum.HumanoidVisualLayers.Eyes"
|
||||
31
Resources/Prototypes/Body/Templates/quadrupedal.yml
Normal file
31
Resources/Prototypes/Body/Templates/quadrupedal.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
- type: bodyTemplate
|
||||
id: bodyTemplate.Quadrupedal
|
||||
name: "quadrupedal"
|
||||
centerSlot: "torso"
|
||||
slots:
|
||||
head: Head
|
||||
torso: Torso
|
||||
left front leg: Leg
|
||||
left front paw: Foot
|
||||
right front leg: Leg
|
||||
right front paw: Foot
|
||||
left hind leg: Leg
|
||||
left hind paw: Foot
|
||||
right hind leg: Leg
|
||||
right hind paw: Foot
|
||||
connections:
|
||||
head:
|
||||
- torso
|
||||
torso:
|
||||
- left front leg
|
||||
- right front leg
|
||||
- left hind leg
|
||||
- right hind paw
|
||||
left front leg:
|
||||
- left front paw
|
||||
right front leg:
|
||||
- right front paw
|
||||
left hind leg:
|
||||
- left hind paw
|
||||
right hind leg:
|
||||
- right hind paw
|
||||
Reference in New Issue
Block a user