Skip to content

Commit 6bdf8ad

Browse files
Health System 2 : Breathing and Bleeding (#1252)
* add basic health files * fix kill interaction * add blood particles * add hand body part * fix back human prefab * update v3 fishnet * fixing icons not showing up * fix some warning and issues * remove require component network object on bodypart * allow attach body parts to be destroyed * add bodyparts on human * add bodyparts tag * allow to detach hands * spawn body part when destroyed * add hurt coimmand to hurt a player * remove name as a member of bodypart * move scripts on bodyparts for bodyparts instead of the armature * same * rename some clothes gameobject * move hand and hand container on bodyparts * rename correctly some gameobjects * remove prefab member of item * remove useless log * remove exception * add item prefabs for body parts * make head convex * replace prefab to spawn when bodypart destroyed * some factoring and destroy bodyparts instead of only detach * mode id container on body parts * move ears on head * tidy up human scripts and update doc * add head body part * fix some issues with removing body parts * fix null ref * change body parts collider to be triggers * can invoke disabled attached container * remove items from bodyparts before detaching * fix is kinematic on hand left item * some factoring on bodypart * update attack by pressing f * update default prefab objects for fiishnet * add entity on head when head detached * refactor some stuff * fix screen going black when non owned entity gets destroyed * simple script to check who owns a given go * fix ownership on clients when picking up stuff * add brain to head * kill human brain by destroying head * add ghost prefab * add two commands to hurt body parts * fix some stuff on bodyparts * set ref to ghost * refresh default prefab objects * update bodyparts to fix rigidbody interpolation * update human * copy value to bodypart * add ability to hit all layer of bodypart * add examine body part command * fix modified damagetypeQuantity * fix isdetached check * fix detached bodypart * some doc and clean up * simplified detach body part workflow * removing useless interactive container on player * no interactions for now * fix head body part issue with detaching * add hit interaction, for a combat basis * some cleanup * destroy container content when body part is destroyed * add low speed with low foot health * remove serializers for body layers * move files around * add feet script to human * Hide brain * add doc * replace tabs with 4 spaces * hide body on head severed * add cloth container script * add organ container avoid dropping organs in body part containers on detached * add heart, circulatory controller * add blood and oxygen substances * add interface for oxygen consuming and needing * Add consumer system consumer system registers Oxygen consumers and periodically call Consume oxygen on all of them. * implement interfaces on a bunch of layer * make circulatory layer functionnal * update body parts and add torso * add circulatory controller * update substance container * add heart and update human * add oxygenconsumer system to scene * fix double heart in connected to heart * actually consume oxygen * add breathing state and doc * removing toxing using * added health constants, fix namespaces, switch bodypart volume to millimeters * setting everything in millimoles and milliliters * fix some quantities * fix some quantity * remove some exceptions upon destruction * fix bunch of exceptions * adds bleeding particles and database for particles * show bleeding when taking damages * just renaming * renaming * add health constant and doc * properly transfer minds, fix a few exceptions, add oxygen reserve parameter * correct volume of bodyparts and blood effect * fixing some stuff,, adding bleeding component * some doc * fix a bit bodypart destroying stop having two brains at the same time * simplify a bit bodypart * make bodypart more abstract instead of having many virtual method with a lot of overriding and duplicate code, set abstract a few callback that can be implemented by user when implement a new bodypart * Add lungs * change heart and circulatory controller * fix some parameters on prefabs * fix some quantity * some fixes, some attributes added * add name to oxygen intake * fix namespaces, add attributes * remove useless stuff on Health controller * typo * add attributes * Add bodyparts on entity tracking * Add list of attached to heart for performance * Optimise oxygen needed computation * some doc fix * makes thing a bit less noodley * remove server tag on abstract method * adds max oxygen amount computed by circulatory * add substance container display for debugging * fix volume body part on player * add computing total volume of body parts * fixing parent body parts * fixing some health constants * adding better control on substance in blood * fix health constant * update circulatory controller * fix exception setting parent of transform prefab * update human * some cleaning and doc * Cosmetic, changes + BodyDamage types * apply damage container to bodylayer * small fix * fix punpun log rename * fix punpun log rename * beautify code a little * add comment * partly fixing human * fix human more * fix compiler warnings * fix clothes not disappearing * fix ghost not moving and spwaning at the wrong location * fix exception throwing when no body part left and hitting * fix build issue * update colliders --------- Co-authored-by: Mechar418 <[email protected]>
1 parent 8853e65 commit 6bdf8ad

File tree

110 files changed

+9004
-683
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+9004
-683
lines changed

Assets/Content/Addressables/AssetGroups/Default Local Group.asset

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,7 @@ MonoBehaviour:
1616
m_Data:
1717
m_SerializedData: []
1818
m_GUID: a8f988e8c8dd50c4ea7f7f7e5f300082
19-
m_SerializeEntries:
20-
- m_GUID: c19eccca279beee4186432a03257a7b9
21-
m_Address: Assets/Content/WorldObjects/Items/BodyParts/HumanHandRight.prefab
22-
m_ReadOnly: 0
23-
m_SerializedLabels: []
24-
- m_GUID: df85b75fd341a244c8364ebb9c4fcfef
25-
m_Address: Assets/Content/WorldObjects/Items/BodyParts/HumanHandLeft.prefab
26-
m_ReadOnly: 0
27-
m_SerializedLabels: []
19+
m_SerializeEntries: []
2820
m_ReadOnly: 0
2921
m_Settings: {fileID: 11400000, guid: ddc57d0f5f9fb874e8a26db0c5b215e0, type: 2}
3022
m_SchemaSet:

Assets/Content/Addressables/AssetGroups/Items.asset

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,70 @@ MonoBehaviour:
193193
m_Address: Assets/Content/WorldObjects/Items/Clothes/HeadsetRight.prefab
194194
m_ReadOnly: 0
195195
m_SerializedLabels: []
196+
- m_GUID: 9659c4cc7bea07c4ba38b492f407ef7f
197+
m_Address: Assets/Content/WorldObjects/Items/BodyParts/HumanArmLeftItem.prefab
198+
m_ReadOnly: 0
199+
m_SerializedLabels: []
200+
- m_GUID: 2f664501d8d74774c9427f7fb6d50ae6
201+
m_Address: Assets/Content/WorldObjects/Items/BodyParts/HumanArmRightItem.prefab
202+
m_ReadOnly: 0
203+
m_SerializedLabels: []
204+
- m_GUID: 229b5ce92c3d9164e845f68308a037a2
205+
m_Address: Assets/Content/WorldObjects/Items/BodyParts/HumanBrainItem.prefab
206+
m_ReadOnly: 0
207+
m_SerializedLabels: []
208+
- m_GUID: 2081061d3c98e50408979ea90372c244
209+
m_Address: Assets/Content/WorldObjects/Items/BodyParts/HumanEarLeftItem.prefab
210+
m_ReadOnly: 0
211+
m_SerializedLabels: []
212+
- m_GUID: 6687a95358e52a348aaf6179f3c252f2
213+
m_Address: Assets/Content/WorldObjects/Items/BodyParts/HumanEarRightItem.prefab
214+
m_ReadOnly: 0
215+
m_SerializedLabels: []
216+
- m_GUID: 60890cc80962a7e44b97b4ba3b0518e3
217+
m_Address: Assets/Content/WorldObjects/Items/BodyParts/HumanFootLeftItem.prefab
218+
m_ReadOnly: 0
219+
m_SerializedLabels: []
220+
- m_GUID: 4d59bb658831172479995d721f8cbd6c
221+
m_Address: Assets/Content/WorldObjects/Items/BodyParts/HumanFootRightItem.prefab
222+
m_ReadOnly: 0
223+
m_SerializedLabels: []
224+
- m_GUID: df85b75fd341a244c8364ebb9c4fcfef
225+
m_Address: Assets/Content/WorldObjects/Items/BodyParts/HumanHandLeft.prefab
226+
m_ReadOnly: 0
227+
m_SerializedLabels: []
228+
- m_GUID: c19eccca279beee4186432a03257a7b9
229+
m_Address: Assets/Content/WorldObjects/Items/BodyParts/HumanHandRight.prefab
230+
m_ReadOnly: 0
231+
m_SerializedLabels: []
232+
- m_GUID: 9ac7c2cd12db800479e566335ff7440b
233+
m_Address: Assets/Content/WorldObjects/Items/BodyParts/HumanHeadItem.prefab
234+
m_ReadOnly: 0
235+
m_SerializedLabels: []
236+
- m_GUID: 2d0913074150cca43b88c90ec658aacb
237+
m_Address: Assets/Content/WorldObjects/Items/BodyParts/HumanLegLeftItem.prefab
238+
m_ReadOnly: 0
239+
m_SerializedLabels: []
240+
- m_GUID: 983acf51173ef60479e35c5e35946162
241+
m_Address: Assets/Content/WorldObjects/Items/BodyParts/HumanLegRightItem.prefab
242+
m_ReadOnly: 0
243+
m_SerializedLabels: []
244+
- m_GUID: 57d15c94003230048bd96a5bc7115bc2
245+
m_Address: Assets/Content/WorldObjects/Items/BodyParts/HumanLungLeftItem.prefab
246+
m_ReadOnly: 0
247+
m_SerializedLabels: []
248+
- m_GUID: 9d475ae6ec7b7a749abae10066b336be
249+
m_Address: Assets/Content/WorldObjects/Items/BodyParts/HumanLungRightItem.prefab
250+
m_ReadOnly: 0
251+
m_SerializedLabels: []
252+
- m_GUID: 885d5a9c5776fd64ab1cf595e0cfd9d8
253+
m_Address: Assets/Content/WorldObjects/Items/BodyParts/HumanTorsoItem.prefab
254+
m_ReadOnly: 0
255+
m_SerializedLabels: []
256+
- m_GUID: 8b2b80e8392e44944a184d9166ce97b1
257+
m_Address: Assets/Content/WorldObjects/Items/BodyParts/HumanHeartItem.prefab
258+
m_ReadOnly: 0
259+
m_SerializedLabels: []
196260
m_ReadOnly: 0
197261
m_Settings: {fileID: 11400000, guid: ddc57d0f5f9fb874e8a26db0c5b215e0, type: 2}
198262
m_SchemaSet:
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!114 &11400000
4+
MonoBehaviour:
5+
m_ObjectHideFlags: 0
6+
m_CorrespondingSourceObject: {fileID: 0}
7+
m_PrefabInstance: {fileID: 0}
8+
m_PrefabAsset: {fileID: 0}
9+
m_GameObject: {fileID: 0}
10+
m_Enabled: 1
11+
m_EditorHideFlags: 0
12+
m_Script: {fileID: 11500000, guid: bbb281ee3bf0b054c82ac2347e9e782c, type: 3}
13+
m_Name: ParticlesEffects
14+
m_EditorClassIdentifier:
15+
m_GroupName: ParticlesEffects
16+
m_Data:
17+
m_SerializedData: []
18+
m_GUID: 90d7cf41494026c4899d24b5f410eb0a
19+
m_SerializeEntries:
20+
- m_GUID: 17b0d9163e9cdf14aa557557e7d9d76b
21+
m_Address: Assets/Content/WorldObjects/World/VFX/Health/AttackParticles.prefab
22+
m_ReadOnly: 0
23+
m_SerializedLabels: []
24+
- m_GUID: a6a77c26ee7edd94c804f4ddd851c8ba
25+
m_Address: Assets/Content/WorldObjects/World/VFX/Health/BleedingParticle.prefab
26+
m_ReadOnly: 0
27+
m_SerializedLabels: []
28+
m_ReadOnly: 0
29+
m_Settings: {fileID: 11400000, guid: ddc57d0f5f9fb874e8a26db0c5b215e0, type: 2}
30+
m_SchemaSet:
31+
m_Schemas:
32+
- {fileID: 11400000, guid: 4221eb55b08b232489669132cc6b4c77, type: 2}
33+
- {fileID: 11400000, guid: f368c33b8ccc665489c2c53c5a4bf163, type: 2}

Assets/Content/Addressables/AssetGroups/ParticlesEffects.asset.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!114 &11400000
4+
MonoBehaviour:
5+
m_ObjectHideFlags: 0
6+
m_CorrespondingSourceObject: {fileID: 0}
7+
m_PrefabInstance: {fileID: 0}
8+
m_PrefabAsset: {fileID: 0}
9+
m_GameObject: {fileID: 0}
10+
m_Enabled: 1
11+
m_EditorHideFlags: 0
12+
m_Script: {fileID: 11500000, guid: e5d17a21594effb4e9591490b009e7aa, type: 3}
13+
m_Name: ParticlesEffects_BundledAssetGroupSchema
14+
m_EditorClassIdentifier:
15+
m_Group: {fileID: 11400000, guid: d700978032e12a647b8734863a0bf7c2, type: 2}
16+
m_InternalBundleIdMode: 1
17+
m_Compression: 1
18+
m_IncludeAddressInCatalog: 1
19+
m_IncludeGUIDInCatalog: 1
20+
m_IncludeLabelsInCatalog: 1
21+
m_InternalIdNamingMode: 0
22+
m_CacheClearBehavior: 0
23+
m_IncludeInBuild: 1
24+
m_BundledAssetProviderType:
25+
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
26+
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider
27+
m_ForceUniqueProvider: 0
28+
m_UseAssetBundleCache: 1
29+
m_UseAssetBundleCrc: 1
30+
m_UseAssetBundleCrcForCachedBundles: 1
31+
m_UseUWRForLocalBundles: 0
32+
m_Timeout: 0
33+
m_ChunkedTransfer: 0
34+
m_RedirectLimit: -1
35+
m_RetryCount: 0
36+
m_BuildPath:
37+
m_Id: 56790a984472fbe4a809c1ab1b0e4c79
38+
m_LoadPath:
39+
m_Id: 8abc09617b79e8b4994b07cc672cbbe5
40+
m_BundleMode: 0
41+
m_AssetBundleProviderType:
42+
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
43+
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
44+
m_BundleNaming: 0
45+
m_AssetLoadMode: 0

Assets/Content/Addressables/AssetGroups/Schemas/ParticlesEffects_BundledAssetGroupSchema.asset.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!114 &11400000
4+
MonoBehaviour:
5+
m_ObjectHideFlags: 0
6+
m_CorrespondingSourceObject: {fileID: 0}
7+
m_PrefabInstance: {fileID: 0}
8+
m_PrefabAsset: {fileID: 0}
9+
m_GameObject: {fileID: 0}
10+
m_Enabled: 1
11+
m_EditorHideFlags: 0
12+
m_Script: {fileID: 11500000, guid: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
13+
m_Name: ParticlesEffects_ContentUpdateGroupSchema
14+
m_EditorClassIdentifier:
15+
m_Group: {fileID: 11400000, guid: d700978032e12a647b8734863a0bf7c2, type: 2}
16+
m_StaticContent: 0

Assets/Content/Addressables/AssetGroups/Schemas/ParticlesEffects_ContentUpdateGroupSchema.asset.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Content/Data/Items.asset

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,19 @@ MonoBehaviour:
6060
- {fileID: 726792282085660869, guid: 4635651592391df41b6b2413afdb76c3, type: 3}
6161
- {fileID: 7723921361698481624, guid: f549f4153ef612c4586c46ea280e0e94, type: 3}
6262
- {fileID: 8712940276313799639, guid: 1a2f912be4bc1b948a2b22ffde517cdc, type: 3}
63+
- {fileID: 5774385816057912484, guid: 9659c4cc7bea07c4ba38b492f407ef7f, type: 3}
64+
- {fileID: 5774385816057912484, guid: 2f664501d8d74774c9427f7fb6d50ae6, type: 3}
65+
- {fileID: 5774385816057912484, guid: 229b5ce92c3d9164e845f68308a037a2, type: 3}
66+
- {fileID: 5774385816057912484, guid: 2081061d3c98e50408979ea90372c244, type: 3}
67+
- {fileID: 5774385816057912484, guid: 6687a95358e52a348aaf6179f3c252f2, type: 3}
68+
- {fileID: 5774385816057912484, guid: 60890cc80962a7e44b97b4ba3b0518e3, type: 3}
69+
- {fileID: 5774385816057912484, guid: 4d59bb658831172479995d721f8cbd6c, type: 3}
70+
- {fileID: 5774385816057912484, guid: df85b75fd341a244c8364ebb9c4fcfef, type: 3}
71+
- {fileID: 5774385816057912484, guid: c19eccca279beee4186432a03257a7b9, type: 3}
72+
- {fileID: 5774385816057912484, guid: 9ac7c2cd12db800479e566335ff7440b, type: 3}
73+
- {fileID: 5774385816057912484, guid: 2d0913074150cca43b88c90ec658aacb, type: 3}
74+
- {fileID: 5774385816057912484, guid: 983acf51173ef60479e35c5e35946162, type: 3}
75+
- {fileID: 5774385816057912484, guid: 57d15c94003230048bd96a5bc7115bc2, type: 3}
76+
- {fileID: 5774385816057912484, guid: 9d475ae6ec7b7a749abae10066b336be, type: 3}
77+
- {fileID: 5774385816057912484, guid: 885d5a9c5776fd64ab1cf595e0cfd9d8, type: 3}
78+
- {fileID: 5774385816057912484, guid: 8b2b80e8392e44944a184d9166ce97b1, type: 3}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!114 &11400000
4+
MonoBehaviour:
5+
m_ObjectHideFlags: 0
6+
m_CorrespondingSourceObject: {fileID: 0}
7+
m_PrefabInstance: {fileID: 0}
8+
m_PrefabAsset: {fileID: 0}
9+
m_GameObject: {fileID: 0}
10+
m_Enabled: 1
11+
m_EditorHideFlags: 0
12+
m_Script: {fileID: 11500000, guid: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3}
13+
m_Name: ParticlesEffects
14+
m_EditorClassIdentifier:
15+
EnumNamespaceName: SS3D.Data.Enums
16+
EnumName: ParticlesEffectsIds
17+
AssetGroup: {fileID: 11400000, guid: d700978032e12a647b8734863a0bf7c2, type: 2}
18+
Assets:
19+
- {fileID: 7714517724079113232, guid: 17b0d9163e9cdf14aa557557e7d9d76b, type: 3}
20+
- {fileID: 6016476664605660376, guid: a6a77c26ee7edd94c804f4ddd851c8ba, type: 3}

0 commit comments

Comments
 (0)