This commit is contained in:
2026-07-09 21:33:33 +02:00
commit 84a2a365f3
2364 changed files with 950134 additions and 0 deletions
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 62ea6a8b80ec4a6083f3ebfdd4788fe6
timeCreated: 1675719590
@@ -0,0 +1,13 @@
using VOID.Generic.Objects.Abstract.Events;
using VOID.Generic.Objects.Unit;
namespace VOID.Generic.Objects.Usable.Events
{
public class UseEvent : AbstractEvent
{
public bool prevented = false;
public UnitObject usedBy;
public UsableObject usedObject;
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: cee157384f7c445494ffe641c0923b27
timeCreated: 1675719597
@@ -0,0 +1,25 @@
using System.Collections.Generic;
using System.Linq;
using Sirenix.OdinInspector;
using VOID.Generic.Objects.Item;
namespace VOID.Generic.Objects.Usable
{
public class UsableObject : ItemObject
{
[Title("=== UsableObject properties ===")]
public UsableObjectData usableData;
public UsableObjectEvents usableEvents;
protected override List<ObjectComponent> GetObjectComponents()
{
return base.GetObjectComponents()
.Union(new List<ObjectComponent>
{
usableData,
usableEvents
})
.ToList();
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 646dacd695a547cc972da95b40b06ea5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: 382f91dd934f80c469b59e0245989657, type: 3}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,24 @@
using System.Collections.Generic;
using Sirenix.OdinInspector;
using UnityEngine;
using VOID.Generic.Requirement;
using VOID.Generic.Status.Effect;
namespace VOID.Generic.Objects.Usable
{
[System.Serializable]
public class UsableObjectData : ObjectComponent<UsableObject>
{
[Title("Usable attributes")]
[SerializeReference]
public List<BasicEffect> applyOnUse = new();
[Title("Stacks")]
[MinValue(0)]
public int stacksPerUse = 1;
[Title("Usage Requirements")]
[SerializeReference]
public List<IUnitRequirement> requirements = new();
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 6e188f441862489a98e1246154ba52b7
timeCreated: 1675632829
@@ -0,0 +1,14 @@
using Sirenix.OdinInspector;
using UnityEngine.Events;
using VOID.Generic.Objects.Usable.Events;
namespace VOID.Generic.Objects.Usable
{
[System.Serializable]
public class UsableObjectEvents : ObjectComponent<UsableObject>
{
[Title("Usage")]
public UnityEvent<UseEvent> onUsedBefore;
public UnityEvent<UseEvent> onUsedAfter;
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 6e05943b7dc34a44a44928672d72ee74
timeCreated: 1670862582