Laxley Grandfather Clock puzzle artwork done.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user