Inventory: per-player items backbone (DR-026 Phase 0)

Data-driven ItemDatabase catalog + per-player replicated InventorySlot ([GhostField] OwnerSendType.All, a StatModifier twin). Harvest reroutes to the firing player's personal inventory (optional ComponentLookup<GhostOwner> in ResourceHarvestSystem; remainder/un-owned -> ledger); the G-key InventoryDepositRequest RPC moves the bag into the shared ledger the build economy spends. Catalog asset (Aether/Ore/Biomass + Stone Pickaxe) wired into the Gameplay subscene; read-only HUD inventory panel. ushort ItemId subsumes ResourceId; byte Category/Tier baked for gear-tier progression. Session-only (no SaveData bump).

Play-validated host+client: catalog baked into both worlds, the re-baked player ghost carries InventorySlot with a clean handshake, a server write replicates to the client owner, the deposit RPC round-trips, and the HUD renders catalog names. See DR-026.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-08 09:43:31 -07:00
parent 1ed2aa46c5
commit 599b9b4255
37 changed files with 848 additions and 1 deletions
+19
View File
@@ -0,0 +1,19 @@
%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: 84295e2f852afac4fa4b7384857281d9, type: 3}
m_Name: Item_Aether
m_EditorClassIdentifier: ProjectM.Authoring::ProjectM.Authoring.ItemDefinition
ItemId: 1
DisplayName: Aether
Category: 0
Tier: 0
StackMax: 999
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 938a882b6fbd50d4c9a051ddabc5829b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+19
View File
@@ -0,0 +1,19 @@
%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: 84295e2f852afac4fa4b7384857281d9, type: 3}
m_Name: Item_Biomass
m_EditorClassIdentifier: ProjectM.Authoring::ProjectM.Authoring.ItemDefinition
ItemId: 3
DisplayName: Biomass
Category: 0
Tier: 0
StackMax: 999
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a2a0e6d3ae0218d458d2b5305891ce89
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+19
View File
@@ -0,0 +1,19 @@
%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: 84295e2f852afac4fa4b7384857281d9, type: 3}
m_Name: Item_Ore
m_EditorClassIdentifier: ProjectM.Authoring::ProjectM.Authoring.ItemDefinition
ItemId: 2
DisplayName: Ore
Category: 0
Tier: 0
StackMax: 999
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4ed399a329eb6d847921aef05bde213d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,19 @@
%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: 84295e2f852afac4fa4b7384857281d9, type: 3}
m_Name: Item_StonePickaxe
m_EditorClassIdentifier: ProjectM.Authoring::ProjectM.Authoring.ItemDefinition
ItemId: 10
DisplayName: Stone Pickaxe
Category: 1
Tier: 1
StackMax: 1
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 31ec40cfc6e81ef4ab9bbce57a40621e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant: