Files
VOIDRPG/Assets/90 - Scripts/Generic/Objects/Unit/Actions/Exceptions/UnitActionErrorMessage.cs
T
2026-07-09 21:33:33 +02:00

51 lines
3.5 KiB
C#

using System.Collections.Generic;
namespace VOID.Generic.Objects.Unit.Actions.Exceptions
{
public static class UnitActionErrorMessage
{
private static readonly Dictionary<UnitActionErrorType, string> Messages = new()
{
[UnitActionErrorType.ActionStateIsNotReady] = "Can't do this action yet",
[UnitActionErrorType.NotInRange] = "Target is out of range",
[UnitActionErrorType.UnitStateIsNotControllable] = "Unit is busy",
[UnitActionErrorType.UnitDontCarryThatItem] = "Unit don't carry that item",
[UnitActionErrorType.UnitDontWearThatItem] = "Unit don't wear that item",
[UnitActionErrorType.ItemIsNotOnGround] = "Item is not on ground",
[UnitActionErrorType.RequirementsNotMeetToEquipThatItem] = "Unit don't meet requirement to equip that item",
[UnitActionErrorType.CannotEquipItemInThatSlot] = "That item can't be equipped in this equipment slot",
[UnitActionErrorType.RequirementsNotMeetToUseThatItem] = "Unit don't meet requirement to use that item",
[UnitActionErrorType.RequirementsNotMeetToUseThatAbility] = "Unit don't meet requirement to use that ability",
[UnitActionErrorType.UnEquipIsPrevented] = "UnEquip prevented",
[UnitActionErrorType.DropIsPrevented] = "Drop prevented",
[UnitActionErrorType.EquipIsPrevented] = "Equip prevented",
[UnitActionErrorType.PickIsPrevented] = "Pick prevented",
[UnitActionErrorType.UseIsPrevented] = "Use prevented",
[UnitActionErrorType.ContainerIsNotOpenedByThisUnit] = "Container is not opened by this unit",
[UnitActionErrorType.ItemIsNotMovable] = "That item can't be moved",
[UnitActionErrorType.ItemIsNotPickable] = "That item can't be picked",
[UnitActionErrorType.AbilityIsPrevented] = "Ability prevented",
[UnitActionErrorType.AbilityHitIsPrevented] = "Ability hit prevented",
[UnitActionErrorType.UsableNotEnoughStacks] = "Item don't have enough stacks to be used",
[UnitActionErrorType.PreviousActionNotFinished] = "Previous required action wasn't finished",
[UnitActionErrorType.UnitNotInTurnManager] = "Unit don't participate in any turn mechanics",
[UnitActionErrorType.UnitSelfTurnNotActive] = "It's not this unit's turn",
[UnitActionErrorType.UnitNotEnoughActionPoints] = "Not enough action points to do that",
[UnitActionErrorType.UnitNotEnoughMovePoints] = "Not enough move points to do that",
[UnitActionErrorType.TalkNotAvailableWhenTurnActive] = "Talking during turn mechanics not available",
[UnitActionErrorType.ThisUnitCantMove] = "This unit can't do Move action",
[UnitActionErrorType.ThisUnitCantAttack] = "This unit can't do Attack action",
[UnitActionErrorType.ThisUnitCantUse] = "This unit can't do Use action",
[UnitActionErrorType.ThisUnitCantTalk] = "This unit can't do Talk action",
[UnitActionErrorType.ThisUnitCantTake] = "This unit can't do Take action",
[UnitActionErrorType.ThisUnitCantInspect] = "This unit can't do Inspect action",
[UnitActionErrorType.OtherUnitCantBeInspected] = "Other unit can't be Inspected",
[UnitActionErrorType.OtherUnitCantBeTalked] = "Other unit can't be Talked with",
};
public static string Get(UnitActionErrorType errorType)
{
return Messages.GetValueOrDefault(errorType, errorType.ToString());
}
}
}