Firstborn/Assets/RPG Creation Kit/Scripts/Save System/SaveElements/LootingPointsData.cs
Schaken-Mods 959e80cf72 assets upload
assets upload description.
2023-03-28 12:16:30 -05:00

40 lines
1.1 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RPGCreationKit;
using RPGCreationKit.SaveSystem;
namespace RPGCreationKit.SaveSystem
{
[System.Serializable]
public class LootingPointsDictionary : SerializableDictionary<string, LootingPointSaveData> { }
/// <summary>
/// Represent a single looting point
/// </summary>
[System.Serializable]
public class LootingPointSaveData
{
public string lootingID;
public int ContainerLockLevel;
public bool isLocked;
public List<ItemInInventory> allItems = new List<ItemInInventory>();
public void RetrieveItemsFromDatabase()
{
for (int i = 0; i < allItems.Count; i++)
allItems[i].item = ItemsDatabase.GetItem(allItems[i].externalItemID);
}
}
/// <summary>
/// Represent the collection of all looting points in the game
/// </summary>
[System.Serializable]
public class LootingPointsData
{
[SerializeField] public LootingPointsDictionary allLootingPoints = new LootingPointsDictionary();
}
}