ported from perforce
This commit is contained in:
63
RobotAndDonkey.Game/Pois/Poi.cs
Normal file
63
RobotAndDonkey.Game/Pois/Poi.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
|
||||
using RobotAndDonkey.Game.Data;
|
||||
using RobotAndDonkey.Game.Modifiers;
|
||||
|
||||
namespace RobotAndDonkey.Game.Pois;
|
||||
|
||||
public abstract record Poi
|
||||
{
|
||||
public abstract string Tooltip { get; }
|
||||
|
||||
public abstract Poi DeepClone();
|
||||
|
||||
public virtual Modifier[] TooltipModifiers => [];
|
||||
}
|
||||
|
||||
public record Crate : Poi
|
||||
{
|
||||
public override Crate DeepClone() => new() { Amount = Amount };
|
||||
|
||||
public int Amount { get; set; }
|
||||
|
||||
public override string Tooltip => "Goods from this crate can be picked up";
|
||||
}
|
||||
|
||||
public record Shed : Poi
|
||||
{
|
||||
public override Shed DeepClone() => new() { Requested = Requested, Received = Received };
|
||||
|
||||
public int Requested { get; set; }
|
||||
public int Received { get; set; }
|
||||
public int Remaining => Math.Max(0, Requested - Received);
|
||||
|
||||
public override string Tooltip => "Receives goods from crates";
|
||||
}
|
||||
|
||||
public record Tower : Poi
|
||||
{
|
||||
public override Tower DeepClone() => new() { Active = Active };
|
||||
|
||||
public bool Active { get; set; } = true;
|
||||
|
||||
public override string Tooltip => "While active, the interference from this tower causes nearby electronics to become unreliable. Can be deactivated.";
|
||||
|
||||
public override Modifier[] TooltipModifiers => [new UnreliableCellModifier(EModifierDuration.Permanent)];
|
||||
}
|
||||
|
||||
public record Donkey : Poi
|
||||
{
|
||||
public override Donkey DeepClone() => new() { Direction = Direction };
|
||||
|
||||
public EDirection Direction { get; set; }
|
||||
|
||||
public override string Tooltip => $"Increases carry capacity by {Balancing.Instance.DonkeyMaxCarryBonus}. Can be recruited.";
|
||||
}
|
||||
|
||||
public record Avatar : Poi
|
||||
{
|
||||
public override Avatar DeepClone() => new() { Direction = Direction };
|
||||
|
||||
public EDirection Direction { get; set; }
|
||||
|
||||
public override string Tooltip => "The robot will execute instructions";
|
||||
}
|
||||
Reference in New Issue
Block a user