Inventory reimplementation (from MonsterShop). Top panel is temporarily broken

This commit is contained in:
Aggtaa
2026-01-20 22:47:58 +03:00
parent a9fb1864a5
commit 29899842e4
33 changed files with 913 additions and 129 deletions
@@ -0,0 +1,15 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class GameData
{
public long lastUpdated;
public PlayerData player = new PlayerData();
public StorageData storage = new StorageData();
public List<ShelfData> shelves = new List<ShelfData>();
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 89cbdf7a2dcd8ab40a929072c7493273
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,12 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class InventoryData
{
public float capacity = 0;
public SerializableDictionary<string, float> items =
new SerializableDictionary<string, float>();
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3bcd40c816f3fb24a8aa90a6438d53a0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,7 @@
using System;
[System.Serializable]
public class PlayerData
{
public InventoryData inventory = new InventoryData();
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: ff587676af26ad344af1761388bb9016
@@ -0,0 +1,11 @@
using UnityEngine;
[System.Serializable]
public class ShelfData
{
public string type = "shelf";
public Vector2 location = Vector2.zero;
public float angle = 0;
public InventoryData inventory = new InventoryData();
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: e220bc2634b66924c99448f4bd3a824c
@@ -0,0 +1,7 @@
using System;
[System.Serializable]
public class StorageData
{
public InventoryData inventory = new InventoryData();
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 9691713479005104ea634e90c3338df3