First commit for private source control. Older commits available on Github.

This commit is contained in:
2026-03-26 12:52:52 +00:00
parent a04c602626
commit 2d449c4a17
2176 changed files with 408185 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4ab38d47b61c4887836156eb319d0c63
timeCreated: 1771172454

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 6b619d489d9440a0a3c1a9f46eda7fe6
timeCreated: 1773780379

View File

@@ -0,0 +1,97 @@
using System;
using System.Linq;
using BriarQueen.Data.Identifiers;
using BriarQueen.Framework.Coordinators.Events;
using BriarQueen.Framework.Events.Gameplay;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Interaction.Data;
using BriarQueen.Framework.Managers.Player;
using BriarQueen.Framework.Managers.Player.Data;
using Cysharp.Threading.Tasks;
namespace BriarQueen.Game.Items.Interactions.ChapterOne.Village
{
[Serializable]
public class PliersInteraction : BaseInteraction
{
public override UniTask<bool> TryUseWith(
ItemDataSo self,
ItemDataSo other,
PlayerManager playerManager,
EventCoordinator eventCoordinator)
{
if (other == null)
{
eventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.CantUseItem)));
return UniTask.FromResult(false);
}
var pliersId = ItemIDs.Get(ItemKey.Pliers);
var emeraldAmuletId = ItemIDs.Get(ItemKey.EmeraldAmulet);
var rubyRingId = ItemIDs.Get(ItemKey.RubyRing);
var diamondTiaraId = ItemIDs.Get(ItemKey.DiamondTiara);
var emeraldId = ItemIDs.Get(ItemKey.Emerald);
var rubyId = ItemIDs.Get(ItemKey.Ruby);
var diamondId = ItemIDs.Get(ItemKey.Diamond);
var success = other.UniqueID switch
{
var id when id == emeraldAmuletId => ExtractGem(
emeraldId,
emeraldAmuletId,
"You carefully pull the emerald out of the amulet."),
var id when id == rubyRingId => ExtractGem(
rubyId,
rubyRingId,
"You carefully pull the ruby out of the ring."),
var id when id == diamondTiaraId => ExtractGem(
diamondId,
diamondTiaraId,
"You carefully pull the diamond out of the tiara."),
_ => FailInteraction()
};
return UniTask.FromResult(success);
bool ExtractGem(string gemId, string sourceItemId, string message)
{
eventCoordinator.Publish(new DisplayInteractEvent(message));
playerManager.CollectItem(gemId);
playerManager.RemoveItem(sourceItemId);
eventCoordinator.Publish(new SelectedItemChangedEvent(null));
CheckIfPliersBreak();
return true;
}
bool FailInteraction()
{
eventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.CantUseItem)));
return false;
}
void CheckIfPliersBreak()
{
var collectedItems = playerManager.GetAllCollectedItems();
var hasEmerald = collectedItems.Any(x => x.UniqueID == emeraldId);
var hasRuby = collectedItems.Any(x => x.UniqueID == rubyId);
var hasDiamond = collectedItems.Any(x => x.UniqueID == diamondId);
if (hasEmerald && hasRuby && hasDiamond)
{
eventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.PliersSnapped)));
playerManager.RemoveItem(pliersId);
eventCoordinator.Publish(new SelectedItemChangedEvent(null));
}
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b067daed4e5f4296a1a77f92af07cbc1
timeCreated: 1773780295

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 0adff31d53cb4f0197b3bfd4b779d036
timeCreated: 1771172785

View File

@@ -0,0 +1,36 @@
using System;
using BriarQueen.Data.Identifiers;
using BriarQueen.Framework.Coordinators.Events;
using BriarQueen.Framework.Events.Gameplay;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Interaction.Data;
using BriarQueen.Framework.Managers.Player;
using BriarQueen.Framework.Managers.Player.Data;
using Cysharp.Threading.Tasks;
namespace BriarQueen.Game.Items.Interactions.ChapterOne.Workshop
{
[Serializable]
public class SmallRagInteraction : BaseInteraction
{
public override async UniTask<bool> TryUseWith(ItemDataSo self, ItemDataSo other, PlayerManager playerManager,
EventCoordinator eventCoordinator)
{
if (other == null)
return false;
if (other.UniqueID != ItemIDs.Get(ItemKey.DustySapphire))
return false;
eventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.LooksImportant)));
playerManager.CollectItem(ItemIDs.Get(ItemKey.Sapphire));
playerManager.RemoveItem(ItemIDs.Get(ItemKey.DustySapphire));
playerManager.RemoveItem(ItemIDs.Get(ItemKey.SmallRag));
eventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.RagFallsApart)));
eventCoordinator.Publish(new SelectedItemChangedEvent(null));
return true;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e41ece1b6efd4de3ae4a7c5fa0cf7a8a
timeCreated: 1771172802