First commit for private source control. Older commits available on Github.
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
using BriarQueen.Data.Identifiers;
|
||||
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;
|
||||
|
||||
namespace BriarQueen.Game.Items.Environment.ChapterOne.Pumphouse
|
||||
{
|
||||
public class PumpHouseWaterValve : BaseItem
|
||||
{
|
||||
public override string InteractableName => "Water Valve";
|
||||
public override UICursorService.CursorStyle ApplicableCursorStyle => UICursorService.CursorStyle.Interact;
|
||||
|
||||
public override UniTask OnInteract(ItemDataSo item = null)
|
||||
{
|
||||
if (!CheckEmptyHands())
|
||||
return UniTask.CompletedTask;
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.CantUseItem)));
|
||||
return UniTask.CompletedTask;
|
||||
}
|
||||
|
||||
if (SaveManager.GetLevelFlag(LevelFlag.PumpWaterRestored))
|
||||
{
|
||||
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(LevelInteractKey.WaterValve)));
|
||||
return UniTask.CompletedTask;
|
||||
}
|
||||
|
||||
if (!SaveManager.GetLevelFlag(LevelFlag.FountainVinesCut))
|
||||
{
|
||||
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(LevelInteractKey.ClearVinesOutside)));
|
||||
return UniTask.CompletedTask;
|
||||
}
|
||||
|
||||
// TODO : Play Water SFX
|
||||
SaveManager.SetLevelFlag(LevelFlag.PumpWaterRestored, true);
|
||||
|
||||
return UniTask.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user