Files
FCP-Tools/Source/FCPTools/FalloutCore/Robotics/CompProtectronMode.cs
T
RickGrymes 361cdbac52 Add scenario options and quest helpers
Introduce a new scenario settings tab with configurable starting year support and optional "start enlisted" scenario behavior, including updated scenario defs and opening text tokens. This also folds enlist settings into the main mod settings flow, adds quest and unique-character helpers for companion spawns and join quests, and includes smaller gameplay patches like NCR tent handling, Legion ear butcher drops, and quieter homing projectile logging.
2026-07-25 09:01:02 -05:00

50 lines
1.2 KiB
C#

using Verse;
namespace FCP.Core.Robotics
{
public enum ProtectronMode : byte
{
Guard,
Construct,
Haul,
Clean
}
public class CompProperties_ProtectronMode : CompProperties
{
public CompProperties_ProtectronMode()
{
compClass = typeof(CompProtectronMode);
}
}
public class CompProtectronMode : ThingComp
{
private ProtectronMode mode = ProtectronMode.Haul;
public CompProperties_ProtectronMode Props => (CompProperties_ProtectronMode)props;
public ProtectronMode Mode => mode;
public void SetMode(ProtectronMode newMode)
{
mode = newMode;
}
public override void PostExposeData()
{
base.PostExposeData();
Scribe_Values.Look(ref mode, "protectronMode", ProtectronMode.Haul);
}
public override string CompInspectStringExtra()
{
if ((parent as Pawn)?.Faction != RimWorld.Faction.OfPlayer)
{
return "FCP_ProtectronMode_Inspect".Translate("FCP_RobotMode_Wandering".Translate());
}
return "FCP_ProtectronMode_Inspect".Translate(mode.ToString());
}
}
}