Skip to content

Commit

Permalink
Inventory Rework and clothing (#1215)
Browse files Browse the repository at this point in the history
* allow old view inventory to avoid crashing

* Add type to slots and resize slots

* make divisor a prefab

* Add basis for new inventory

* Add new inventory to human and inventory view to canvas

* Add alternative inventory container

* Make alternative dynamic UI work

* remove handsview and put highlight in hands script

* require inventoryalt component

* fix completely container UI interactions

* fix everything

* separate inventory into inventory and containerviewer

this alleviates a bit the role of the inventory. Inventory should only handles what's on the player or hold by them. Opened Containers by the player should be displayed using another script, dedicated to that.

* add doc, add method to InventoryView

* adds doc

* rename Inventory to HUmanInventory

this prevents the conflit with Inventory namespace

* a bit of decoupling and renaming

* make hands set up after inventory to avoid timing issues

* fix weird hand highlight bug

* sync loadout

* prefab update with some bugs

* fix slots type and count hand slots

* kinda fix highlight hands colors

* remove old hand prefabs

* add bag slot and fix hand distance

* fix order of slots

* add clothing slots and containers

* add trucker hat and sunglasses

* add cloth displayers for glasses

* fix a bit some patch

* add hat display

* add some doc

* factorise some code

* fix value in container type to have non overlapping bits

* update human prefab

* Add some clothes items

* make pair slots individual, fix container type

* add display for other type of clothes

* small fix

* add inventory slot container

* remove useless using

* fix container on jumpsuit

* make slot remove when container removed

* add and remove slots and containers in inventory

* update hack

* fix exception on item display

* show item present in slot

* update human prefab

* sync clothing display

* remove warning about parent transform

* allows to remove container in UI of clients

* slightly reduce the mesh bug

* Add bunch of traits for clothing

* add backpack item

* modify a bit slots

* remove separator and improve methods to select slots

* adding id slot and inventory

* remove shoes

* rename stuff, document HumanInventory

* rename, document inventoryview

* rename, document containerviewer

* doc an name change in clothesDisplayer

* small rename

* fix build clothes displaying weirdly

* add support for bag and face mask

* add headset item and support

* remove inventory slot

* fix hand slots

* Revert "remove inventory slot"

This reverts commit 07d3b0e.

* fix glove left and right

* fix slot position in horizontal layout

* remove inventoryslot container

* only container with display as slot in the UI

* clicking on wrong containers no longer drop item

* add some doc and tags

* PDa is no longer considered clothing

* fixing hand containers from push and fixing PDA container

* making containerViewer private

* change to dynamic list of displayed clothes

* partly fix some handling positions

* fix pda spawning multiple times

* correctly set up viewer only for owner

* remove useless PDA and methods

* move accessor

* remove inventory container on disabled

* add spawning with clothes

* fixing forgotten change

* update assistant loadout

* add headset to items, fix loadout

* fix sec jumpsuit

* fix return too soon

* fix jumpsuit

* fix pocket jumpsuit

* add and remove containers methods

* removing and adding slots now works properly

When a gameobject container is disabled and was part of the inventory, the container slot linked to it disappear. Similar when adding a container.

* onenable add container

* fix slot size of items sprite

* fixing item missing exceptions

* fix grid

* put jumpsuit on item layer

* clean and doc
  • Loading branch information
stilnat authored Aug 1, 2023
1 parent 311dbf0 commit f714cc7
Show file tree
Hide file tree
Showing 234 changed files with 13,617 additions and 4,349 deletions.
60 changes: 60 additions & 0 deletions Assets/Content/Addressables/AssetGroups/Items.asset
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,66 @@ MonoBehaviour:
m_Address: Assets/Content/WorldObjects/Items/Functional/Tools/Kitchen/KitchenKnife.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 1ef3c21a685ec2d4e9f0876719839d5f
m_Address: Assets/Content/WorldObjects/Items/Clothes/TruckerCap.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 9b9f6bd470226a74b903e74dbe9e423a
m_Address: Assets/Content/WorldObjects/Items/Clothes/Sunglasses.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: bf177f8bab26bc84b87fd9a971004418
m_Address: Assets/Content/WorldObjects/Items/Clothes/FacewearGasMask.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: f1aeab0a35c29314a8a3f823de9815c1
m_Address: Assets/Content/WorldObjects/Items/Clothes/GlovesInsulatedLeft.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 8725b7f8f45d28a4ba6063318904cc8a
m_Address: Assets/Content/WorldObjects/Items/Clothes/GlovesInsulatedRight.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 7f49c948ec182a648ab280a22038752a
m_Address: Assets/Content/WorldObjects/Items/Clothes/JumpsuitBotany.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 991fc7d67bda7d247b13ec8498953bc0
m_Address: Assets/Content/WorldObjects/Items/Clothes/JumpsuitEngineer.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 236b51ddc6f9aa94ca92579082370c06
m_Address: Assets/Content/WorldObjects/Items/Clothes/JumpsuitGrey.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 5fa15d6fdef93dc4e80d798cefe8be0b
m_Address: Assets/Content/WorldObjects/Items/Clothes/ShoesHiTopsLeft.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 317ec7dcff3b11d4eae3a47929200b93
m_Address: Assets/Content/WorldObjects/Items/Clothes/ShoesHiTopsRight.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 4b790b4ffedbe564dab49f896d71eaa6
m_Address: Assets/Content/WorldObjects/Items/Clothes/ShoesJackbootsLeft.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: d7d68992cbd3cda45bb11a35a1490dc3
m_Address: Assets/Content/WorldObjects/Items/Clothes/ShoesJackbootsRight.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 4635651592391df41b6b2413afdb76c3
m_Address: Assets/Content/WorldObjects/Items/Clothes/JumpsuitSecurity.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: f549f4153ef612c4586c46ea280e0e94
m_Address: Assets/Content/WorldObjects/Items/Clothes/HeadsetLeft.prefab
m_ReadOnly: 0
m_SerializedLabels: []
- m_GUID: 1a2f912be4bc1b948a2b22ffde517cdc
m_Address: Assets/Content/WorldObjects/Items/Clothes/HeadsetRight.prefab
m_ReadOnly: 0
m_SerializedLabels: []
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: ddc57d0f5f9fb874e8a26db0c5b215e0, type: 2}
m_SchemaSet:
Expand Down
Binary file not shown.
81 changes: 0 additions & 81 deletions Assets/Content/Addressables/link.xml

This file was deleted.

27 changes: 27 additions & 0 deletions Assets/Content/Data/DefaultPrefabObjects.asset
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@ MonoBehaviour:
- {fileID: 8203177977882359099, guid: 6ab4ce7059d374a4498481e1385c222e, type: 3}
- {fileID: 3227132888119106738, guid: 7bbb74a7ffc8cae44baa886de43c586b, type: 3}
- {fileID: 1871071288925904272, guid: add4d1bc2d874d94782d6b8c912af5e2, type: 3}
- {fileID: 6115335805774105745, guid: bf177f8bab26bc84b87fd9a971004418, type: 3}
- {fileID: 6699414010407460003, guid: f1aeab0a35c29314a8a3f823de9815c1, type: 3}
- {fileID: 4692070367735979832, guid: 8725b7f8f45d28a4ba6063318904cc8a, type: 3}
- {fileID: 6270372984438359393, guid: f549f4153ef612c4586c46ea280e0e94, type: 3}
- {fileID: 3346295071430447723, guid: 1a2f912be4bc1b948a2b22ffde517cdc, type: 3}
- {fileID: 1606100486293266847, guid: 7f49c948ec182a648ab280a22038752a, type: 3}
- {fileID: 7923090970201565529, guid: 991fc7d67bda7d247b13ec8498953bc0, type: 3}
- {fileID: 2527334834019670621, guid: 236b51ddc6f9aa94ca92579082370c06, type: 3}
- {fileID: 4067691560622095404, guid: 4635651592391df41b6b2413afdb76c3, type: 3}
- {fileID: 8681604604373809337, guid: 5fa15d6fdef93dc4e80d798cefe8be0b, type: 3}
- {fileID: 8663352389375050187, guid: 317ec7dcff3b11d4eae3a47929200b93, type: 3}
- {fileID: 8657890218937463745, guid: 4b790b4ffedbe564dab49f896d71eaa6, type: 3}
- {fileID: 7421556062366613563, guid: d7d68992cbd3cda45bb11a35a1490dc3, type: 3}
- {fileID: 3546473533537016869, guid: 9b9f6bd470226a74b903e74dbe9e423a, type: 3}
- {fileID: -1921154974467191097, guid: 1ef3c21a685ec2d4e9f0876719839d5f, type: 3}
- {fileID: 7942135432533076774, guid: 84a5596b28f449e49bb34741abf89d30, type: 3}
- {fileID: 7942135432533076774, guid: 96f34e849ae8c5640a9343b5ef370179, type: 3}
- {fileID: 7942135432533076774, guid: d25b39d1e2379b64cba47629530ada78, type: 3}
Expand Down Expand Up @@ -50,7 +65,12 @@ MonoBehaviour:
- {fileID: 9154675693299657064, guid: af039f84b4a245049b5b62799af01384, type: 3}
- {fileID: 2930813178971533500, guid: 1c3eed1ea37ecc1448e41270cdc63486, type: 3}
- {fileID: 1019513474262773944, guid: 06c946c7c639138488b814e4448b82e4, type: 3}
- {fileID: 1871071288925904272, guid: 23a169aefca62c4418b6efec13df595e, type: 3}
- {fileID: 1871071288925904272, guid: 7c6bebf2e12702d48abd76acad4d1272, type: 3}
- {fileID: 1871071288925904272, guid: b7976a98a25be4543ba45f1d5e26c072, type: 3}
- {fileID: 1871071288925904272, guid: 93faf7e7a5c67b9478c57a0d03340256, type: 3}
- {fileID: 1871071288925904272, guid: 6f2976f635940684da7f7f4ed7855a8d, type: 3}
- {fileID: 1871071288925904272, guid: cc1b7e8558e50594089a64af537ff781, type: 3}
- {fileID: 3258417366846669140, guid: fa1909e0d40b4cf408ff599df7a2043f, type: 3}
- {fileID: 3258417366846669140, guid: 330d85a67a5891145bd8037dde90f37b, type: 3}
- {fileID: 3258417366846669140, guid: dd3ce5340ed4aba4babae7020f737084, type: 3}
Expand Down Expand Up @@ -86,10 +106,17 @@ MonoBehaviour:
- {fileID: 8532088199163376958, guid: bc710fc0859f40c4d91bc874a4914fd5, type: 3}
- {fileID: 8532088199163376958, guid: 7077b8ec0e44b664eb3b76e65d40185e, type: 3}
- {fileID: 8532088199163376958, guid: 2bc6f6a968d5ba04c919ba56d0ccdab4, type: 3}
- {fileID: 6244957436306937818, guid: 4d48472d06930bd42a15897e6a1794ac, type: 3}
- {fileID: 5716146803221059512, guid: ebddb1721dcbe36499e4d093e5a7ff09, type: 3}
- {fileID: 8635336608555116780, guid: 6caa99f8281726e40a793826d5c047db, type: 3}
- {fileID: 9015187684533357890, guid: 5e8a02c5ce0073644ac01bdb55d72a70, type: 3}
- {fileID: -2900402353996906960, guid: b5be0a52925e2674193d081d2deb68cb, type: 3}
- {fileID: 881130758709618923, guid: 2332a158259900e4f8a237fa8daff266, type: 3}
- {fileID: 7958861831329766982, guid: d8b0c8d1ddcdeb24d9763054c103c9fe, type: 3}
- {fileID: 7958861831329766982, guid: 79260483ae5d3e04fa272e092b49abac, type: 3}
- {fileID: 7958861831329766982, guid: ff95abc9c2b779340a1b50f1a128a934, type: 3}
- {fileID: 7958861831329766982, guid: 2a63163a4db141744a802f3ff67087db, type: 3}
- {fileID: 2090837846029440516, guid: 3520c433beff78a478401074d2ca95a3, type: 3}
- {fileID: 7958861831329766982, guid: d9aabfd5d726a7f499b8e360d919eba4, type: 3}
- {fileID: 4819234911439508660, guid: 1ae18785d74e9fa4699b6f6de889c243, type: 3}
- {fileID: 6999522401175031449, guid: 9b8a1328991fc2846bc55a3d9a82e5c0, type: 3}
Expand Down
4 changes: 2 additions & 2 deletions Assets/Content/Data/Filters/Wearables/Backpack.asset
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ MonoBehaviour:
m_Name: Backpack
m_EditorClassIdentifier:
mustHaveAll: 0
acceptedTraits: []
acceptedTraits:
- {fileID: 11400000, guid: f260c488d87f64d4bbc5cdb19dc9301c, type: 2}
deniedTraits: []
hash: -905570011
18 changes: 18 additions & 0 deletions Assets/Content/Data/Filters/Wearables/EarLeft.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0adc192349dc57848b5394a2c6707c23, type: 3}
m_Name: EarLeft
m_EditorClassIdentifier:
mustHaveAll: 0
acceptedTraits:
- {fileID: 11400000, guid: ebb958676aabcb647b8d1b51b1ed8098, type: 2}
deniedTraits: []
8 changes: 8 additions & 0 deletions Assets/Content/Data/Filters/Wearables/EarLeft.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions Assets/Content/Data/Filters/Wearables/EarRight.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0adc192349dc57848b5394a2c6707c23, type: 3}
m_Name: EarRight
m_EditorClassIdentifier:
mustHaveAll: 0
acceptedTraits:
- {fileID: 11400000, guid: 5f051f2619c7c6a41938d7c2ac95c921, type: 2}
deniedTraits: []
8 changes: 8 additions & 0 deletions Assets/Content/Data/Filters/Wearables/EarRight.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions Assets/Content/Data/Filters/Wearables/Eyes.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0adc192349dc57848b5394a2c6707c23, type: 3}
m_Name: Eyes
m_EditorClassIdentifier:
mustHaveAll: 0
acceptedTraits:
- {fileID: 11400000, guid: aad6862af822986498365c59cf83067a, type: 2}
deniedTraits: []
8 changes: 8 additions & 0 deletions Assets/Content/Data/Filters/Wearables/Eyes.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions Assets/Content/Data/Filters/Wearables/Face.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0adc192349dc57848b5394a2c6707c23, type: 3}
m_Name: Face
m_EditorClassIdentifier:
mustHaveAll: 0
acceptedTraits:
- {fileID: 11400000, guid: 6169d80297e73ad44b394b52547ac805, type: 2}
deniedTraits: []
8 changes: 8 additions & 0 deletions Assets/Content/Data/Filters/Wearables/Face.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions Assets/Content/Data/Filters/Wearables/HandLeft.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0adc192349dc57848b5394a2c6707c23, type: 3}
m_Name: HandLeft
m_EditorClassIdentifier:
mustHaveAll: 0
acceptedTraits:
- {fileID: 11400000, guid: 901be8d20f1f0f24181cc992dfd362ae, type: 2}
deniedTraits: []
8 changes: 8 additions & 0 deletions Assets/Content/Data/Filters/Wearables/HandLeft.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions Assets/Content/Data/Filters/Wearables/HandRight.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0adc192349dc57848b5394a2c6707c23, type: 3}
m_Name: HandRight
m_EditorClassIdentifier:
mustHaveAll: 0
acceptedTraits:
- {fileID: 11400000, guid: 6dc4b6b828749aa49aa1f52e147f2003, type: 2}
deniedTraits: []
8 changes: 8 additions & 0 deletions Assets/Content/Data/Filters/Wearables/HandRight.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions Assets/Content/Data/Filters/Wearables/Hat.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0adc192349dc57848b5394a2c6707c23, type: 3}
m_Name: Hat
m_EditorClassIdentifier:
mustHaveAll: 0
acceptedTraits:
- {fileID: 11400000, guid: 4fd47d47c95ea9d4bbfa168e63538ba1, type: 2}
deniedTraits: []
Loading

0 comments on commit f714cc7

Please sign in to comment.