Laxley Grandfather Clock puzzle artwork done.

This commit is contained in:
2026-03-28 18:53:38 +00:00
parent 69306a141b
commit 83e9a35d2f
152 changed files with 12822 additions and 194 deletions

View File

@@ -46,10 +46,30 @@ namespace BriarQueen.Game.Items.Environment.ChapterOne.VillageStreet
private void PublishFailureMessage()
{
var message = SettingsService.Game.AutoUseTools
? InteractEventIDs.Get(LevelInteractKey.CutVines)
: InteractEventIDs.Get(ItemInteractKey.WrongTool);
var autoUseTools = SettingsService != null &&
SettingsService.Game != null &&
SettingsService.Game.AutoUseTools;
var equippedTool = PlayerManager.GetEquippedTool();
string message;
if (equippedTool == ToolID.None)
{
message = InteractEventIDs.Get(LevelInteractKey.CutVines);
}
else if (autoUseTools)
{
// In auto-use mode, reaching this point means the player does not have access
// to the required tool at all, so this should still read like a generic failure.
message = InteractEventIDs.Get(LevelInteractKey.CutVines);
}
else
{
// Auto-use is disabled, and the player has some tool equipped that is not valid.
message = InteractEventIDs.Get(ItemInteractKey.WrongTool);
}
EventCoordinator.Publish(new DisplayInteractEvent(message));
}
}

View File

@@ -3,6 +3,7 @@ using BriarQueen.Data.IO.Saves;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Levels.Data;
using BriarQueen.Framework.Managers.Player.Data;
using BriarQueen.Framework.Managers.UI;
using Cysharp.Threading.Tasks;
using UnityEngine;
@@ -14,6 +15,10 @@ namespace BriarQueen.Game.Items.Environment.General
[SerializeField]
private LevelFlag _levelFlag;
public override UICursorService.CursorStyle ApplicableCursorStyle => UICursorService.CursorStyle.Interact;
public override async UniTask OnInteract(ItemDataSo item = null)
{
if (item != null)
@@ -22,7 +27,7 @@ namespace BriarQueen.Game.Items.Environment.General
return;
}
if (!PlayerManager.CanUseTool(ToolID.WaterBucket))
if (!PlayerManager.CanUseTool(ToolID.EndlessGoblet))
{
PublishFailureMessage();
return;

View File

@@ -52,10 +52,30 @@ namespace BriarQueen.Game.Items.Environment.General
private void PublishFailureMessage()
{
var message = SettingsService.Game.AutoUseTools
? InteractEventIDs.Get(LevelInteractKey.CutVines)
: InteractEventIDs.Get(ItemInteractKey.WrongTool);
var autoUseTools = SettingsService != null &&
SettingsService.Game != null &&
SettingsService.Game.AutoUseTools;
var equippedTool = PlayerManager.GetEquippedTool();
string message;
if (equippedTool == ToolID.None)
{
message = InteractEventIDs.Get(LevelInteractKey.CutVines);
}
else if (autoUseTools)
{
// In auto-use mode, reaching this point means the player does not have access
// to the required tool at all, so this should still read like a generic failure.
message = InteractEventIDs.Get(LevelInteractKey.CutVines);
}
else
{
// Auto-use is disabled, and the player has some tool equipped that is not valid.
message = InteractEventIDs.Get(ItemInteractKey.WrongTool);
}
EventCoordinator.Publish(new DisplayInteractEvent(message));
}
}

View File

@@ -39,6 +39,11 @@ namespace BriarQueen.Game.Items.HoverZones
public CanvasGroup CanvasGroup;
public bool CanInteract()
{
return true;
}
protected void Awake()
{
if(CanvasGroup == null)

View File

@@ -1,7 +1,60 @@
using BriarQueen.Data.Identifiers;
using BriarQueen.Data.IO.Saves;
using BriarQueen.Framework.Events.Gameplay;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Levels.Data;
using BriarQueen.Framework.Managers.Player.Data;
using BriarQueen.Framework.Managers.UI;
using Cysharp.Threading.Tasks;
namespace BriarQueen.Game.Items.Pickups.ChapterOne.LaxleyHouse
{
public class MantleClock
public class MantleClock : BaseItem
{
public override UICursorService.CursorStyle ApplicableCursorStyle =>
HasRetrievedHourHand
? UICursorService.CursorStyle.Inspect
: UICursorService.CursorStyle.Pickup;
public override string InteractableName => "Broken Mantle Clock";
private bool HasRetrievedHourHand =>
SaveManager.GetLevelFlag(LevelFlag.LaxleyHourHandRetrieved);
public override async UniTask OnInteract(ItemDataSo item = null)
{
if (!CheckEmptyHands())
return;
if (item != null)
{
EventCoordinator.Publish(
new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.CantUseItem)));
return;
}
if (HasRetrievedHourHand)
{
EventCoordinator.Publish(
new DisplayInteractEvent(InteractEventIDs.Get(EnvironmentInteractKey.LaxleyHouseBrokenClock)));
return;
}
PlayerManager.CollectItem(ItemIDs.Get(ItemKey.LaxleyClockHourHand));
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.LooksImportant)));
EventCoordinator.Publish(new SelectedItemChangedEvent(null));
await OnInteracted();
}
protected override UniTask OnInteracted()
{
if (!HasRetrievedHourHand)
SaveManager.SetLevelFlag(LevelFlag.LaxleyHourHandRetrieved, true);
return UniTask.CompletedTask;
}
}
}