Compare commits

..

4 Commits

Author SHA1 Message Date
zenny a20c80d922 Remaining changes 2026-02-13 16:33:30 -08:00
zenny e14007b7f4 Merge branch 'main' into item_changes 2026-02-13 16:24:40 -08:00
zenny fe0241ac88 update 2026-02-13 16:11:38 -08:00
zenny 0ab6ef1343 In progress item changes 2026-02-13 15:59:10 -08:00
7083 changed files with 84241 additions and 212200 deletions
@@ -1,54 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Zennysoft.Game.Abstractions.Audio
{
public enum SoundEffect
{
HealHP,
TakeDamage,
HealVT,
IncreaseStat,
DecreaseStat,
Crit,
PickupItem,
PickupFailure,
OpenInventory,
MoveUI,
Equip,
Unequip,
SortInventory,
SelectUI,
CancelUI,
LevelUp,
Transfer,
RecallEnemies,
KillHalfEnemies,
TeleportToRandomRoom,
TeleportToExit,
AbsorbHPFromAllEnemies,
SwapHPAndVT,
TurnAllEnemiesIntoHealingItems,
WeaponQuickSlash,
WeaponSlowSlash,
WeaponPlasmaSword,
Eucharistia,
Buff,
Debuff,
Death,
Glue,
Identify,
IdentifyAll,
Rust,
FireDamage,
WaterDamage,
AirDamage,
EarthDamage,
HolyDamage,
CurseDamage,
AbsorbHP,
}
}
@@ -1,6 +0,0 @@
namespace Zennysoft.Game.Abstractions
{
public interface IFloorSpawnTable
{
}
}
@@ -6,9 +6,6 @@ using System.IO.Abstractions;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization.Metadata; using System.Text.Json.Serialization.Metadata;
using Zennysoft.Game.Abstractions; using Zennysoft.Game.Abstractions;
using System.Threading.Tasks;
using System.IO;
using Zennysoft.Game.Ma;
namespace Zennysoft.Game.Implementation; namespace Zennysoft.Game.Implementation;
@@ -30,9 +27,9 @@ public class SaveFileManager : ISaveFileManager
public Task<T?> ReadFromFile<T>(params IJsonTypeInfoResolver?[] resolvers) public Task<T?> ReadFromFile<T>(params IJsonTypeInfoResolver?[] resolvers)
{ {
return !_fileSystem.File.Exists(_defaultSaveLocation) if (!_fileSystem.File.Exists(_defaultSaveLocation))
? throw new FileNotFoundException() throw new FileNotFoundException();
: ReadFromFile<T>(_defaultSaveLocation, resolvers); return ReadFromFile<T>(_defaultSaveLocation, resolvers);
} }
public async Task<T?> ReadFromFile<T>(string filePath, params IJsonTypeInfoResolver?[] resolvers) public async Task<T?> ReadFromFile<T>(string filePath, params IJsonTypeInfoResolver?[] resolvers)
@@ -8,7 +8,7 @@ public enum ElementType
Hydric, Hydric,
Igneous, Igneous,
Ferrum, Ferrum,
Sankta, Holy,
Shura, Curse,
All All
} }
@@ -15,6 +15,4 @@ public interface IAttackComponent : IEntityComponent
public void SetAttack(int attack); public void SetAttack(int attack);
public void RaiseMaximumAttack(int raiseAmount); public void RaiseMaximumAttack(int raiseAmount);
public void LowerMaximumAttack(int lowerAmount);
} }
@@ -15,6 +15,4 @@ public interface IDefenseComponent : IEntityComponent
public void SetDefense(int attack); public void SetDefense(int attack);
public void RaiseMaximumDefense(int raiseAmount); public void RaiseMaximumDefense(int raiseAmount);
public void LowerMaximumDefense(int lowerAmount);
} }
@@ -1,4 +1,5 @@
using Chickensoft.Collections; using Chickensoft.Collections;
using Godot;
using Zennysoft.Ma.Adapter.Entity; using Zennysoft.Ma.Adapter.Entity;
namespace Zennysoft.Ma.Adapter; namespace Zennysoft.Ma.Adapter;
@@ -16,13 +16,7 @@ public interface IExperiencePointsComponent : IEntityComponent
public void Gain(int baseExpGain); public void Gain(int baseExpGain);
public void GainUnmodified(int flateRateExpGain);
public void LevelUp(); public void LevelUp();
public void LevelDown();
public event Action PlayerLevelUp; public event Action PlayerLevelUp;
public event Action PlayerLevelDown;
} }
@@ -9,19 +9,17 @@ public interface IHealthComponent : IEntityComponent
public IAutoProp<int> MaximumHP { get; } public IAutoProp<int> MaximumHP { get; }
public event Action? HealthReachedZero; public event Action? HealthReachedZero;
public event Action<ElementType>? DamageTaken; public event Action? DamageTaken;
public bool AtFullHealth { get; } public bool AtFullHealth { get; }
public void Heal(int healAmount); public void Heal(int healAmount);
public void Damage(int damageAmount, ElementType elementType); public void Damage(int damageAmount);
public void SetCurrentHealth(int health); public void SetCurrentHealth(int health);
public void SetMaximumHealth(int health); public void SetMaximumHealth(int health);
public void RaiseMaximumHP(int raiseAmount, bool restoreHP = false); public void RaiseMaximumHP(int raiseAmount, bool restoreHP = false);
public void LowerMaximumHP(int lowerAmount);
} }
@@ -1,37 +0,0 @@
using Godot;
using Zennysoft.Ma.Adapter;
using Zennysoft.Ma.Adapter.Entity;
namespace Zennysoft.Ma;
public interface ISigil
{
[Export]
public double DamageModifier { get; }
[Export]
public double DefenseModifier { get; }
[Export]
public double MoveSpeedModifier { get; }
[Export]
public double HealAmountModifier { get; }
[Export]
public double VTDrainSpeedModifier { get; }
[Export]
public ElementType ElementType { get; }
[Export]
public ElementalResistanceSet ElementalResistanceSet { get; }
[Export] public SigilTag SigilTag { get; }
}
public enum SigilTag
{
None,
AutoRevive,
HPDrain,
}
@@ -1,8 +0,0 @@
namespace Zennysoft.Ma;
public interface ISigilComponent
{
ISigil Sigil { get; set; }
public void Reset();
}
@@ -1,13 +0,0 @@
using Chickensoft.Collections;
using Godot;
using Zennysoft.Ma.Adapter;
public interface IStatusEffectComponent : IEntityComponent
{
[Export] public double RustDuration { get; set; }
public AutoProp<bool> Rust { get; }
public bool ImmuneToRust { get; set; }
}
@@ -4,11 +4,7 @@ namespace Zennysoft.Ma.Adapter;
public interface ILuckComponent : IEntityComponent public interface ILuckComponent : IEntityComponent
{ {
public int InitialLuck { get; }
public IAutoProp<int> Luck { get; } public IAutoProp<int> Luck { get; }
public void IncreaseLuck(int value); public void IncreaseLuck(int value);
void DecreaseLuck(int value);
} }
@@ -18,7 +18,5 @@ public interface IVTComponent : IEntityComponent
public void RaiseMaximumVT(int raiseAmount, bool restoreVT = true); public void RaiseMaximumVT(int raiseAmount, bool restoreVT = true);
public void LowerMaximumVT(int lowerAmount);
public void SetMaximumVT(int vt); public void SetMaximumVT(int vt);
} }
@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3] [gd_scene load_steps=2 format=3 uid="uid://c7e5g8l6wuph"]
[ext_resource type="Script" path="res://src/enemy/behaviors/PatrolBehavior.cs" id="1_lobva"] [ext_resource type="Script" uid="uid://87d8kluait8y" path="res://src/enemy/behaviors/PatrolBehavior.cs" id="1_lobva"]
[node name="NavigationAgent" type="NavigationAgent3D"] [node name="NavigationAgent" type="NavigationAgent3D"]
avoidance_enabled = true avoidance_enabled = true
@@ -19,8 +19,8 @@ namespace Zennysoft.Ma.Adapter.Entity
{ ElementType.Igneous, igneousResistance }, { ElementType.Igneous, igneousResistance },
{ ElementType.Ferrum, ferrumResistance }, { ElementType.Ferrum, ferrumResistance },
{ ElementType.Telluric, telluricResistance }, { ElementType.Telluric, telluricResistance },
{ ElementType.Sankta, holyResistance }, { ElementType.Holy, holyResistance },
{ ElementType.Shura, curseResistance }, { ElementType.Curse, curseResistance },
{ ElementType.All, aeolicResistance + hydricResistance + igneousResistance + ferrumResistance + telluricResistance + holyResistance + curseResistance }, { ElementType.All, aeolicResistance + hydricResistance + igneousResistance + ferrumResistance + telluricResistance + holyResistance + curseResistance },
}; };
} }
@@ -33,8 +33,8 @@ namespace Zennysoft.Ma.Adapter.Entity
left.ElementalResistance[ElementType.Igneous] + right.ElementalResistance[ElementType.Igneous], left.ElementalResistance[ElementType.Igneous] + right.ElementalResistance[ElementType.Igneous],
left.ElementalResistance[ElementType.Ferrum] + right.ElementalResistance[ElementType.Ferrum], left.ElementalResistance[ElementType.Ferrum] + right.ElementalResistance[ElementType.Ferrum],
left.ElementalResistance[ElementType.Telluric] + right.ElementalResistance[ElementType.Telluric], left.ElementalResistance[ElementType.Telluric] + right.ElementalResistance[ElementType.Telluric],
left.ElementalResistance[ElementType.Sankta] + right.ElementalResistance[ElementType.Sankta], left.ElementalResistance[ElementType.Holy] + right.ElementalResistance[ElementType.Holy],
left.ElementalResistance[ElementType.Shura] + right.ElementalResistance[ElementType.Shura]); left.ElementalResistance[ElementType.Curse] + right.ElementalResistance[ElementType.Curse]);
} }
} }
} }
@@ -21,14 +21,6 @@ namespace Zennysoft.Ma.Adapter.Entity
public void OnMorph(); public void OnMorph();
public void OnBuff();
public void OnDebuff();
public void OnHealed();
public int GetDefeatCount(IEnemy enemyType);
public IDungeonRoom GetCurrentRoom(ImmutableList<IDungeonRoom> dungeonRooms); public IDungeonRoom GetCurrentRoom(ImmutableList<IDungeonRoom> dungeonRooms);
public void MoveEnemyToNewRoom(IDungeonRoom newRoom); public void MoveEnemyToNewRoom(IDungeonRoom newRoom);
@@ -39,14 +31,8 @@ namespace Zennysoft.Ma.Adapter.Entity
public IDefenseComponent DefenseComponent { get; } public IDefenseComponent DefenseComponent { get; }
public IStatusEffectComponent StatusEffectComponent { get; }
public ElementalResistanceSet ElementalResistanceSet { get; } public ElementalResistanceSet ElementalResistanceSet { get; }
public void SetEnemySpeedByMultiplier(double multiplier);
public IEnemyLootTable LootTable { get; }
public int InitialHP { get; } public int InitialHP { get; }
public int InitialAttack { get; } public int InitialAttack { get; }
@@ -1,6 +0,0 @@
namespace Zennysoft.Ma.Adapter.Entity;
public interface IEnemyLootTable
{
}
@@ -1,11 +0,0 @@
namespace Zennysoft.Ma.Adapter;
public enum SpellFXEnum
{
AnBradan,
DivinityRecall,
ItemBreak,
Kyuuketsuki,
Persiko,
Radial
}
@@ -1,26 +1,16 @@
using Godot; using Zennysoft.Ma.Adapter;
using Zennysoft.Ma.Adapter;
public class Augment public class Augment
{ {
public JewelTags AugmentTag; public JewelTags AugmentTag;
public Augment(JewelTags tag, IAugmentType augment, string name, string description, Texture2D augmentTexture) public Augment(JewelTags tag, IAugmentType augment)
{ {
AugmentTag = tag; AugmentTag = tag;
AugmentName = name;
AugmentType = augment; AugmentType = augment;
AugmentDescription = description;
AugmentTexture = augmentTexture;
} }
public IAugmentType AugmentType { get; set; } public IAugmentType AugmentType { get; set; }
public string AugmentName { get; set; }
public string AugmentDescription { get; set; }
public Texture2D AugmentTexture { get; set; }
} }
public class HPRecoverySpeedAugment : IAugmentType public class HPRecoverySpeedAugment : IAugmentType
@@ -104,33 +94,6 @@ public class LowerEXPRateAugment : IAugmentType
public void Remove() => _player.ExperiencePointsComponent.ModifyExpGainRate(_player.ExperiencePointsComponent.ExpGainRate.Value + 0.25f); public void Remove() => _player.ExperiencePointsComponent.ModifyExpGainRate(_player.ExperiencePointsComponent.ExpGainRate.Value + 0.25f);
} }
public class BoostStatsAugment : IAugmentType
{
private readonly IPlayer _player;
private readonly int _bonusLuck;
private readonly int _bonusHp;
private readonly int _bonusVt;
public BoostStatsAugment(IPlayer player, int bonusLuck, int bonusHp, int bonusVt)
{
_player = player;
_bonusLuck = bonusLuck;
_bonusHp = bonusHp;
_bonusVt = bonusVt;
}
public void Apply()
{
_player.HealthComponent.RaiseMaximumHP(_bonusHp);
_player.VTComponent.RaiseMaximumVT(_bonusVt);
_player.LuckComponent.IncreaseLuck(_bonusLuck);
}
public void Remove()
{
}
}
public class LowerHPRecoveryAugment : IAugmentType public class LowerHPRecoveryAugment : IAugmentType
{ {
private readonly IPlayer _player; private readonly IPlayer _player;
@@ -202,23 +165,3 @@ public class RevivePlayerAugment : IAugmentType
_player.AutoRevive = false; _player.AutoRevive = false;
} }
} }
public class KeyStaffAugment : IAugmentType
{
private readonly IPlayer _player;
public KeyStaffAugment(IPlayer player)
{
_player = player;
}
public void Apply()
{
_player.CanOpenDoors = true;
}
public void Remove()
{
_player.CanOpenDoors &= false;
}
}
@@ -4,6 +4,5 @@ public enum AccessoryTag
{ {
None, None,
HalfVTConsumption, HalfVTConsumption,
StatusEffectImmunity, StatusEffectImmunity
BoostEXPGainRate
} }
@@ -1,8 +0,0 @@
namespace Zennysoft.Ma.Adapter;
public enum ArmorTag
{
None,
DegradeOnHit,
ImmuneToRust
}
@@ -3,7 +3,7 @@
public enum ItemTag public enum ItemTag
{ {
None, None,
BreaksOnFloorExit, BreaksOnChange,
MysteryItem, MysteryItem,
DamagesPlayer, DamagesPlayer,
ContainsRestorative, ContainsRestorative,
@@ -20,9 +20,5 @@ public enum ItemTag
RestrictUnequip, RestrictUnequip,
UnequipAllItems, UnequipAllItems,
EjectAllItems, EjectAllItems,
UseAllItems, UseAllItems
GlueOnEquip,
BreaksOnUnequip,
ContainsJewel,
KeyItem
} }
@@ -17,6 +17,5 @@ public enum JewelTags
ReviveUserOnce, ReviveUserOnce,
TelluricElement, TelluricElement,
IncreaseAtkDefLuck, IncreaseAtkDefLuck,
IncreaseLuck, IncreaseLuck
KeyStaff
} }
@@ -14,26 +14,11 @@ public enum UsableItemTag
DealElementalDamageToAllEnemiesInRoom, DealElementalDamageToAllEnemiesInRoom,
RaiseCurrentWeaponAttack, RaiseCurrentWeaponAttack,
RaiseCurrentDefenseArmor, RaiseCurrentDefenseArmor,
LowerCurrentDefenseArmor,
RaiseLevel, RaiseLevel,
LowerLevel,
RandomEffect, RandomEffect,
DoubleExp, DoubleExp,
LowerTargetTo1HP, LowerTargetTo1HP,
CanChangeAffinity, CanChangeAffinity,
TeleportToRandomLocation, TeleportToRandomLocation,
WarpToExitIfFound, WarpToExitIfFound
IncreaseDefense,
IncreaseLuck,
IncreaseAttack,
DecreaseDefense,
DecreaseLuck,
DecreaseAttack,
DecreaseAllStats,
Clone,
MeltAllEquipment,
RestoreStats,
GlueAllEquipment,
DoubleStackedItems,
IdentifyRandomItem
} }
@@ -16,8 +16,18 @@ public interface IGameRepo : IDisposable
event Action<string>? AnnounceMessageInInventoryEvent; event Action<string>? AnnounceMessageInInventoryEvent;
event Action<int>? DoubleExpTimeStart;
event Action? DoubleExpTimeEnd;
event Action<IBaseInventoryItem>? RemoveItemFromInventoryEvent; event Action<IBaseInventoryItem>? RemoveItemFromInventoryEvent;
event Action? PlayerAttack;
event Action? PlayerAttackedWall;
event Action? PlayerAttackedEnemy;
event Action<IEquipableItem>? EquippedItem; event Action<IEquipableItem>? EquippedItem;
event Action<IEquipableItem>? UnequippedItem; event Action<IEquipableItem>? UnequippedItem;
@@ -30,12 +40,20 @@ public interface IGameRepo : IDisposable
IAutoProp<bool> IsPaused { get; } IAutoProp<bool> IsPaused { get; }
public void StartDoubleEXP(TimeSpan lengthOfEffect);
public void EndDoubleExp();
public void AnnounceMessageOnMainScreen(string message); public void AnnounceMessageOnMainScreen(string message);
public void AnnounceMessageInInventory(string message); public void AnnounceMessageInInventory(string message);
public void RemoveItemFromInventory(IBaseInventoryItem item); public void RemoveItemFromInventory(IBaseInventoryItem item);
public void OnPlayerAttack();
public void OnPlayerAttackedWall();
public void CloseInventory(); public void CloseInventory();
public void GameEnded(); public void GameEnded();
@@ -45,6 +63,8 @@ public interface IGameRepo : IDisposable
public void OnUnequippedItem(IEquipableItem item); public void OnUnequippedItem(IEquipableItem item);
public void OnEnemyDied(IEnemy enemy); public void OnEnemyDied(IEnemy enemy);
public double ExpRate { get; }
} }
public class GameRepo : IGameRepo public class GameRepo : IGameRepo
@@ -53,18 +73,26 @@ public class GameRepo : IGameRepo
public event Action? CloseInventoryEvent; public event Action? CloseInventoryEvent;
public event Action<string>? AnnounceMessageOnMainScreenEvent; public event Action<string>? AnnounceMessageOnMainScreenEvent;
public event Action<string>? AnnounceMessageInInventoryEvent; public event Action<string>? AnnounceMessageInInventoryEvent;
public event Action<int>? DoubleExpTimeStart;
public event Action? DoubleExpTimeEnd;
public event Action<IBaseInventoryItem>? RemoveItemFromInventoryEvent; public event Action<IBaseInventoryItem>? RemoveItemFromInventoryEvent;
public event Action? PlayerAttack;
public event Action? PlayerAttackedWall;
public event Action? PlayerAttackedEnemy;
public event Action<IEquipableItem>? EquippedItem; public event Action<IEquipableItem>? EquippedItem;
public event Action<IEquipableItem>? UnequippedItem; public event Action<IEquipableItem>? UnequippedItem;
public event Action<IEnemy>? EnemyDied; public event Action<IEnemy>? EnemyDied;
public IAutoProp<bool> IsPaused => _isPaused; public IAutoProp<bool> IsPaused => _isPaused;
private readonly AutoProp<bool> _isPaused; private readonly AutoProp<bool> _isPaused;
public double ExpRate { get; private set; }
private bool _disposedValue; private bool _disposedValue;
public GameRepo() public GameRepo()
{ {
_isPaused = new AutoProp<bool>(true); _isPaused = new AutoProp<bool>(true);
ExpRate = 1;
} }
public void Pause() public void Pause()
@@ -79,6 +107,20 @@ public class GameRepo : IGameRepo
GD.Print("Resume"); GD.Print("Resume");
} }
public void StartDoubleEXP(TimeSpan lengthOfEffect)
{
AnnounceMessageInInventory("Experience points temporarily doubled.");
DoubleExpTimeStart?.Invoke(lengthOfEffect.Seconds);
ExpRate *= 2;
}
public void EndDoubleExp()
{
AnnounceMessageOnMainScreen("Experience points effect wore off.");
DoubleExpTimeEnd?.Invoke();
ExpRate /= 2;
}
public void AnnounceMessageOnMainScreen(string message) public void AnnounceMessageOnMainScreen(string message)
{ {
AnnounceMessageOnMainScreenEvent?.Invoke(message); AnnounceMessageOnMainScreenEvent?.Invoke(message);
@@ -94,6 +136,16 @@ public class GameRepo : IGameRepo
RemoveItemFromInventoryEvent?.Invoke(item); RemoveItemFromInventoryEvent?.Invoke(item);
} }
public void OnPlayerAttack()
{
PlayerAttack?.Invoke();
}
public void OnPlayerAttackedWall()
{
PlayerAttackedWall?.Invoke();
}
public void CloseInventory() public void CloseInventory()
{ {
CloseInventoryEvent?.Invoke(); CloseInventoryEvent?.Invoke();
@@ -12,8 +12,6 @@ public partial class GameState
public readonly record struct LoadNextFloor; public readonly record struct LoadNextFloor;
public readonly record struct ReturnToOverworld;
public readonly record struct InventoryButtonPressed; public readonly record struct InventoryButtonPressed;
public readonly record struct InteractButtonPressed; public readonly record struct InteractButtonPressed;
@@ -20,8 +20,6 @@ public partial class GameState
public readonly record struct LoadNextFloor; public readonly record struct LoadNextFloor;
public readonly record struct ReturnToOverworld;
public readonly record struct OpenTeleportScreen; public readonly record struct OpenTeleportScreen;
public readonly record struct OpenFloorExitScreen; public readonly record struct OpenFloorExitScreen;
@@ -8,12 +8,11 @@ public partial class GameState
public partial record State public partial record State
{ {
[Meta, LogicBlock(typeof(State), Diagram = true)] [Meta, LogicBlock(typeof(State), Diagram = true)]
public partial record FloorExitScreen : State, IGet<Input.LoadNextFloor>, IGet<Input.ReturnToOverworld> public partial record FloorExitScreen : State, IGet<Input.LoadNextFloor>
{ {
public FloorExitScreen() public FloorExitScreen()
{ {
OnAttach(() => Get<IGameRepo>().Pause()); OnAttach(() => Get<IGameRepo>().Pause());
OnDetach(() => Get<IGameRepo>().Resume());
} }
public Transition On(in Input.LoadNextFloor input) public Transition On(in Input.LoadNextFloor input)
@@ -21,12 +20,6 @@ public partial class GameState
Output(new Output.LoadNextFloor()); Output(new Output.LoadNextFloor());
return To<InGame>(); return To<InGame>();
} }
public Transition On(in Input.ReturnToOverworld input)
{
Output(new Output.ReturnToOverworld());
return To<InGame>();
}
} }
} }
} }
@@ -2,9 +2,4 @@
public interface IArmor : IEquipableItem, IAugmentableItem public interface IArmor : IEquipableItem, IAugmentableItem
{ {
public void IncreaseArmorDefense(int bonus);
public void DecreaseArmorDefense(int lowerAmount);
public ArmorTag ArmorTag { get; }
} }
@@ -1,22 +1,15 @@
using Godot; using Godot;
using Zennysoft.Game.Abstractions;
using Zennysoft.Ma.Adapter; using Zennysoft.Ma.Adapter;
public interface IBaseInventoryItem public interface IBaseInventoryItem
{ {
public string ItemName { get; } public string ItemName { get; }
public string StatDescription { get; } public string Description { get; }
public string FlavorText { get; } public float SpawnRate { get; }
public int ThrowDamage { get; } public int ThrowDamage { get; }
public float ThrowSpeed { get; } public float ThrowSpeed { get; }
public ItemTag ItemTag { get; } public ItemTag ItemTag { get; }
public abstract Texture2D GetTexture(); public abstract Texture2D GetTexture();
public float SpawnRate { get; }
public RarityTag RarityTag { get; }
public IFloorSpawnTable SpawnsOn { get; }
} }
@@ -1,43 +1,16 @@
using Chickensoft.Serialization; using Chickensoft.Introspection;
using Chickensoft.Serialization;
namespace Zennysoft.Ma.Adapter; namespace Zennysoft.Ma.Adapter;
public class RescuedItemDatabase [Meta, Id("rescued_items")]
public partial class RescuedItemDatabase
{ {
[Save("rescued_item_list")] [Save("rescued_item_list")]
private List<IBaseInventoryItem> _items { get; init; } public List<IBaseInventoryItem> Items { get; init; }
private int _maxSize { get; init; } = 20;
public RescuedItemDatabase() public RescuedItemDatabase()
{ {
_items = []; Items = new List<IBaseInventoryItem>();
} }
public RescuedItemDatabase(int maxSize)
{
_items = [];
_maxSize = maxSize;
}
public RescuedItemDatabase(List<IBaseInventoryItem> items, int maxSize)
{
_items = items;
_maxSize = maxSize;
}
public bool TryAdd(IBaseInventoryItem item)
{
if (_items.Count >= _maxSize)
return false;
if (item is IEquipableItem equipable)
equipable.Glued = false;
_items.Add(item);
return true;
}
public void Remove(IBaseInventoryItem item) => _items.Remove(item);
public List<IBaseInventoryItem> GetItems() => _items;
public void Clear() => _items.Clear();
} }
@@ -19,18 +19,3 @@ public partial class BoxItemTagEnumContext : JsonSerializerContext;
[JsonSerializable(typeof(ElementType))] [JsonSerializable(typeof(ElementType))]
public partial class ElementTypeEnumContext : JsonSerializerContext; public partial class ElementTypeEnumContext : JsonSerializerContext;
[JsonSerializable(typeof(JewelTags))]
public partial class JewelTagsEnumContext : JsonSerializerContext;
[JsonSerializable(typeof(IBaseInventoryItem))]
public partial class BaseInventoryItemContext : JsonSerializerContext
{
}
[JsonSerializable(typeof(RescuedItemDatabase))]
public partial class RescuedItemDatabaseContext : JsonSerializerContext
{
}
@@ -1,33 +0,0 @@
namespace Zennysoft.Ma.Adapter;
public enum FloorType
{
Overworld,
Altar,
Floor01,
Floor02,
Floor03,
Floor04,
Floor05,
Floor06,
Floor07,
Floor09,
Floor10,
Floor11,
Floor12,
Floor13,
Floor14,
Floor15,
BossFloorA,
BossFloorB,
GoddessOfGuidance,
TrueGoddessOfGuidance,
Cellular,
Grassland,
Platform,
River,
Server,
FinalFloor,
BadEnd,
HeartOfAllThings
}
@@ -11,7 +11,7 @@ public interface IDungeonFloor : INode3D
public ImmutableList<IDungeonRoom> Rooms { get; } public ImmutableList<IDungeonRoom> Rooms { get; }
public IDungeonRoom GetPlayersCurrentRoom(); public void FadeOutAudio();
public bool FloorIsLoaded { get; set; } public bool FloorIsLoaded { get; set; }
} }
@@ -1,12 +0,0 @@
using Godot.Collections;
namespace Zennysoft.Ma.Adapter;
public enum RarityTag
{
Common, // 50%
Uncommon, // 35%
Rare, // 14%
Legendary, // 1%
NotSpawnable
}
@@ -10,6 +10,8 @@ public class Module
public static void Bootstrap(Container container) public static void Bootstrap(Container container)
{ {
container.RegisterSingleton<IFileSystem, FileSystem>(); container.RegisterSingleton<IFileSystem, FileSystem>();
container.RegisterSingleton<ISaveFileManager, SaveFileManager>();
container.RegisterSingleton<IMaSaveFileManager, MaSaveFileManager>();
container.RegisterSingleton<IGameRepo, GameRepo>(); container.RegisterSingleton<IGameRepo, GameRepo>();
container.RegisterSingleton<IGameState, GameState>(); container.RegisterSingleton<IGameState, GameState>();
container.RegisterSingleton<IDimmableAudioStreamPlayer, DimmableAudioStreamPlayer>(); container.RegisterSingleton<IDimmableAudioStreamPlayer, DimmableAudioStreamPlayer>();
@@ -1,9 +0,0 @@
namespace Zennysoft.Ma.Adapter;
public enum GroundType
{
Dirt,
Concrete,
Metal,
Marble
}
@@ -1,7 +1,6 @@
using Chickensoft.GodotNodeInterfaces; using Chickensoft.GodotNodeInterfaces;
using Godot; using Godot;
using Zennysoft.Game.Abstractions; using Zennysoft.Game.Abstractions;
using Zennysoft.Game.Abstractions.Audio;
namespace Zennysoft.Ma.Adapter; namespace Zennysoft.Ma.Adapter;
@@ -19,8 +18,6 @@ public interface IPlayer : IKillable, ICharacterBody3D
public void LevelUp(); public void LevelUp();
public void EnactBriefImmunity();
public void TeleportPlayer((Vector3 Rotation, Vector3 Position) newTransform); public void TeleportPlayer((Vector3 Rotation, Vector3 Position) newTransform);
public void Equip(IEquipableItem equipable); public void Equip(IEquipableItem equipable);
@@ -29,15 +26,9 @@ public interface IPlayer : IKillable, ICharacterBody3D
public void PlayJumpScareAnimation(); public void PlayJumpScareAnimation();
public void SetSigil(ISigil sigil);
public void ShowCamera(bool showCamera);
public void ApplyNewAugment(IAugmentItem jewel, IAugmentableItem equipableItem); public void ApplyNewAugment(IAugmentItem jewel, IAugmentableItem equipableItem);
public IBaseInventoryItem IdentifyItem(IBaseInventoryItem unidentifiedItem); public void IdentifyItem(IBaseInventoryItem unidentifiedItem);
public void ShakePlayerCamera(float shakeIntensity, float shakeAmount);
public IInventory Inventory { get; } public IInventory Inventory { get; }
@@ -55,19 +46,10 @@ public interface IPlayer : IKillable, ICharacterBody3D
public IEquipmentComponent EquipmentComponent { get; } public IEquipmentComponent EquipmentComponent { get; }
public IStatusEffectComponent StatusEffectComponent { get; }
public ISigilComponent SigilComponent { get; }
public void SetHealthTimerStatus(bool isActive); public void SetHealthTimerStatus(bool isActive);
public void ModifyHealthTimerSpeed(float newModifier); public void ModifyHealthTimerSpeed(float newModifier);
public void PlaySpellFX(SpellFXEnum spellEnum);
public void SetPlayerWalkSFX(GroundType groundType);
public bool AutoRevive { get; set; } public bool AutoRevive { get; set; }
public int TotalAttack { get; } public int TotalAttack { get; }
@@ -80,10 +62,6 @@ public interface IPlayer : IKillable, ICharacterBody3D
public bool AutoIdentifyItems { get; set; } public bool AutoIdentifyItems { get; set; }
public bool BriefImmunity { get; set; }
public bool CanOpenDoors { get; set; }
public event Action PlayerDied; public event Action PlayerDied;
public delegate IBaseInventoryItem RerollItem(IBaseInventoryItem item); public delegate IBaseInventoryItem RerollItem(IBaseInventoryItem item);
} }
@@ -1,11 +0,0 @@
using Chickensoft.Introspection;
using Chickensoft.Serialization;
namespace Zennysoft.Ma.Adapter;
[Meta, Id("npc_data")]
public partial record NpcData
{
[Save("stele_list")]
public required List<int> SteleDiscovered { get; set; }
}
@@ -1,29 +0,0 @@
using Chickensoft.Introspection;
using Chickensoft.Serialization;
namespace Zennysoft.Ma.Adapter;
[Meta, Id("sarco_data")]
public partial record SarcoData
{
[Save("aeolic_sarco")]
public bool AeolicSarcoAcquired { get; set; } = false;
[Save("igneous_sarco")]
public bool IgneousSarcoAcquired { get; set; } = false;
[Save("telluric_sarco")]
public bool TelluricSarcoAcquired { get; set; } = false;
[Save("hydric_sarco")]
public bool HydricSarcoAcquired { get; set; } = false;
[Save("ferrum_sarco")]
public bool FerrumSarcoAcquired { get; set; } = false;
[Save("sankta_sarco")]
public bool SanktaSarcoAcquired { get; set; } = false;
[Save("shura_sarco")]
public bool ShuraSarcoAcquired { get; set; } = false;
}
@@ -1,13 +0,0 @@
using Chickensoft.Introspection;
using Chickensoft.Serialization;
namespace Zennysoft.Ma.Adapter;
[Meta, Id("stat_data")]
public partial record StatData
{
[Save("enemies_defeated")]
public Dictionary<string, int> EnemiesDefeated { get; set; } = [];
public int TotalEnemiesDefeated => EnemiesDefeated.Values.Sum();
}
@@ -0,0 +1,31 @@
using System.Collections.Immutable;
using System.Text.Json.Serialization.Metadata;
using Zennysoft.Game.Abstractions;
namespace Zennysoft.Ma.Adapter;
public interface IMaSaveFileManager
{
Task Save<T>(T gameData);
Task<T?> Load<T>();
}
public sealed class MaSaveFileManager : IMaSaveFileManager
{
private readonly ISaveFileManager _saveFileManager;
private ImmutableList<IJsonTypeInfoResolver> _converters;
public MaSaveFileManager(ISaveFileManager saveFileManager)
{
_saveFileManager = saveFileManager;
_converters = [WeaponTagEnumContext.Default, ItemTagEnumContext.Default, ElementTypeEnumContext.Default, AccessoryTagEnumContext.Default, UsableItemTagEnumContext.Default, BoxItemTagEnumContext.Default];
}
public async Task Save<T>(T gameData)
{
await _saveFileManager.WriteToFile(gameData, [.. _converters]);
}
public async Task<T?> Load<T>() => await _saveFileManager.ReadFromFile<T>([.. _converters]);
}
@@ -31,8 +31,4 @@
<ProjectReference Include="..\Zennysoft.Game.Godot.Implementation\Zennysoft.Game.Implementation.csproj" /> <ProjectReference Include="..\Zennysoft.Game.Godot.Implementation\Zennysoft.Game.Implementation.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Save\" />
</ItemGroup>
</Project> </Project>
-61
View File
@@ -1,61 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.11.35222.181
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ma", "Ma.csproj", "{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Zennysoft.Game.Abstractions", "..\Zennysoft.Game.Abstractions\Zennysoft.Game.Abstractions.csproj", "{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Zennysoft.Game.Implementation", "..\Zennysoft.Game.Godot.Implementation\Zennysoft.Game.Implementation.csproj", "{F6808C1C-EDFB-4602-BA01-34FB682A270C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Zennysoft.Ma.Adapter", "..\Zennysoft.Game.Ma.Implementation\Zennysoft.Ma.Adapter.csproj", "{CC55EDC3-B9EA-4393-BE4D-630C34393A94}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
ExportDebug|Any CPU = ExportDebug|Any CPU
ExportRelease|Any CPU = ExportRelease|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.Debug|Any CPU.Build.0 = Debug|Any CPU
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.Release|Any CPU.ActiveCfg = ExportRelease|Any CPU
{94D57D73-EDC5-47B2-BF34-7B57BA9C3881}.Release|Any CPU.Build.0 = ExportRelease|Any CPU
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.ExportDebug|Any CPU.ActiveCfg = Debug|Any CPU
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.ExportDebug|Any CPU.Build.0 = Debug|Any CPU
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.ExportRelease|Any CPU.ActiveCfg = Release|Any CPU
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.ExportRelease|Any CPU.Build.0 = Release|Any CPU
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D65D2AE9-D371-49F8-9E1D-BBA2907AB4AA}.Release|Any CPU.Build.0 = Release|Any CPU
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.ExportDebug|Any CPU.ActiveCfg = Debug|Any CPU
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.ExportDebug|Any CPU.Build.0 = Debug|Any CPU
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.ExportRelease|Any CPU.ActiveCfg = Release|Any CPU
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.ExportRelease|Any CPU.Build.0 = Release|Any CPU
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F6808C1C-EDFB-4602-BA01-34FB682A270C}.Release|Any CPU.Build.0 = Release|Any CPU
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.ExportDebug|Any CPU.ActiveCfg = Debug|Any CPU
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.ExportDebug|Any CPU.Build.0 = Debug|Any CPU
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.ExportRelease|Any CPU.ActiveCfg = Release|Any CPU
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.ExportRelease|Any CPU.Build.0 = Release|Any CPU
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CC55EDC3-B9EA-4393-BE4D-630C34393A94}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {797FF6A1-5959-42C9-A7A2-A8D39F9AC1A4}
EndGlobalSection
EndGlobal
@@ -1,4 +1,4 @@
[gd_scene load_steps=4 format=3 uid="uid://ekf8y405ewyq"] [gd_scene load_steps=4 format=3 uid="uid://civ6shmka5e8u"]
[ext_resource type="Script" uid="uid://klpiq4tk3t7a" path="res://addons/dialogue_manager/components/code_edit_syntax_highlighter.gd" id="1_58cfo"] [ext_resource type="Script" uid="uid://klpiq4tk3t7a" path="res://addons/dialogue_manager/components/code_edit_syntax_highlighter.gd" id="1_58cfo"]
[ext_resource type="Script" uid="uid://djeybvlb332mp" path="res://addons/dialogue_manager/components/code_edit.gd" id="1_g324i"] [ext_resource type="Script" uid="uid://djeybvlb332mp" path="res://addons/dialogue_manager/components/code_edit.gd" id="1_g324i"]
@@ -1,4 +1,4 @@
[gd_scene load_steps=3 format=3 uid="uid://cstps104wl17j"] [gd_scene load_steps=3 format=3 uid="uid://qdxrxv3c3hxk"]
[ext_resource type="Script" uid="uid://kpwo418lb2t2" path="res://addons/dialogue_manager/components/download_update_panel.gd" id="1_4tm1k"] [ext_resource type="Script" uid="uid://kpwo418lb2t2" path="res://addons/dialogue_manager/components/download_update_panel.gd" id="1_4tm1k"]
[ext_resource type="Texture2D" uid="uid://d3baj6rygkb3f" path="res://addons/dialogue_manager/assets/update.svg" id="2_4o2m6"] [ext_resource type="Texture2D" uid="uid://d3baj6rygkb3f" path="res://addons/dialogue_manager/assets/update.svg" id="2_4o2m6"]
@@ -1,8 +1,8 @@
[gd_scene load_steps=4 format=3 uid="uid://bsal283gclopj"] [gd_scene load_steps=4 format=3 uid="uid://ycn6uaj7dsrh"]
[ext_resource type="Script" uid="uid://dooe2pflnqtve" path="res://addons/dialogue_manager/components/editor_property/editor_property_control.gd" id="1_het12"] [ext_resource type="Script" uid="uid://dooe2pflnqtve" path="res://addons/dialogue_manager/components/editor_property/editor_property_control.gd" id="1_het12"]
[ext_resource type="PackedScene" path="res://addons/dialogue_manager/components/editor_property/resource_button.tscn" id="2_hh3d4"] [ext_resource type="PackedScene" uid="uid://b16uuqjuof3n5" path="res://addons/dialogue_manager/components/editor_property/resource_button.tscn" id="2_hh3d4"]
[ext_resource type="PackedScene" path="res://addons/dialogue_manager/components/files_list.tscn" id="3_l8fp6"] [ext_resource type="PackedScene" uid="uid://dnufpcdrreva3" path="res://addons/dialogue_manager/components/files_list.tscn" id="3_l8fp6"]
[node name="PropertyEditorButton" type="HBoxContainer"] [node name="PropertyEditorButton" type="HBoxContainer"]
offset_right = 40.0 offset_right = 40.0
@@ -1,4 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://bylecer7aexlb"] [gd_scene load_steps=2 format=3 uid="uid://b16uuqjuof3n5"]
[ext_resource type="Script" uid="uid://damhqta55t67c" path="res://addons/dialogue_manager/components/editor_property/resource_button.gd" id="1_7u2i7"] [ext_resource type="Script" uid="uid://damhqta55t67c" path="res://addons/dialogue_manager/components/editor_property/resource_button.gd" id="1_7u2i7"]
@@ -1,4 +1,4 @@
[gd_scene load_steps=4 format=3 uid="uid://c3pniua1enw8v"] [gd_scene load_steps=4 format=3 uid="uid://cs8pwrxr5vxix"]
[ext_resource type="Script" uid="uid://d2l8nlb6hhrfp" path="res://addons/dialogue_manager/components/errors_panel.gd" id="1_nfm3c"] [ext_resource type="Script" uid="uid://d2l8nlb6hhrfp" path="res://addons/dialogue_manager/components/errors_panel.gd" id="1_nfm3c"]
@@ -1,4 +1,4 @@
[gd_scene load_steps=3 format=3 uid="uid://b21h8gsbo60xg"] [gd_scene load_steps=3 format=3 uid="uid://dnufpcdrreva3"]
[ext_resource type="Script" uid="uid://dqa4a4wwoo0aa" path="res://addons/dialogue_manager/components/files_list.gd" id="1_cytii"] [ext_resource type="Script" uid="uid://dqa4a4wwoo0aa" path="res://addons/dialogue_manager/components/files_list.gd" id="1_cytii"]
[ext_resource type="Texture2D" uid="uid://d3lr2uas6ax8v" path="res://addons/dialogue_manager/assets/icon.svg" id="2_3ijx1"] [ext_resource type="Texture2D" uid="uid://d3lr2uas6ax8v" path="res://addons/dialogue_manager/assets/icon.svg" id="2_3ijx1"]
@@ -1,4 +1,4 @@
[gd_scene load_steps=3 format=3 uid="uid://c5to0aeerreb4"] [gd_scene load_steps=3 format=3 uid="uid://0n7hwviyyly4"]
[ext_resource type="Script" uid="uid://q368fmxxa8sd" path="res://addons/dialogue_manager/components/find_in_files.gd" id="1_3xicy"] [ext_resource type="Script" uid="uid://q368fmxxa8sd" path="res://addons/dialogue_manager/components/find_in_files.gd" id="1_3xicy"]
@@ -1,4 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://xnv1ojlgiss3"] [gd_scene load_steps=2 format=3 uid="uid://gr8nakpbrhby"]
[ext_resource type="Script" uid="uid://cijsmjkq21cdq" path="res://addons/dialogue_manager/components/search_and_replace.gd" id="1_8oj1f"] [ext_resource type="Script" uid="uid://cijsmjkq21cdq" path="res://addons/dialogue_manager/components/search_and_replace.gd" id="1_8oj1f"]
@@ -1,4 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://b7v2agbddgaoi"] [gd_scene load_steps=2 format=3 uid="uid://ctns6ouwwd68i"]
[ext_resource type="Script" uid="uid://d0k2wndjj0ifm" path="res://addons/dialogue_manager/components/title_list.gd" id="1_5qqmd"] [ext_resource type="Script" uid="uid://d0k2wndjj0ifm" path="res://addons/dialogue_manager/components/title_list.gd" id="1_5qqmd"]
@@ -1,7 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://c1dliyrsif5jj"] [gd_scene load_steps=3 format=3 uid="uid://co8yl23idiwbi"]
[ext_resource type="Script" uid="uid://cr1tt12dh5ecr" path="res://addons/dialogue_manager/components/update_button.gd" id="1_d2tpb"] [ext_resource type="Script" uid="uid://cr1tt12dh5ecr" path="res://addons/dialogue_manager/components/update_button.gd" id="1_d2tpb"]
[ext_resource type="PackedScene" uid="uid://cstps104wl17j" path="res://addons/dialogue_manager/components/download_update_panel.tscn" id="2_iwm7r"] [ext_resource type="PackedScene" uid="uid://qdxrxv3c3hxk" path="res://addons/dialogue_manager/components/download_update_panel.tscn" id="2_iwm7r"]
[node name="UpdateButton" type="Button"] [node name="UpdateButton" type="Button"]
visible = false visible = false
@@ -1,4 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://b0sflwm2j27gu"] [gd_scene load_steps=2 format=3 uid="uid://ckvgyvclnwggo"]
[ext_resource type="Script" uid="uid://g32um0mltv5d" path="res://addons/dialogue_manager/dialogue_label.gd" id="1_cital"] [ext_resource type="Script" uid="uid://g32um0mltv5d" path="res://addons/dialogue_manager/dialogue_label.gd" id="1_cital"]
@@ -1,7 +1,7 @@
[gd_scene load_steps=9 format=3 uid="uid://bs44fggx87t73"] [gd_scene load_steps=9 format=3 uid="uid://73jm5qjy52vq"]
[ext_resource type="Script" uid="uid://5b3w40kwakl3" path="res://addons/dialogue_manager/example_balloon/ExampleBalloon.cs" id="1_36de5"] [ext_resource type="Script" uid="uid://5b3w40kwakl3" path="res://addons/dialogue_manager/example_balloon/ExampleBalloon.cs" id="1_36de5"]
[ext_resource type="PackedScene" path="res://addons/dialogue_manager/dialogue_label.tscn" id="2_a8ve6"] [ext_resource type="PackedScene" uid="uid://ckvgyvclnwggo" path="res://addons/dialogue_manager/dialogue_label.tscn" id="2_a8ve6"]
[ext_resource type="Script" uid="uid://bb52rsfwhkxbn" path="res://addons/dialogue_manager/dialogue_responses_menu.gd" id="3_72ixx"] [ext_resource type="Script" uid="uid://bb52rsfwhkxbn" path="res://addons/dialogue_manager/dialogue_responses_menu.gd" id="3_72ixx"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_spyqn"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_spyqn"]
@@ -1,7 +1,7 @@
[gd_scene load_steps=10 format=3 uid="uid://c4tqvq4mjcfv2"] [gd_scene load_steps=10 format=3 uid="uid://13s5spsk34qu"]
[ext_resource type="Script" uid="uid://5b3w40kwakl3" path="res://addons/dialogue_manager/example_balloon/ExampleBalloon.cs" id="1_s2gbs"] [ext_resource type="Script" uid="uid://5b3w40kwakl3" path="res://addons/dialogue_manager/example_balloon/ExampleBalloon.cs" id="1_s2gbs"]
[ext_resource type="PackedScene" path="res://addons/dialogue_manager/dialogue_label.tscn" id="2_hfvdi"] [ext_resource type="PackedScene" uid="uid://ckvgyvclnwggo" path="res://addons/dialogue_manager/dialogue_label.tscn" id="2_hfvdi"]
[ext_resource type="Script" uid="uid://bb52rsfwhkxbn" path="res://addons/dialogue_manager/dialogue_responses_menu.gd" id="3_1j1j0"] [ext_resource type="Script" uid="uid://bb52rsfwhkxbn" path="res://addons/dialogue_manager/dialogue_responses_menu.gd" id="3_1j1j0"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_235ry"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_235ry"]
@@ -1,4 +1,4 @@
[gd_scene load_steps=2 format=3 uid="uid://c3ty75yb1un26"] [gd_scene load_steps=2 format=3 uid="uid://ugd552efvil0"]
[ext_resource type="Script" uid="uid://c8e16qdgu40wo" path="res://addons/dialogue_manager/test_scene.gd" id="1_yupoh"] [ext_resource type="Script" uid="uid://c8e16qdgu40wo" path="res://addons/dialogue_manager/test_scene.gd" id="1_yupoh"]
@@ -1,15 +1,15 @@
[gd_scene load_steps=16 format=3 uid="uid://b2lot8kdw2snd"] [gd_scene load_steps=16 format=3 uid="uid://cbuf1q3xsse3q"]
[ext_resource type="Script" uid="uid://cipjcc7bkh1pc" path="res://addons/dialogue_manager/views/main_view.gd" id="1_h6qfq"] [ext_resource type="Script" uid="uid://cipjcc7bkh1pc" path="res://addons/dialogue_manager/views/main_view.gd" id="1_h6qfq"]
[ext_resource type="PackedScene" uid="uid://ekf8y405ewyq" path="res://addons/dialogue_manager/components/code_edit.tscn" id="2_f73fm"] [ext_resource type="PackedScene" uid="uid://civ6shmka5e8u" path="res://addons/dialogue_manager/components/code_edit.tscn" id="2_f73fm"]
[ext_resource type="PackedScene" uid="uid://b21h8gsbo60xg" path="res://addons/dialogue_manager/components/files_list.tscn" id="2_npj2k"] [ext_resource type="PackedScene" uid="uid://dnufpcdrreva3" path="res://addons/dialogue_manager/components/files_list.tscn" id="2_npj2k"]
[ext_resource type="PackedScene" uid="uid://b7v2agbddgaoi" path="res://addons/dialogue_manager/components/title_list.tscn" id="2_onb4i"] [ext_resource type="PackedScene" uid="uid://ctns6ouwwd68i" path="res://addons/dialogue_manager/components/title_list.tscn" id="2_onb4i"]
[ext_resource type="PackedScene" uid="uid://c1dliyrsif5jj" path="res://addons/dialogue_manager/components/update_button.tscn" id="2_ph3vs"] [ext_resource type="PackedScene" uid="uid://co8yl23idiwbi" path="res://addons/dialogue_manager/components/update_button.tscn" id="2_ph3vs"]
[ext_resource type="PackedScene" uid="uid://xnv1ojlgiss3" path="res://addons/dialogue_manager/components/search_and_replace.tscn" id="6_ylh0t"] [ext_resource type="PackedScene" uid="uid://gr8nakpbrhby" path="res://addons/dialogue_manager/components/search_and_replace.tscn" id="6_ylh0t"]
[ext_resource type="PackedScene" uid="uid://c3pniua1enw8v" path="res://addons/dialogue_manager/components/errors_panel.tscn" id="7_5cvl4"] [ext_resource type="PackedScene" uid="uid://cs8pwrxr5vxix" path="res://addons/dialogue_manager/components/errors_panel.tscn" id="7_5cvl4"]
[ext_resource type="Script" uid="uid://klpiq4tk3t7a" path="res://addons/dialogue_manager/components/code_edit_syntax_highlighter.gd" id="7_necsa"] [ext_resource type="Script" uid="uid://klpiq4tk3t7a" path="res://addons/dialogue_manager/components/code_edit_syntax_highlighter.gd" id="7_necsa"]
[ext_resource type="Texture2D" uid="uid://cnm67htuohhlo" path="res://addons/dialogue_manager/assets/banner.png" id="9_y6rqu"] [ext_resource type="Texture2D" uid="uid://cnm67htuohhlo" path="res://addons/dialogue_manager/assets/banner.png" id="9_y6rqu"]
[ext_resource type="PackedScene" uid="uid://c5to0aeerreb4" path="res://addons/dialogue_manager/components/find_in_files.tscn" id="10_yold3"] [ext_resource type="PackedScene" uid="uid://0n7hwviyyly4" path="res://addons/dialogue_manager/components/find_in_files.tscn" id="10_yold3"]
[sub_resource type="Image" id="Image_y6rqu"] [sub_resource type="Image" id="Image_y6rqu"]
data = { data = {
@@ -1,4 +1,4 @@
[gd_scene load_steps=3 format=3 uid="uid://bf5kpeg711bo8"] [gd_scene load_steps=3 format=3 uid="uid://b7mst0qu7vjk1"]
[ext_resource type="Script" uid="uid://dcff0mowkn6km" path="res://addons/input_helper/components/download_update_panel.gd" id="1_4tm1k"] [ext_resource type="Script" uid="uid://dcff0mowkn6km" path="res://addons/input_helper/components/download_update_panel.gd" id="1_4tm1k"]
[ext_resource type="Texture2D" uid="uid://ddixs2ish5bi6" path="res://addons/input_helper/assets/update.svg" id="2_j7shv"] [ext_resource type="Texture2D" uid="uid://ddixs2ish5bi6" path="res://addons/input_helper/assets/update.svg" id="2_j7shv"]
@@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://bsi3bm7ig32p"] [gd_scene load_steps=3 format=3 uid="uid://bownbkcmm43gn"]
[ext_resource type="PackedScene" uid="uid://bf5kpeg711bo8" path="res://addons/input_helper/components/download_update_panel.tscn" id="1_37q37"] [ext_resource type="PackedScene" uid="uid://b7mst0qu7vjk1" path="res://addons/input_helper/components/download_update_panel.tscn" id="1_37q37"]
[ext_resource type="Script" uid="uid://1t3qhgrro2es" path="res://addons/input_helper/views/download_dialog.gd" id="1_ltktf"] [ext_resource type="Script" uid="uid://1t3qhgrro2es" path="res://addons/input_helper/views/download_dialog.gd" id="1_ltktf"]
[node name="DownloadDialog" type="AcceptDialog"] [node name="DownloadDialog" type="AcceptDialog"]
+8 -43
View File
@@ -1,45 +1,26 @@
[gd_resource type="AudioBusLayout" load_steps=7 format=3 uid="uid://c2mk6c27y0mdf"] [gd_resource type="AudioBusLayout" load_steps=4 format=3 uid="uid://c2mk6c27y0mdf"]
[sub_resource type="AudioEffectLimiter" id="AudioEffectLimiter_j3pel"] [sub_resource type="AudioEffectLimiter" id="AudioEffectLimiter_j3pel"]
resource_name = "Limiter" resource_name = "Limiter"
soft_clip_db = 1.0 soft_clip_db = 1.0
[sub_resource type="AudioEffectHardLimiter" id="AudioEffectHardLimiter_j3pel"]
resource_name = "HardLimiter"
[sub_resource type="AudioEffectReverb" id="AudioEffectReverb_j3pel"] [sub_resource type="AudioEffectReverb" id="AudioEffectReverb_j3pel"]
resource_name = "Reverb" resource_name = "Reverb"
room_size = 0.64 room_size = 0.5
damping = 0.47 damping = 0.9
hipass = 0.15
dry = 0.99 dry = 0.99
wet = 0.06 wet = 0.05
[sub_resource type="AudioEffectLimiter" id="AudioEffectLimiter_g28q7"] [sub_resource type="AudioEffectLimiter" id="AudioEffectLimiter_g28q7"]
resource_name = "Limiter" resource_name = "Limiter"
ceiling_db = -2.0 ceiling_db = -0.5
threshold_db = -0.4 threshold_db = -0.6
soft_clip_db = 1.1 soft_clip_db = 1.5
[sub_resource type="AudioEffectDelay" id="AudioEffectDelay_j3pel"]
resource_name = "Delay"
dry = 0.7
tap1_delay_ms = 198.0
tap1_level_db = -8.99
tap1_pan = 1.0
tap2_delay_ms = 182.0
tap2_level_db = -14.09
tap2_pan = -0.87
[sub_resource type="AudioEffectLowPassFilter" id="AudioEffectLowPassFilter_j3pel"]
resource_name = "LowPassFilter"
[resource] [resource]
bus/0/volume_db = -0.130497 bus/0/volume_db = -0.130497
bus/0/effect/0/effect = SubResource("AudioEffectLimiter_j3pel") bus/0/effect/0/effect = SubResource("AudioEffectLimiter_j3pel")
bus/0/effect/0/enabled = true bus/0/effect/0/enabled = true
bus/0/effect/1/effect = SubResource("AudioEffectHardLimiter_j3pel")
bus/0/effect/1/enabled = true
bus/1/name = &"AMBIENT" bus/1/name = &"AMBIENT"
bus/1/solo = false bus/1/solo = false
bus/1/mute = false bus/1/mute = false
@@ -50,7 +31,7 @@ bus/2/name = &"SFX"
bus/2/solo = false bus/2/solo = false
bus/2/mute = false bus/2/mute = false
bus/2/bypass_fx = false bus/2/bypass_fx = false
bus/2/volume_db = -0.923751 bus/2/volume_db = 0.0
bus/2/send = &"Master" bus/2/send = &"Master"
bus/2/effect/0/effect = SubResource("AudioEffectReverb_j3pel") bus/2/effect/0/effect = SubResource("AudioEffectReverb_j3pel")
bus/2/effect/0/enabled = true bus/2/effect/0/enabled = true
@@ -62,19 +43,3 @@ bus/3/mute = false
bus/3/bypass_fx = false bus/3/bypass_fx = false
bus/3/volume_db = 0.0 bus/3/volume_db = 0.0
bus/3/send = &"Master" bus/3/send = &"Master"
bus/4/name = &"DELAY SFX"
bus/4/solo = false
bus/4/mute = false
bus/4/bypass_fx = false
bus/4/volume_db = 0.0
bus/4/send = &"SFX"
bus/4/effect/0/effect = SubResource("AudioEffectDelay_j3pel")
bus/4/effect/0/enabled = true
bus/5/name = &"AMB Filter Sweeps"
bus/5/solo = false
bus/5/mute = false
bus/5/bypass_fx = false
bus/5/volume_db = 0.0
bus/5/send = &"AMBIENT"
bus/5/effect/0/effect = SubResource("AudioEffectLowPassFilter_j3pel")
bus/5/effect/0/enabled = true
+1 -1
View File
@@ -9,7 +9,7 @@ custom_features=""
export_filter="all_resources" export_filter="all_resources"
include_filter="" include_filter=""
exclude_filter="" exclude_filter=""
export_path="../../Demo/Export.exe" export_path="Export/Ma.exe"
patches=PackedStringArray() patches=PackedStringArray()
encryption_include_filters="" encryption_include_filters=""
encryption_exclude_filters="" encryption_exclude_filters=""
+6 -15
View File
@@ -8,10 +8,6 @@
config_version=5 config_version=5
[animation]
warnings/check_invalid_track_paths=false
[application] [application]
config/name="Ma" config/name="Ma"
@@ -40,7 +36,6 @@ runtime/advanced/uses_dotnet=true
window/size/viewport_width=1920 window/size/viewport_width=1920
window/size/viewport_height=1080 window/size/viewport_height=1080
window/stretch/mode="canvas_items" window/stretch/mode="canvas_items"
window/stretch/aspect="expand"
[dotnet] [dotnet]
@@ -87,7 +82,6 @@ import/blender/enabled=false
[global_group] [global_group]
DimmableAudio="" DimmableAudio=""
enemy=""
[importer_defaults] [importer_defaults]
@@ -260,15 +254,11 @@ AltAttack={
CameraForward={ CameraForward={
"deadzone": 0.2, "deadzone": 0.2,
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":-1.0,"script":null) "events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":-1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194446,"key_label":0,"unicode":56,"location":0,"echo":false,"script":null)
] ]
} }
CameraBack={ CameraBack={
"deadzone": 0.2, "deadzone": 0.2,
"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":1.0,"script":null) "events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":1.0,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194440,"key_label":0,"unicode":50,"location":0,"echo":false,"script":null)
] ]
} }
EnemyViewerIdle={ EnemyViewerIdle={
@@ -284,7 +274,7 @@ EnemyViewerWalk={
[internationalization] [internationalization]
locale/translations_pot_files=PackedStringArray("res://src/dialog/Dialogue.dialogue", "res://src/npc/Ran/ran.dialogue", "res://src/npc/Rat/ratdialogue.dialogue", "res://src/dialog/Altar.dialogue", "res://stone.dialogue", "res://src/npc/Proscenium/JumpScare.dialogue", "res://src/map/Placeables/sarco.dialogue") locale/translations_pot_files=PackedStringArray("res://src/dialog/Dialogue.dialogue", "res://src/npc/Ran/ran.dialogue", "res://src/npc/Rat/ratdialogue.dialogue", "res://src/dialog/Altar.dialogue", "res://stone.dialogue", "res://src/npc/Proscenium/JumpScare.dialogue", "res://tutorialstone.dialogue")
[layer_names] [layer_names]
@@ -320,18 +310,19 @@ textures/canvas_textures/default_texture_filter=0
textures/lossless_compression/force_png=true textures/lossless_compression/force_png=true
lights_and_shadows/directional_shadow/soft_shadow_filter_quality=4 lights_and_shadows/directional_shadow/soft_shadow_filter_quality=4
lights_and_shadows/directional_shadow/16_bits=false lights_and_shadows/directional_shadow/16_bits=false
lights_and_shadows/positional_shadow/soft_shadow_filter_quality=4 lights_and_shadows/positional_shadow/soft_shadow_filter_quality=3
lights_and_shadows/positional_shadow/atlas_16_bits=false lights_and_shadows/positional_shadow/atlas_16_bits=false
global_illumination/voxel_gi/quality=1 global_illumination/voxel_gi/quality=1
textures/default_filters/anisotropic_filtering_level=0 textures/default_filters/anisotropic_filtering_level=0
anti_aliasing/quality/msaa_2d=2 anti_aliasing/quality/msaa_2d=1
anti_aliasing/quality/msaa_3d=2 anti_aliasing/quality/msaa_3d=1
environment/screen_space_reflection/roughness_quality=2 environment/screen_space_reflection/roughness_quality=2
environment/subsurface_scattering/subsurface_scattering_quality=2 environment/subsurface_scattering/subsurface_scattering_quality=2
global_illumination/sdfgi/probe_ray_count=2 global_illumination/sdfgi/probe_ray_count=2
global_illumination/sdfgi/frames_to_update_lights=1 global_illumination/sdfgi/frames_to_update_lights=1
lights_and_shadows/tighter_shadow_caster_culling=false
anti_aliasing/quality/screen_space_aa=1 anti_aliasing/quality/screen_space_aa=1
mesh_lod/lod_change/threshold_pixels=0.0 mesh_lod/lod_change/threshold_pixels=0.0
2d/snap/snap_2d_transforms_to_pixel=true 2d/snap/snap_2d_transforms_to_pixel=true
2d/snap/snap_2d_vertices_to_pixel=true 2d/snap/snap_2d_vertices_to_pixel=true
lights_and_shadows/positional_shadow/atlas_quadrant_0_subdiv=3
lights_and_shadows/positional_shadow/atlas_quadrant_1_subdiv=3
@@ -1,5 +1,4 @@
using Chickensoft.Collections; using Chickensoft.Collections;
using Godot;
using System; using System;
using Zennysoft.Ma.Adapter; using Zennysoft.Ma.Adapter;
@@ -50,14 +49,7 @@ public class AttackComponent : IAttackComponent
public void RaiseMaximumAttack(int raiseAmount) public void RaiseMaximumAttack(int raiseAmount)
{ {
_maximumAttack.OnNext(_maximumAttack.Value + raiseAmount); _maximumAttack.OnNext(raiseAmount);
Restore(raiseAmount); Restore(raiseAmount);
} }
public void LowerMaximumAttack(int lowerAmount)
{
_maximumAttack.OnNext(Mathf.Max(_maximumAttack.Value - lowerAmount, 1));
if (_currentAttack.Value > _maximumAttack.Value)
_currentAttack.OnNext(_maximumAttack.Value);
}
} }
@@ -1,5 +1,4 @@
using Chickensoft.Collections; using Chickensoft.Collections;
using Godot;
using System; using System;
using Zennysoft.Ma.Adapter; using Zennysoft.Ma.Adapter;
@@ -50,14 +49,7 @@ public class DefenseComponent : IDefenseComponent
public void RaiseMaximumDefense(int raiseAmount) public void RaiseMaximumDefense(int raiseAmount)
{ {
_maximumDefense.OnNext(_maximumDefense.Value + raiseAmount); _maximumDefense.OnNext(raiseAmount);
Restore(raiseAmount); Restore(raiseAmount);
} }
public void LowerMaximumDefense(int lowerAmount)
{
_maximumDefense.OnNext(Mathf.Max(_maximumDefense.Value - lowerAmount, 1));
if (_currentDefense.Value > _maximumDefense.Value)
_currentDefense.OnNext(_maximumDefense.Value);
}
} }
@@ -1,7 +1,5 @@
using Chickensoft.Collections; using Chickensoft.Collections;
using Godot;
using System; using System;
using Zennysoft.Game.Abstractions.Audio;
using Zennysoft.Ma.Adapter; using Zennysoft.Ma.Adapter;
namespace Zennysoft.Game.Ma; namespace Zennysoft.Game.Ma;
@@ -26,8 +24,6 @@ public class ExperiencePointsComponent : IExperiencePointsComponent
public event Action PlayerLevelUp; public event Action PlayerLevelUp;
public event Action PlayerLevelDown;
public ExperiencePointsComponent() public ExperiencePointsComponent()
{ {
var firstLevelExpRequirement = ExpToNextLevelCalculation(1); var firstLevelExpRequirement = ExpToNextLevelCalculation(1);
@@ -49,19 +45,12 @@ public class ExperiencePointsComponent : IExperiencePointsComponent
public void Gain(int baseExpGain) public void Gain(int baseExpGain)
{ {
var modifiedExpGain = baseExpGain * _expGainRate.Value; var modifiedExpGain = baseExpGain * _expGainRate.Value;
_currentExp.OnNext(Mathf.RoundToInt(modifiedExpGain + _currentExp.Value)); var newCurrentExpTotal = modifiedExpGain + _currentExp.Value;
while (_currentExp.Value >= _expToNextLevel.Value) while (modifiedExpGain + _currentExp.Value >= _expToNextLevel.Value)
LevelUp(); LevelUp();
var cappedAmount = Math.Min(baseExpGain + _currentExp.Value, _expToNextLevel.Value);
_currentExp.OnNext(cappedAmount);
} }
public void GainUnmodified(int flatRateExp)
{
var newCurrentExpTotal = flatRateExp + _currentExp.Value;
_currentExp.OnNext(newCurrentExpTotal);
while (_currentExp.Value >= _expToNextLevel.Value)
LevelUp();
}
public void ModifyExpGainRate(double newRate) => _expGainRate.OnNext(newRate); public void ModifyExpGainRate(double newRate) => _expGainRate.OnNext(newRate);
public void LevelUp() public void LevelUp()
@@ -74,21 +63,6 @@ public class ExperiencePointsComponent : IExperiencePointsComponent
PlayerLevelUp?.Invoke(); PlayerLevelUp?.Invoke();
} }
public void LevelDown()
{
SfxDatabase.Instance.Play(SoundEffect.DecreaseStat);
_currentExp.OnNext(0);
if (_level.Value == 1)
return;
var newLevel = Mathf.Max(_level.Value - 1, 1);
_level.OnNext(newLevel);
var expToNextLevel = ExpToNextLevelCalculation(newLevel);
_expToNextLevel.OnNext(expToNextLevel);
PlayerLevelDown.Invoke();
}
private int ExpToNextLevelCalculation(int nextLevel) private int ExpToNextLevelCalculation(int nextLevel)
{ {
return (int)(6.5 * nextLevel + 4.5 * Math.Pow(nextLevel, 2) + Math.Pow(nextLevel, 3)); return (int)(6.5 * nextLevel + 4.5 * Math.Pow(nextLevel, 2) + Math.Pow(nextLevel, 3));
@@ -1,5 +1,4 @@
using Chickensoft.Collections; using Chickensoft.Collections;
using Godot;
using System; using System;
using Zennysoft.Ma.Adapter; using Zennysoft.Ma.Adapter;
@@ -16,7 +15,7 @@ public class HealthComponent : IHealthComponent
private readonly AutoProp<int> _maximumHP; private readonly AutoProp<int> _maximumHP;
public event Action? HealthReachedZero; public event Action? HealthReachedZero;
public event Action<ElementType>? DamageTaken; public event Action? DamageTaken;
public bool AtFullHealth => CurrentHP.Value == MaximumHP.Value; public bool AtFullHealth => CurrentHP.Value == MaximumHP.Value;
@@ -44,7 +43,7 @@ public class HealthComponent : IHealthComponent
_currentHP.OnNext(cappedAmount); _currentHP.OnNext(cappedAmount);
} }
public void Damage(int damageAmount, ElementType elementType) public void Damage(int damageAmount)
{ {
if (CurrentHP.Value <= 0) if (CurrentHP.Value <= 0)
return; return;
@@ -55,7 +54,7 @@ public class HealthComponent : IHealthComponent
if (cappedAmount == 0) if (cappedAmount == 0)
HealthReachedZero?.Invoke(); HealthReachedZero?.Invoke();
else else
DamageTaken?.Invoke(elementType); DamageTaken?.Invoke();
} }
public void SetCurrentHealth(int health) public void SetCurrentHealth(int health)
@@ -78,11 +77,4 @@ public class HealthComponent : IHealthComponent
if (restoreHP) if (restoreHP)
Heal(raiseAmount); Heal(raiseAmount);
} }
public void LowerMaximumHP(int lowerAmount)
{
_maximumHP.OnNext(Mathf.Max(_maximumHP.Value - lowerAmount, 1));
if (_currentHP.Value > _maximumHP.Value)
_currentHP.OnNext(_maximumHP.Value);
}
} }
@@ -1,5 +1,4 @@
using Chickensoft.Collections; using Chickensoft.Collections;
using System;
using Zennysoft.Ma.Adapter; using Zennysoft.Ma.Adapter;
namespace Zennysoft.Game.Ma; namespace Zennysoft.Game.Ma;
@@ -7,14 +6,12 @@ namespace Zennysoft.Game.Ma;
public class LuckComponent : ILuckComponent public class LuckComponent : ILuckComponent
{ {
public IAutoProp<int> Luck => _luck; public IAutoProp<int> Luck => _luck;
public int InitialLuck { get; }
private readonly AutoProp<int> _luck; private AutoProp<int> _luck;
private readonly int _initialValue; private readonly int _initialValue;
public LuckComponent(int initialLuck) public LuckComponent(int initialLuck)
{ {
InitialLuck = initialLuck;
_luck = new AutoProp<int>(initialLuck); _luck = new AutoProp<int>(initialLuck);
_initialValue = initialLuck; _initialValue = initialLuck;
} }
@@ -25,6 +22,4 @@ public class LuckComponent : ILuckComponent
} }
public void IncreaseLuck(int value) => _luck.OnNext(_luck.Value + value); public void IncreaseLuck(int value) => _luck.OnNext(_luck.Value + value);
public void DecreaseLuck(int value) => _luck.OnNext(Godot.Mathf.Max(_luck.Value - value, 0));
} }
@@ -1,20 +0,0 @@
using Chickensoft.Collections;
public class StatusEffectComponent : IStatusEffectComponent
{
public StatusEffectComponent(double rustDuration)
{
RustDuration = rustDuration;
}
public double RustDuration { get; set; }
public AutoProp<bool> Rust { get; } = new AutoProp<bool>(false);
public bool ImmuneToRust { get; set; } = false;
public void Reset()
{
Rust.OnNext(false);
}
}
@@ -1 +0,0 @@
uid://chhmivq4bntxf
@@ -1,5 +1,4 @@
using Chickensoft.Collections; using Chickensoft.Collections;
using Godot;
using System; using System;
using Zennysoft.Ma.Adapter; using Zennysoft.Ma.Adapter;
@@ -57,13 +56,6 @@ public class VTComponent : IVTComponent
Restore(raiseAmount); Restore(raiseAmount);
} }
public void LowerMaximumVT(int lowerAmount)
{
_maximumVT.OnNext(Mathf.Max(_maximumVT.Value - lowerAmount, 1));
if (_currentVT.Value > _maximumVT.Value)
_currentVT.OnNext(_maximumVT.Value);
}
public void SetMaximumVT(int vt) public void SetMaximumVT(int vt)
{ {
_maximumVT.OnNext(vt); _maximumVT.OnNext(vt);
+19 -142
View File
@@ -1,12 +1,9 @@
using Chickensoft.AutoInject; using Chickensoft.AutoInject;
using Chickensoft.GodotNodeInterfaces; using Chickensoft.GodotNodeInterfaces;
using Chickensoft.Introspection; using Chickensoft.Introspection;
using Chickensoft.SaveFileBuilder;
using Chickensoft.Serialization;
using Godot; using Godot;
using NathanHoad; using NathanHoad;
using SimpleInjector.Lifestyles; using SimpleInjector.Lifestyles;
using System.IO;
using System.IO.Abstractions; using System.IO.Abstractions;
using System.Threading.Tasks; using System.Threading.Tasks;
using Zennysoft.Game.Abstractions; using Zennysoft.Game.Abstractions;
@@ -15,19 +12,16 @@ using Zennysoft.Ma.Adapter;
namespace Zennysoft.Game.Ma; namespace Zennysoft.Game.Ma;
public interface IApp : INode, IProvide<IAppRepo>, IProvide<IApp> public interface IApp : INode, IProvide<IAppRepo>;
{
public GalleryData GalleryData { get; }
}
[Meta(typeof(IAutoNode))] [Meta(typeof(IAutoNode))]
public partial class App : Node, IApp, IProvide<ISaveChunk<GalleryData>> public partial class App : Node, IApp
{ {
public override void _Notification(int what) => this.Notify(what); public override void _Notification(int what) => this.Notify(what);
public const string GAME_SCENE_PATH = "res://src/game/Game.tscn"; public const string GAME_SCENE_PATH = "res://src/game/Game.tscn";
public const string ENEMY_VIEWER_PATH = "res://src/enemy_viewer/EnemyViewer.tscn"; public const string ENEMY_VIEWER_PATH = "res://src/data_viewer/DataViewer.tscn";
[Node] private MainMenu MainMenu { get; set; } = default!; [Node] private MainMenu MainMenu { get; set; } = default!;
@@ -39,30 +33,21 @@ public partial class App : Node, IApp, IProvide<ISaveChunk<GalleryData>>
IAppRepo IProvide<IAppRepo>.Value() => AppRepo; IAppRepo IProvide<IAppRepo>.Value() => AppRepo;
IApp IProvide<IApp>.Value() => this;
public IAppRepo AppRepo { get; set; } = default!; public IAppRepo AppRepo { get; set; } = default!;
public IAppLogic AppLogic { get; set; } = default!; public IAppLogic AppLogic { get; set; } = default!;
public AppLogic.IBinding AppBinding { get; set; } = default!; public AppLogic.IBinding AppBinding { get; set; } = default!;
private Godot.Collections.Array _progress; private Godot.Collections.Array _progress;
private SimpleInjector.Container _container; private SimpleInjector.Container _container;
private IMaSaveFileManager _gallerySaveDataManager;
private EnemyViewer _dataViewer; private DataViewer _dataViewer;
private bool _loadingGame = false; private bool _loadingGame = false;
private bool _loadingEnemyViewer = false; private bool _loadingEnemyViewer = false;
private string _optionsSavePath = string.Empty; private string _optionsSavePath = string.Empty;
private string _controllerSavePath = string.Empty; private string _controllerSavePath = string.Empty;
private string _gallerySavePath = string.Empty;
private ISaveFileManager _saveFileManager; private ISaveFileManager _saveFileManager;
private IGame _game; private IGame _game;
private IEnemyViewer _enemyViewer; private IDataViewer _enemyViewer;
public ISaveChunk<GalleryData> GameChunk { get; set; } = default!;
ISaveChunk<GalleryData> IProvide<ISaveChunk<GalleryData>>.Value() => GameChunk;
public ISaveFile<GalleryData> GallerySaveFile { get; set; } = default!;
public GalleryData GalleryData { get; private set; }
private double _reportedProgress = 0; private double _reportedProgress = 0;
@@ -78,64 +63,6 @@ public partial class App : Node, IApp, IProvide<ISaveChunk<GalleryData>>
_saveFileManager = _container.GetInstance<ISaveFileManager>(); _saveFileManager = _container.GetInstance<ISaveFileManager>();
_optionsSavePath = $"{OS.GetUserDataDir()}/options.json"; _optionsSavePath = $"{OS.GetUserDataDir()}/options.json";
_controllerSavePath = $"{OS.GetUserDataDir()}/controls.json"; _controllerSavePath = $"{OS.GetUserDataDir()}/controls.json";
_gallerySavePath = $"{OS.GetUserDataDir()}/gallery.json";
GalleryData = new GalleryData();
GameChunk = new SaveChunk<GalleryData>(
(chunk) =>
{
var galleryData = new GalleryData()
{
SproingyFifty = GalleryData.SproingyFifty,
MichaelFifty = GalleryData.MichaelFifty,
FilthEaterFifty = GalleryData.FilthEaterFifty,
SaraFifty = GalleryData.SaraFifty,
BallosFifty = GalleryData.BallosFifty,
PlanterFifty = GalleryData.PlanterFifty,
ChintheFifty = GalleryData.ChintheFifty,
AmbassadorGreenFifty = GalleryData.AmbassadorGreenFifty,
AmbassadorRedFifty = GalleryData.AmbassadorRedFifty,
AmbassadorSteelFifty = GalleryData.AmbassadorSteelFifty,
AgniDemonFifty = GalleryData.AgniDemonFifty,
AqueousDemonFifty = GalleryData.AqueousDemonFifty,
EdenPillarFifty = GalleryData.EdenPillarFifty,
PalanFifty = GalleryData.PalanFifty,
ShieldOfHeavenFifty = GalleryData.ShieldOfHeavenFifty,
GoldSproingFifty = GalleryData.GoldSproingFifty,
TotalEnemiesFifty = GalleryData.TotalEnemiesFifty,
TotalEnemiesHundred = GalleryData.TotalEnemiesHundred,
NormalEnd = GalleryData.NormalEnd,
TrueEnd = GalleryData.TrueEnd,
BadEnd = GalleryData.BadEnd,
StelesTen = GalleryData.StelesTen
};
return galleryData;
},
onLoad:
(chunk, data) =>
{
GalleryData = data ?? new GalleryData();
});
_gallerySaveDataManager = new MaSaveFileManager(_gallerySavePath);
GallerySaveFile = new SaveFile<GalleryData>(
root: GameChunk,
onSave: _gallerySaveDataManager.Save,
onLoad: async () =>
{
try
{
var galleryData = await _gallerySaveDataManager.Load<GalleryData>();
return galleryData;
}
catch (FileNotFoundException)
{
GD.Print("No save file found.");
}
return null;
}
);
MainMenu.StartGame += OnStartGame; MainMenu.StartGame += OnStartGame;
MainMenu.EnemyViewer += OnEnemyViewer; MainMenu.EnemyViewer += OnEnemyViewer;
@@ -192,7 +119,7 @@ public partial class App : Node, IApp, IProvide<ISaveChunk<GalleryData>>
MainMenu.OptionsButton.GrabFocus(); MainMenu.OptionsButton.GrabFocus();
} }
private async void GalleryExited() private void GalleryExited()
{ {
GalleryMenu.Hide(); GalleryMenu.Hide();
MainMenu.GalleryButton.GrabFocus(); MainMenu.GalleryButton.GrabFocus();
@@ -219,7 +146,7 @@ public partial class App : Node, IApp, IProvide<ISaveChunk<GalleryData>>
}) })
.Handle((in AppLogic.Output.SetupGameScene _) => .Handle((in AppLogic.Output.SetupGameScene _) =>
{ {
LoadingScreen.ShowLoadingScreen(); LoadingScreen.Show();
LoadGame(GAME_SCENE_PATH); LoadGame(GAME_SCENE_PATH);
}) })
.Handle((in AppLogic.Output.ShowMainMenu _) => .Handle((in AppLogic.Output.ShowMainMenu _) =>
@@ -228,7 +155,7 @@ public partial class App : Node, IApp, IProvide<ISaveChunk<GalleryData>>
}) })
.Handle((in AppLogic.Output.CloseGame _) => .Handle((in AppLogic.Output.CloseGame _) =>
{ {
LoadingScreen.HideLoadingScreen(); LoadingScreen.Hide();
_game.GameExitRequested -= GameExitRequested; _game.GameExitRequested -= GameExitRequested;
MainMenu.StartGameButton.GrabFocus(); MainMenu.StartGameButton.GrabFocus();
_game.CallDeferred(MethodName.QueueFree, []); _game.CallDeferred(MethodName.QueueFree, []);
@@ -239,14 +166,14 @@ public partial class App : Node, IApp, IProvide<ISaveChunk<GalleryData>>
}) })
.Handle((in AppLogic.Output.EnemyViewerOpened _) => .Handle((in AppLogic.Output.EnemyViewerOpened _) =>
{ {
LoadingScreen.ShowLoadingScreen(); LoadingScreen.Show();
MainMenu.Hide(); MainMenu.Hide();
LoadEnemyViewer(ENEMY_VIEWER_PATH); LoadEnemyViewer(ENEMY_VIEWER_PATH);
}) })
.Handle((in AppLogic.Output.EnemyViewerExited _) => .Handle((in AppLogic.Output.EnemyViewerExited _) =>
{ {
LoadingScreen.HideLoadingScreen(); LoadingScreen.Hide();
if (_enemyViewer != null && _enemyViewer is EnemyViewer enemyViewer) if (_enemyViewer != null && _enemyViewer is DataViewer enemyViewer)
enemyViewer.CallDeferred(MethodName.QueueFree); enemyViewer.CallDeferred(MethodName.QueueFree);
MainMenu.Show(); MainMenu.Show();
MainMenu.EnemyViewerButton.GrabFocus(); MainMenu.EnemyViewerButton.GrabFocus();
@@ -276,74 +203,24 @@ public partial class App : Node, IApp, IProvide<ISaveChunk<GalleryData>>
_game = scene as IGame; _game = scene as IGame;
_game.GameLoaded += OnGameLoaded; _game.GameLoaded += OnGameLoaded;
_game.GameExitRequested += GameExitRequested; _game.GameExitRequested += GameExitRequested;
await ToSignal(GetTree().CreateTimer(0.8f), "timeout");
CallDeferred(MethodName.AddChild, scene); CallDeferred(MethodName.AddChild, scene);
_game.UnlockGalleryItem += UnlockGalleryItem;
} }
private void OnGameLoaded() => LoadingScreen.HideLoadingScreen(); private void OnGameLoaded() => LoadingScreen.Hide();
private async void LoadEnemyViewer(string sceneName) private async void LoadEnemyViewer(string sceneName)
{ {
var scene = await LoadSceneInternal(sceneName); var scene = await LoadSceneInternal(sceneName);
_enemyViewer = scene as IEnemyViewer; _enemyViewer = scene as IDataViewer;
await ToSignal(GetTree().CreateTimer(0.8f), "timeout");
CallDeferred(MethodName.AddChild, scene); CallDeferred(MethodName.AddChild, scene);
LoadingScreen.HideLoadingScreen(); LoadingScreen.Hide();
}
private void UnlockGalleryItem(string obj)
{
if (obj == nameof(GalleryData.SproingyFifty))
GalleryData.SproingyFifty = true;
if (obj == nameof(GalleryData.MichaelFifty))
GalleryData.MichaelFifty = true;
if (obj == nameof(GalleryData.FilthEaterFifty))
GalleryData.FilthEaterFifty = true;
if (obj == nameof(GalleryData.SaraFifty))
GalleryData.SaraFifty = true;
if (obj == nameof(GalleryData.BallosFifty))
GalleryData.BallosFifty = true;
if (obj == nameof(GalleryData.PlanterFifty))
GalleryData.PlanterFifty = true;
if (obj == nameof(GalleryData.ChintheFifty))
GalleryData.ChintheFifty = true;
if (obj == nameof(GalleryData.AmbassadorGreenFifty))
GalleryData.AmbassadorGreenFifty = true;
if (obj == nameof(GalleryData.AmbassadorRedFifty))
GalleryData.AmbassadorRedFifty = true;
if (obj == nameof(GalleryData.AmbassadorSteelFifty))
GalleryData.AmbassadorSteelFifty = true;
if (obj == nameof(GalleryData.AgniDemonFifty))
GalleryData.AgniDemonFifty = true;
if (obj == nameof(GalleryData.AqueousDemonFifty))
GalleryData.AqueousDemonFifty = true;
if (obj == nameof(GalleryData.EdenPillarFifty))
GalleryData.EdenPillarFifty = true;
if (obj == nameof(GalleryData.PalanFifty))
GalleryData.PalanFifty = true;
if (obj == nameof(GalleryData.ShieldOfHeavenFifty))
GalleryData.ShieldOfHeavenFifty = true;
if (obj == nameof(GalleryData.GoldSproingFifty))
GalleryData.GoldSproingFifty = true;
if (obj == nameof(GalleryData.TotalEnemiesFifty))
GalleryData.TotalEnemiesFifty = true;
if (obj == nameof(GalleryData.TotalEnemiesHundred))
GalleryData.TotalEnemiesHundred = true;
if (obj == nameof(GalleryData.NormalEnd))
GalleryData.NormalEnd = true;
if (obj == nameof(GalleryData.TrueEnd))
GalleryData.TrueEnd = true;
if (obj == nameof(GalleryData.BadEnd))
GalleryData.BadEnd = true;
if (obj == nameof(GalleryData.StelesTen))
GalleryData.StelesTen = true;
GallerySaveFile.Save();
} }
private async Task<Node> LoadSceneInternal(string sceneName) private async Task<Node> LoadSceneInternal(string sceneName)
{ {
LoadingScreen.ShowLoadingScreen(); LoadingScreen.Show();
MainMenu.Hide();
LoadingScreen.ProgressBar.Value = 0; LoadingScreen.ProgressBar.Value = 0;
var sceneLoader = new SceneLoader(); var sceneLoader = new SceneLoader();
CallDeferred(MethodName.AddChild, sceneLoader); CallDeferred(MethodName.AddChild, sceneLoader);
@@ -365,8 +242,8 @@ public partial class App : Node, IApp, IProvide<ISaveChunk<GalleryData>>
private async void OnGallery() private async void OnGallery()
{ {
GalleryData = await _gallerySaveDataManager.Load<GalleryData>();
GalleryMenu.Show(); GalleryMenu.Show();
GalleryMenu.ItemButton1.GrabFocus();
} }
public void OnQuit() => AppLogic.Input(new AppLogic.Input.QuitGame()); public void OnQuit() => AppLogic.Input(new AppLogic.Input.QuitGame());
+2 -10
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=6 format=3 uid="uid://bkhaksn82ws6h"] [gd_scene load_steps=6 format=3 uid="uid://cagfc5ridmteu"]
[ext_resource type="Script" uid="uid://d1f8blk5ucqvq" path="res://src/app/App.cs" id="1_rt73h"] [ext_resource type="Script" uid="uid://d1f8blk5ucqvq" path="res://src/app/App.cs" id="1_rt73h"]
[ext_resource type="PackedScene" uid="uid://rfvnddfqufho" path="res://src/menu/MainMenu.tscn" id="2_1uiag"] [ext_resource type="PackedScene" uid="uid://rfvnddfqufho" path="res://src/menu/MainMenu.tscn" id="2_1uiag"]
@@ -10,16 +10,9 @@
process_mode = 3 process_mode = 3
script = ExtResource("1_rt73h") script = ExtResource("1_rt73h")
[node name="ColorRect" type="ColorRect" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0, 0, 0, 1)
[node name="MainMenu" parent="." instance=ExtResource("2_1uiag")] [node name="MainMenu" parent="." instance=ExtResource("2_1uiag")]
unique_name_in_owner = true unique_name_in_owner = true
visible = false
[node name="OptionsMenu" parent="." instance=ExtResource("2_v0mgf")] [node name="OptionsMenu" parent="." instance=ExtResource("2_v0mgf")]
unique_name_in_owner = true unique_name_in_owner = true
@@ -31,6 +24,5 @@ visible = false
[node name="LoadingScreen" parent="." instance=ExtResource("3_3st5l")] [node name="LoadingScreen" parent="." instance=ExtResource("3_3st5l")]
unique_name_in_owner = true unique_name_in_owner = true
visible = false
top_level = true top_level = true
z_index = 999 z_index = 999
Binary file not shown.
Binary file not shown.
Binary file not shown.
+3 -4
View File
@@ -8,12 +8,12 @@ namespace Zennysoft.Game.Ma;
public partial class BGMPlayer : DimmableAudioStreamPlayer public partial class BGMPlayer : DimmableAudioStreamPlayer
{ {
private static readonly string _bgmPath = $"res://src/audio/bgm/"; private static string _bgmPath = $"res://src/audio/bgm/";
private Dictionary<BackgroundMusic, AudioStream> _bgmDictionary; private IDictionary<BackgroundMusic, AudioStream> _bgmDictionary;
public override void _Ready() public override void _Ready()
{ {
_bgmDictionary = []; _bgmDictionary = new Dictionary<BackgroundMusic, AudioStream>();
var backgroundMusic = Enum.GetValues(typeof(BackgroundMusic)); var backgroundMusic = Enum.GetValues(typeof(BackgroundMusic));
foreach (var bgm in backgroundMusic) foreach (var bgm in backgroundMusic)
_bgmDictionary.Add((BackgroundMusic)bgm, GD.Load<AudioStream>(_bgmPath + bgm + ".ogg")); _bgmDictionary.Add((BackgroundMusic)bgm, GD.Load<AudioStream>(_bgmPath + bgm + ".ogg"));
@@ -21,7 +21,6 @@ public partial class BGMPlayer : DimmableAudioStreamPlayer
public void Play(BackgroundMusic backgroundMusic) public void Play(BackgroundMusic backgroundMusic)
{ {
FadeOut();
_bgmDictionary.TryGetValue(backgroundMusic, out var stream); _bgmDictionary.TryGetValue(backgroundMusic, out var stream);
Stream = stream; Stream = stream;
FadeIn(); FadeIn();
+5 -148
View File
@@ -1,46 +1,30 @@
[gd_scene load_steps=42 format=3 uid="uid://brgi35xj3b4ud"] [gd_scene load_steps=26 format=3 uid="uid://brgi35xj3b4ud"]
[ext_resource type="Script" uid="uid://cw100tox0ufsy" path="res://src/audio/SfxDatabase.cs" id="1_ojkqd"] [ext_resource type="Script" uid="uid://cw100tox0ufsy" path="res://src/audio/SfxDatabase.cs" id="1_ojkqd"]
[ext_resource type="AudioStream" uid="uid://cye8wlqbx66h4" path="res://src/audio/sfx/player_heal.ogg" id="2_158j8"] [ext_resource type="AudioStream" uid="uid://cye8wlqbx66h4" path="res://src/audio/sfx/player_heal.ogg" id="2_158j8"]
[ext_resource type="AudioStream" uid="uid://1nuk6xpkwujl" path="res://src/audio/sfx/player_gain_VT.ogg" id="3_kac56"]
[ext_resource type="AudioStream" uid="uid://bfrp34y2m8b1l" path="res://src/audio/sfx/item_number_increase.ogg" id="4_fa8i8"] [ext_resource type="AudioStream" uid="uid://bfrp34y2m8b1l" path="res://src/audio/sfx/item_number_increase.ogg" id="4_fa8i8"]
[ext_resource type="AudioStream" uid="uid://xjdv23q5cqhm" path="res://src/audio/sfx/UI_PAUSE.ogg" id="5_p5cio"] [ext_resource type="AudioStream" uid="uid://xjdv23q5cqhm" path="res://src/audio/sfx/UI_PAUSE.ogg" id="5_p5cio"]
[ext_resource type="AudioStream" uid="uid://clhdcrs4dxt6h" path="res://src/audio/sfx/UI_MOVE.ogg" id="6_r16t0"] [ext_resource type="AudioStream" uid="uid://clhdcrs4dxt6h" path="res://src/audio/sfx/UI_MOVE.ogg" id="6_r16t0"]
[ext_resource type="AudioStream" uid="uid://c817txm4tmup7" path="res://src/audio/sfx/PLAYER_EQUIP.ogg" id="7_sew62"] [ext_resource type="AudioStream" uid="uid://c817txm4tmup7" path="res://src/audio/sfx/PLAYER_EQUIP.ogg" id="7_sew62"]
[ext_resource type="AudioStream" uid="uid://qxi7qto7hhgk" path="res://src/audio/sfx/PLAYER_UNEQUIP.ogg" id="8_rf1la"] [ext_resource type="AudioStream" uid="uid://qxi7qto7hhgk" path="res://src/audio/sfx/PLAYER_UNEQUIP.ogg" id="8_rf1la"]
[ext_resource type="AudioStream" uid="uid://doeefxilh0luj" path="res://src/audio/sfx/ITEM_SORT.ogg" id="9_l6w22"] [ext_resource type="AudioStream" uid="uid://doeefxilh0luj" path="res://src/audio/sfx/ITEM_SORT.ogg" id="9_l6w22"]
[ext_resource type="AudioStream" uid="uid://cyae4bt60m7p4" path="res://src/audio/sfx/item_plasma_sword.ogg" id="10_7th20"]
[ext_resource type="AudioStream" uid="uid://4mk4hlse81if" path="res://src/audio/sfx/player_losehealth.ogg" id="10_kac56"] [ext_resource type="AudioStream" uid="uid://4mk4hlse81if" path="res://src/audio/sfx/player_losehealth.ogg" id="10_kac56"]
[ext_resource type="AudioStream" uid="uid://dwp3ep3jddvrr" path="res://src/audio/sfx/UI_SELECT.ogg" id="10_nerso"] [ext_resource type="AudioStream" uid="uid://dwp3ep3jddvrr" path="res://src/audio/sfx/UI_SELECT.ogg" id="10_nerso"]
[ext_resource type="AudioStream" uid="uid://ilf2s8ct2stt" path="res://src/audio/sfx/PLAYER_slower_slash.ogg" id="10_vyvit"] [ext_resource type="AudioStream" uid="uid://ilf2s8ct2stt" path="res://src/audio/sfx/PLAYER_slower_slash.ogg" id="10_vyvit"]
[ext_resource type="AudioStream" uid="uid://oslvh60ec5gc" path="res://src/audio/sfx/UI_CANCEL_BACK.ogg" id="11_rloay"] [ext_resource type="AudioStream" uid="uid://oslvh60ec5gc" path="res://src/audio/sfx/UI_CANCEL_BACK.ogg" id="11_rloay"]
[ext_resource type="AudioStream" uid="uid://bo2u1ceci6k1i" path="res://src/audio/sfx/PLAYER_quicker_slash.ogg" id="13_fa8i8"] [ext_resource type="AudioStream" uid="uid://bo2u1ceci6k1i" path="res://src/audio/sfx/PLAYER_quicker_slash.ogg" id="13_fa8i8"]
[ext_resource type="AudioStream" uid="uid://d1ugsv7abo0jb" path="res://src/audio/sfx/player_misc.ogg" id="14_bi4v5"]
[ext_resource type="AudioStream" uid="uid://b0l5a8lg6wtig" path="res://src/audio/sfx/UI_FAILURE TO PICK UP.ogg" id="14_k25ba"]
[ext_resource type="AudioStream" uid="uid://na0lxb1lib11" path="res://src/audio/sfx/player_crit.ogg" id="14_p5cio"] [ext_resource type="AudioStream" uid="uid://na0lxb1lib11" path="res://src/audio/sfx/player_crit.ogg" id="14_p5cio"]
[ext_resource type="AudioStream" uid="uid://bsc83jkt7uisg" path="res://src/audio/sfx/PLAYER_GET_ITEM.ogg" id="15_r16t0"] [ext_resource type="AudioStream" uid="uid://bsc83jkt7uisg" path="res://src/audio/sfx/PLAYER_GET_ITEM.ogg" id="15_r16t0"]
[ext_resource type="AudioStream" uid="uid://ckf3md1ujxhvm" path="res://src/audio/sfx/player_levelup.ogg" id="16_sew62"] [ext_resource type="AudioStream" uid="uid://ckf3md1ujxhvm" path="res://src/audio/sfx/player_levelup.ogg" id="16_sew62"]
[ext_resource type="AudioStream" uid="uid://borq41t2u5jhe" path="res://src/audio/sfx/PLAYER_BUFF.ogg" id="17_rcwkk"] [ext_resource type="AudioStream" uid="uid://coeynqnn61c43" path="res://src/audio/sfx/ITEM_TRANSFER.ogg" id="18_l6w22"]
[ext_resource type="AudioStream" uid="uid://brb8xj4vsgcw4" path="res://src/audio/sfx/player_DEBUFF.ogg" id="18_bi4v5"]
[ext_resource type="AudioStream" uid="uid://coeynqnn61c43" path="res://src/audio/sfx/environment_ITEM_TRANSFER.ogg" id="18_l6w22"]
[ext_resource type="AudioStream" uid="uid://bfrmm07vthpwt" path="res://src/audio/sfx/item_divine_recall.ogg" id="19_nerso"] [ext_resource type="AudioStream" uid="uid://bfrmm07vthpwt" path="res://src/audio/sfx/item_divine_recall.ogg" id="19_nerso"]
[ext_resource type="AudioStream" uid="uid://dl6svxp5ow2vk" path="res://src/audio/sfx/player_death_1.ogg" id="19_uv31i"]
[ext_resource type="AudioStream" uid="uid://bu8akh5uh3ioo" path="res://src/audio/sfx/item_devic_balance_element1.ogg" id="20_rloay"] [ext_resource type="AudioStream" uid="uid://bu8akh5uh3ioo" path="res://src/audio/sfx/item_devic_balance_element1.ogg" id="20_rloay"]
[ext_resource type="AudioStream" uid="uid://nk8m8xwqpfho" path="res://src/audio/sfx/general_RUST.ogg" id="21_6auhl"]
[ext_resource type="AudioStream" uid="uid://bjkn6s2xjxuji" path="res://src/audio/sfx/item_gospel_dimension.ogg" id="21_6hsck"] [ext_resource type="AudioStream" uid="uid://bjkn6s2xjxuji" path="res://src/audio/sfx/item_gospel_dimension.ogg" id="21_6hsck"]
[ext_resource type="AudioStream" uid="uid://droe1wrqv7oau" path="res://src/audio/sfx/general_fire_damage.ogg" id="21_8d214"]
[ext_resource type="AudioStream" uid="uid://c3ur4bgvmsidi" path="res://src/audio/sfx/item_gospel_escape.ogg" id="22_3wq6u"] [ext_resource type="AudioStream" uid="uid://c3ur4bgvmsidi" path="res://src/audio/sfx/item_gospel_escape.ogg" id="22_3wq6u"]
[ext_resource type="AudioStream" uid="uid://4fx3xkjgffsq" path="res://src/audio/sfx/generaL_water_damage.ogg" id="22_rrmug"]
[ext_resource type="AudioStream" uid="uid://bc2pe0l5nr5ro" path="res://src/audio/sfx/ITEM_kyuu_hit.ogg" id="23_aaerj"] [ext_resource type="AudioStream" uid="uid://bc2pe0l5nr5ro" path="res://src/audio/sfx/ITEM_kyuu_hit.ogg" id="23_aaerj"]
[ext_resource type="AudioStream" uid="uid://bdb2wp6hc8dvh" path="res://src/audio/sfx/generaL_wind_damage.ogg" id="23_gcy74"]
[ext_resource type="AudioStream" uid="uid://ck0nc757t0jq5" path="res://src/audio/sfx/ITEM_PERSPECTIVE.ogg" id="23_jdwj3"] [ext_resource type="AudioStream" uid="uid://ck0nc757t0jq5" path="res://src/audio/sfx/ITEM_PERSPECTIVE.ogg" id="23_jdwj3"]
[ext_resource type="AudioStream" uid="uid://dblijlgm8njjv" path="res://src/audio/sfx/item_sine_morphization.ogg" id="24_jdwj3"] [ext_resource type="AudioStream" uid="uid://dblijlgm8njjv" path="res://src/audio/sfx/item_sine_morphization.ogg" id="24_jdwj3"]
[ext_resource type="AudioStream" uid="uid://bfpxwnxn2o0cy" path="res://src/audio/sfx/general_telluric_damage.ogg" id="24_vn70h"]
[ext_resource type="AudioStream" uid="uid://n8anuovfoqmp" path="res://src/audio/sfx/general_holy_damage_2.ogg" id="25_153g4"]
[ext_resource type="AudioStream" uid="uid://b4ks6pgrqn0gh" path="res://src/audio/sfx/general_curse_damage.ogg" id="26_je0ug"]
[ext_resource type="AudioStream" uid="uid://ba8xendacec6" path="res://src/audio/sfx/item_kyuu_layer_2.ogg" id="28_ur8ax"]
[ext_resource type="AudioStream" uid="uid://d2h4l0gxcs5i2" path="res://src/audio/sfx/item_glued.ogg" id="30_cx2n8"]
[ext_resource type="AudioStream" uid="uid://dcfqkapxwvmdd" path="res://src/audio/sfx/iTEM_identify_ALL.ogg" id="31_vpeit"]
[ext_resource type="AudioStream" uid="uid://bio3xjbanwas1" path="res://src/audio/sfx/player_item_identified.ogg" id="40_rqu44"]
[node name="SfxDatabase" type="Node"] [node name="SfxDatabase" type="Node"]
script = ExtResource("1_ojkqd") script = ExtResource("1_ojkqd")
@@ -49,26 +33,21 @@ script = ExtResource("1_ojkqd")
[node name="OpenInventorySound" type="AudioStreamPlayer" parent="UI"] [node name="OpenInventorySound" type="AudioStreamPlayer" parent="UI"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("5_p5cio") stream = ExtResource("5_p5cio")
bus = &"SFX" bus = &"SFX"
[node name="MoveSound" type="AudioStreamPlayer" parent="UI"] [node name="MoveSound" type="AudioStreamPlayer" parent="UI"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("6_r16t0") stream = ExtResource("6_r16t0")
max_polyphony = 5
bus = &"SFX" bus = &"SFX"
[node name="SelectSound" type="AudioStreamPlayer" parent="UI"] [node name="SelectSound" type="AudioStreamPlayer" parent="UI"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("10_nerso") stream = ExtResource("10_nerso")
bus = &"SFX" bus = &"SFX"
[node name="CancelSound" type="AudioStreamPlayer" parent="UI"] [node name="CancelSound" type="AudioStreamPlayer" parent="UI"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("11_rloay") stream = ExtResource("11_rloay")
bus = &"SFX" bus = &"SFX"
@@ -76,224 +55,102 @@ bus = &"SFX"
[node name="HealHPSound" type="AudioStreamPlayer" parent="Player"] [node name="HealHPSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("2_158j8") stream = ExtResource("2_158j8")
bus = &"SFX" bus = &"SFX"
[node name="TakeDamageSound" type="AudioStreamPlayer" parent="Player"] [node name="TakeDamageSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("10_kac56") stream = ExtResource("10_kac56")
bus = &"SFX" bus = &"SFX"
[node name="HealVTSound" type="AudioStreamPlayer" parent="Player"] [node name="HealVTSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3 stream = ExtResource("3_kac56")
stream = ExtResource("16_sew62")
bus = &"SFX" bus = &"SFX"
[node name="WeaponQuickSlashSound" type="AudioStreamPlayer" parent="Player"] [node name="WeaponQuickSlashSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("13_fa8i8") stream = ExtResource("13_fa8i8")
bus = &"SFX" bus = &"SFX"
[node name="WeaponPlasmaSword" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("10_7th20")
bus = &"SFX"
[node name="WeaponSlowSlashSound" type="AudioStreamPlayer" parent="Player"] [node name="WeaponSlowSlashSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("10_vyvit") stream = ExtResource("10_vyvit")
bus = &"SFX" bus = &"SFX"
[node name="CritSound" type="AudioStreamPlayer" parent="Player"] [node name="CritSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("14_p5cio") stream = ExtResource("14_p5cio")
bus = &"SFX" bus = &"SFX"
[node name="PickupItemSound" type="AudioStreamPlayer" parent="Player"] [node name="PickupItemSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("15_r16t0") stream = ExtResource("15_r16t0")
bus = &"SFX" bus = &"SFX"
[node name="PickupFailureSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("14_k25ba")
bus = &"SFX"
[node name="LevelUpSound" type="AudioStreamPlayer" parent="Player"] [node name="LevelUpSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3 stream = ExtResource("16_sew62")
stream = ExtResource("14_bi4v5")
bus = &"SFX" bus = &"SFX"
[node name="EquipSound" type="AudioStreamPlayer" parent="Player"] [node name="EquipSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("7_sew62") stream = ExtResource("7_sew62")
bus = &"SFX" bus = &"SFX"
[node name="UnequipSound" type="AudioStreamPlayer" parent="Player"] [node name="UnequipSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("8_rf1la") stream = ExtResource("8_rf1la")
bus = &"SFX" bus = &"SFX"
[node name="BuffSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("17_rcwkk")
bus = &"SFX"
[node name="DebuffSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("18_bi4v5")
bus = &"SFX"
[node name="DeathSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("19_uv31i")
bus = &"SFX"
[node name="RustSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("21_6auhl")
bus = &"SFX"
[node name="FireDamageSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("21_8d214")
bus = &"SFX"
[node name="WaterDamageSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("22_rrmug")
bus = &"SFX"
[node name="AirDamageSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("23_gcy74")
bus = &"SFX"
[node name="EarthDamageSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("24_vn70h")
bus = &"SFX"
[node name="HolyDamageSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("25_153g4")
bus = &"SFX"
[node name="CurseDamageSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("26_je0ug")
bus = &"SFX"
[node name="AbsorbHPSound" type="AudioStreamPlayer" parent="Player"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("28_ur8ax")
bus = &"SFX"
[node name="Item" type="Node" parent="."] [node name="Item" type="Node" parent="."]
[node name="TransferItemSound" type="AudioStreamPlayer" parent="Item"] [node name="TransferItemSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("18_l6w22") stream = ExtResource("18_l6w22")
bus = &"SFX" bus = &"SFX"
[node name="IncreaseStatSound" type="AudioStreamPlayer" parent="Item"] [node name="IncreaseStatSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("4_fa8i8")
bus = &"SFX"
[node name="DecreaseStatSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("4_fa8i8") stream = ExtResource("4_fa8i8")
bus = &"SFX" bus = &"SFX"
[node name="SortSound" type="AudioStreamPlayer" parent="Item"] [node name="SortSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("9_l6w22") stream = ExtResource("9_l6w22")
bus = &"SFX" bus = &"SFX"
[node name="RecallEnemiesSound" type="AudioStreamPlayer" parent="Item"] [node name="RecallEnemiesSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("19_nerso") stream = ExtResource("19_nerso")
bus = &"SFX" bus = &"SFX"
[node name="KillHalfEnemiesSound" type="AudioStreamPlayer" parent="Item"] [node name="KillHalfEnemiesSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("20_rloay") stream = ExtResource("20_rloay")
bus = &"SFX" bus = &"SFX"
[node name="TeleportToRandomRoomSound" type="AudioStreamPlayer" parent="Item"] [node name="TeleportToRandomRoomSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("21_6hsck") stream = ExtResource("21_6hsck")
bus = &"SFX" bus = &"SFX"
[node name="TeleportToExitSound" type="AudioStreamPlayer" parent="Item"] [node name="TeleportToExitSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("22_3wq6u") stream = ExtResource("22_3wq6u")
bus = &"SFX" bus = &"SFX"
[node name="AbsorbHPFromAllEnemiesSound" type="AudioStreamPlayer" parent="Item"] [node name="AbsorbHPFromAllEnemiesSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("23_aaerj") stream = ExtResource("23_aaerj")
bus = &"SFX" bus = &"SFX"
[node name="SwapHPAndVTSound" type="AudioStreamPlayer" parent="Item"] [node name="SwapHPAndVTSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("23_jdwj3") stream = ExtResource("23_jdwj3")
bus = &"SFX" bus = &"SFX"
[node name="TurnAllEnemiesIntoHealingItemsSound" type="AudioStreamPlayer" parent="Item"] [node name="TurnAllEnemiesIntoHealingItemsSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true unique_name_in_owner = true
process_mode = 3
stream = ExtResource("24_jdwj3") stream = ExtResource("24_jdwj3")
bus = &"SFX" bus = &"SFX"
[node name="GlueSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("30_cx2n8")
bus = &"SFX"
[node name="IdentifyAllSound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("31_vpeit")
bus = &"SFX"
[node name="IdentifySound" type="AudioStreamPlayer" parent="Item"]
unique_name_in_owner = true
process_mode = 3
stream = ExtResource("40_rqu44")
bus = &"SFX"
+30 -33
View File
@@ -2,7 +2,6 @@ using Chickensoft.AutoInject;
using Chickensoft.Introspection; using Chickensoft.Introspection;
using Godot; using Godot;
using System.Collections.Generic; using System.Collections.Generic;
using Zennysoft.Game.Abstractions.Audio;
[Meta(typeof(IAutoNode)), Id("sfx_database")] [Meta(typeof(IAutoNode)), Id("sfx_database")]
public partial class SfxDatabase : Node public partial class SfxDatabase : Node
@@ -25,17 +24,12 @@ public partial class SfxDatabase : Node
{SoundEffect.TakeDamage, TakeDamageSound }, {SoundEffect.TakeDamage, TakeDamageSound },
{SoundEffect.HealVT, HealVTSound }, {SoundEffect.HealVT, HealVTSound },
{SoundEffect.IncreaseStat, IncreaseStatSound }, {SoundEffect.IncreaseStat, IncreaseStatSound },
{SoundEffect.DecreaseStat, DecreaseStatSound },
{SoundEffect.Crit, CritSound }, {SoundEffect.Crit, CritSound },
{SoundEffect.PickupItem, PickupItemSound }, {SoundEffect.PickupItem, PickupItemSound },
{SoundEffect.PickupFailure, PickupFailureSound },
{SoundEffect.OpenInventory, OpenInventorySound }, {SoundEffect.OpenInventory, OpenInventorySound },
{SoundEffect.MoveUI, MoveSound }, {SoundEffect.MoveUI, MoveSound },
{SoundEffect.Equip, EquipSound }, {SoundEffect.Equip, EquipSound },
{SoundEffect.Unequip, UnequipSound }, {SoundEffect.Unequip, UnequipSound },
{SoundEffect.Buff, BuffSound },
{SoundEffect.Debuff, DebuffSound },
{SoundEffect.Death, DeathSound },
{SoundEffect.SortInventory, SortSound }, {SoundEffect.SortInventory, SortSound },
{SoundEffect.SelectUI, SelectSound }, {SoundEffect.SelectUI, SelectSound },
{SoundEffect.CancelUI, CancelSound }, {SoundEffect.CancelUI, CancelSound },
@@ -47,17 +41,8 @@ public partial class SfxDatabase : Node
{SoundEffect.TeleportToExit, TeleportToExitSound}, {SoundEffect.TeleportToExit, TeleportToExitSound},
{SoundEffect.AbsorbHPFromAllEnemies, AbsorbHPFromAllEnemiesSound}, {SoundEffect.AbsorbHPFromAllEnemies, AbsorbHPFromAllEnemiesSound},
{SoundEffect.TurnAllEnemiesIntoHealingItems, TurnAllEnemiesIntoHealingItemsSound}, {SoundEffect.TurnAllEnemiesIntoHealingItems, TurnAllEnemiesIntoHealingItemsSound},
{SoundEffect.Glue, GlueSound }, {SoundEffect.WeaponQuickSlash, WeaponQuickSlashSound },
{SoundEffect.Identify, IdentifySound}, {SoundEffect.WeaponSlowSlash, WeaponSlowSlashSound },
{SoundEffect.IdentifyAll, IdentifyAllSound},
{SoundEffect.Rust, RustSound },
{SoundEffect.FireDamage, FireDamageSound},
{SoundEffect.AirDamage, AirDamageSound},
{SoundEffect.WaterDamage, WaterDamageSound},
{SoundEffect.EarthDamage, EarthDamageSound},
{SoundEffect.HolyDamage, HolyDamageSound},
{SoundEffect.CurseDamage, CurseDamageSound },
{SoundEffect.AbsorbHP, AbsorbHPSound},
}; };
} }
@@ -65,19 +50,14 @@ public partial class SfxDatabase : Node
[Node] private AudioStreamPlayer TakeDamageSound { get; set; } = default!; [Node] private AudioStreamPlayer TakeDamageSound { get; set; } = default!;
[Node] private AudioStreamPlayer HealVTSound { get; set; } = default!; [Node] private AudioStreamPlayer HealVTSound { get; set; } = default!;
[Node] private AudioStreamPlayer IncreaseStatSound { get; set; } = default!; [Node] private AudioStreamPlayer IncreaseStatSound { get; set; } = default!;
[Node] private AudioStreamPlayer DecreaseStatSound { get; set; } = default!;
[Node] private AudioStreamPlayer WeaponQuickSlashSound { get; set; } = default!; [Node] private AudioStreamPlayer WeaponQuickSlashSound { get; set; } = default!;
[Node] private AudioStreamPlayer WeaponSlowSlashSound { get; set; } = default!; [Node] private AudioStreamPlayer WeaponSlowSlashSound { get; set; } = default!;
[Node] private AudioStreamPlayer CritSound { get; set; } = default!; [Node] private AudioStreamPlayer CritSound { get; set; } = default!;
[Node] private AudioStreamPlayer PickupItemSound { get; set; } = default!; [Node] private AudioStreamPlayer PickupItemSound { get; set; } = default!;
[Node] private AudioStreamPlayer PickupFailureSound { get; set; } = default!;
[Node] private AudioStreamPlayer OpenInventorySound { get; set; } [Node] private AudioStreamPlayer OpenInventorySound { get; set; }
[Node] private AudioStreamPlayer MoveSound { get; set; } [Node] private AudioStreamPlayer MoveSound { get; set; }
[Node] private AudioStreamPlayer EquipSound { get; set; } [Node] private AudioStreamPlayer EquipSound { get; set; }
[Node] private AudioStreamPlayer UnequipSound { get; set; } [Node] private AudioStreamPlayer UnequipSound { get; set; }
[Node] private AudioStreamPlayer BuffSound { get; set; }
[Node] private AudioStreamPlayer DebuffSound { get; set; }
[Node] private AudioStreamPlayer DeathSound { get; set; }
[Node] private AudioStreamPlayer SortSound { get; set; } [Node] private AudioStreamPlayer SortSound { get; set; }
[Node] private AudioStreamPlayer SelectSound { get; set; } [Node] private AudioStreamPlayer SelectSound { get; set; }
[Node] private AudioStreamPlayer CancelSound { get; set; } [Node] private AudioStreamPlayer CancelSound { get; set; }
@@ -90,17 +70,6 @@ public partial class SfxDatabase : Node
[Node] private AudioStreamPlayer AbsorbHPFromAllEnemiesSound { get; set; } [Node] private AudioStreamPlayer AbsorbHPFromAllEnemiesSound { get; set; }
[Node] private AudioStreamPlayer SwapHPAndVTSound { get; set; } [Node] private AudioStreamPlayer SwapHPAndVTSound { get; set; }
[Node] private AudioStreamPlayer TurnAllEnemiesIntoHealingItemsSound { get; set; } [Node] private AudioStreamPlayer TurnAllEnemiesIntoHealingItemsSound { get; set; }
[Node] private AudioStreamPlayer GlueSound { get; set; }
[Node] private AudioStreamPlayer IdentifySound { get; set; }
[Node] private AudioStreamPlayer IdentifyAllSound { get; set; }
[Node] private AudioStreamPlayer RustSound { get; set; }
[Node] private AudioStreamPlayer FireDamageSound { get; set; }
[Node] private AudioStreamPlayer AirDamageSound { get; set; }
[Node] private AudioStreamPlayer WaterDamageSound { get; set; }
[Node] private AudioStreamPlayer EarthDamageSound { get; set; }
[Node] private AudioStreamPlayer HolyDamageSound { get; set; }
[Node] private AudioStreamPlayer CurseDamageSound { get; set; }
[Node] private AudioStreamPlayer AbsorbHPSound { get; set; }
private Dictionary<SoundEffect, AudioStreamPlayer> _sfxMap; private Dictionary<SoundEffect, AudioStreamPlayer> _sfxMap;
@@ -112,3 +81,31 @@ public partial class SfxDatabase : Node
} }
} }
public enum SoundEffect
{
HealHP,
TakeDamage,
HealVT,
IncreaseStat,
Crit,
PickupItem,
OpenInventory,
MoveUI,
Equip,
Unequip,
SortInventory,
SelectUI,
CancelUI,
LevelUp,
Transfer,
RecallEnemies,
KillHalfEnemies,
TeleportToRandomRoom,
TeleportToExit,
AbsorbHPFromAllEnemies,
SwapHPAndVT,
TurnAllEnemiesIntoHealingItems,
WeaponQuickSlash,
WeaponSlowSlash,
}
@@ -1,19 +0,0 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://7esvkguxl3cb"
path="res://.godot/imported/AMB_BAD_END_EARTHQUAKE.ogg-03e817303decd8b8e41745609f87f10c.oggvorbisstr"
[deps]
source_file="res://src/audio/AMB/AMB_BAD_END_EARTHQUAKE.ogg"
dest_files=["res://.godot/imported/AMB_BAD_END_EARTHQUAKE.ogg-03e817303decd8b8e41745609f87f10c.oggvorbisstr"]
[params]
loop=true
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4
Binary file not shown.
@@ -1,19 +0,0 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://b5vhghigr263m"
path="res://.godot/imported/amb_ATMOSTPHERE.ogg-45d9a9c09d45b233375d8c723e42c852.oggvorbisstr"
[deps]
source_file="res://src/audio/AMB/amb_ATMOSTPHERE.ogg"
dest_files=["res://.godot/imported/amb_ATMOSTPHERE.ogg-45d9a9c09d45b233375d8c723e42c852.oggvorbisstr"]
[params]
loop=true
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4
Binary file not shown.
@@ -1,19 +0,0 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://dun1mdjlmv2iy"
path="res://.godot/imported/amb_CRICKETS.ogg-ee8db802e6163ca5c5e3101e3337d9d3.oggvorbisstr"
[deps]
source_file="res://src/audio/AMB/amb_CRICKETS.ogg"
dest_files=["res://.godot/imported/amb_CRICKETS.ogg-ee8db802e6163ca5c5e3101e3337d9d3.oggvorbisstr"]
[params]
loop=true
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4
Binary file not shown.
@@ -1,19 +0,0 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://cstt5t4tspgll"
path="res://.godot/imported/amb_RIVER.ogg-a5ed08fd6d161ef0a5f38f804143c9f8.oggvorbisstr"
[deps]
source_file="res://src/audio/AMB/amb_RIVER.ogg"
dest_files=["res://.godot/imported/amb_RIVER.ogg-a5ed08fd6d161ef0a5f38f804143c9f8.oggvorbisstr"]
[params]
loop=true
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4
Binary file not shown.
@@ -1,19 +0,0 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://db0e4p4b11tyf"
path="res://.godot/imported/amb_beach.ogg-8f340d18fd5888c59c80580ed33b86be.oggvorbisstr"
[deps]
source_file="res://src/audio/AMB/amb_beach.ogg"
dest_files=["res://.godot/imported/amb_beach.ogg-8f340d18fd5888c59c80580ed33b86be.oggvorbisstr"]
[params]
loop=true
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4
Binary file not shown.
@@ -1,19 +0,0 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://btkbelic75ecn"
path="res://.godot/imported/amb_cellular.ogg-58bcb88de2f576fd0d8bea7152aba8e8.oggvorbisstr"
[deps]
source_file="res://src/audio/AMB/amb_cellular.ogg"
dest_files=["res://.godot/imported/amb_cellular.ogg-58bcb88de2f576fd0d8bea7152aba8e8.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4
@@ -1,19 +0,0 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://b306wov6yfaan"
path="res://.godot/imported/amb_flame_burning.ogg-9ffba7ace9b30cdc0b929e1ee4bc8717.oggvorbisstr"
[deps]
source_file="res://src/audio/AMB/amb_flame_burning.ogg"
dest_files=["res://.godot/imported/amb_flame_burning.ogg-9ffba7ace9b30cdc0b929e1ee4bc8717.oggvorbisstr"]
[params]
loop=true
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4
Binary file not shown.
@@ -1,19 +0,0 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://cgk17d8erskht"
path="res://.godot/imported/amb_ocean.ogg-f4ee3d30caf9194f7881a02c6507d38a.oggvorbisstr"
[deps]
source_file="res://src/audio/AMB/amb_ocean.ogg"
dest_files=["res://.godot/imported/amb_ocean.ogg-f4ee3d30caf9194f7881a02c6507d38a.oggvorbisstr"]
[params]
loop=true
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4
Binary file not shown.
@@ -1,19 +0,0 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://60hn13ryqn88"
path="res://.godot/imported/amb_perlin.ogg-369d474f40ce79fe9f5b6c639a907e11.oggvorbisstr"
[deps]
source_file="res://src/audio/AMB/amb_perlin.ogg"
dest_files=["res://.godot/imported/amb_perlin.ogg-369d474f40ce79fe9f5b6c639a907e11.oggvorbisstr"]
[params]
loop=true
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4
@@ -1,19 +0,0 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://bxrlehky1833a"
path="res://.godot/imported/amb_pipe_loop_brokenloop.ogg-01835f0cb823262b3486e1d51b3fabed.oggvorbisstr"
[deps]
source_file="res://src/audio/AMB/amb_pipe_loop_brokenloop.ogg"
dest_files=["res://.godot/imported/amb_pipe_loop_brokenloop.ogg-01835f0cb823262b3486e1d51b3fabed.oggvorbisstr"]
[params]
loop=true
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Some files were not shown because too many files have changed in this diff Show More