using System;
namespace AutoMiningScript
{
public partial class Program
{
// Resources are selected at build time. Wire values and persisted codes stay invariant.
public static partial class L
{
public static string F(string format, params object[] args) { return string.Format(Data.Culture, format, args); }
public static string Bool(bool value) { return value ? DisplayYes : DisplayNo; }
public static string State(FlightState state)
{
switch (state)
{
case FlightState.Boot: return DisplayStateBoot;
case FlightState.Docked: return DisplayStateDocked;
case FlightState.Servicing: return DisplayStateServicing;
case FlightState.Ready: return DisplayStateReady;
case FlightState.Departing: return DisplayStateDeparting;
case FlightState.Transit: return DisplayStateTransit;
case FlightState.Survey: return DisplayStateSurvey;
case FlightState.Align: return DisplayStateAlign;
case FlightState.Drilling: return DisplayStateDrilling;
case FlightState.Retreat: return DisplayStateRetreat;
case FlightState.Returning: return DisplayStateReturning;
case FlightState.Holding: return DisplayStateHolding;
case FlightState.DockAlign: return DisplayStateDockAlign;
case FlightState.DockApproach: return DisplayStateDockApproach;
case FlightState.DockRetreat: return DisplayStateDockRetreat;
case FlightState.Paused: return DisplayStatePaused;
case FlightState.Manual: return DisplayStateManual;
case FlightState.Fault: return DisplayStateFault;
default: return DisplayUnknown;
}
}
public static string Outcome(string code)
{
switch (code)
{
case "": case "Pending": return DisplayOutcomePending;
case "Complete": return DisplayOutcomeComplete;
case "Blocked": return DisplayOutcomeBlocked;
case "SurveyHit": return DisplayOutcomeSurveyHit;
case "SurveyEmpty": return DisplayOutcomeSurveyEmpty;
case "InvalidSample": return DisplayOutcomeInvalidSample;
case "Discovery": return DisplayOutcomeDiscovery;
case "Paused": return DisplayStatePaused;
default: return code;
}
}
public static string Ore(string code)
{
switch (code)
{
case "Iron": return DisplayOreIron;
case "Nickel": return DisplayOreNickel;
case "Cobalt": return DisplayOreCobalt;
case "Magnesium": return DisplayOreMagnesium;
case "Silicon": return DisplayOreSilicon;
case "Silver": return DisplayOreSilver;
case "Gold": return DisplayOreGold;
case "Platinum": return DisplayOrePlatinum;
case "Uranium": return DisplayOreUranium;
case "Stone": return DisplayOreStone;
case "Ice": return DisplayOreIce;
case "Scrap": return DisplayOreScrap;
default: return code;
}
}
public static string Role(string code)
{
switch (code)
{
case "fleet": return DisplayRoleFleet;
case "miner": return DisplayRoleMiner;
case "marker": return DisplayRoleMarker;
case "watchdog": return DisplayRoleWatchdog;
default: return code;
}
}
public static string OreList(string value)
{
if (string.IsNullOrEmpty(value)) return "";
string[] items = value.Split(',');
for (int i = 0; i < items.Length; i++)
{
string item = items[i].Trim(); int colon = item.IndexOf(':');
items[i] = colon >= 0 ? Ore(item.Substring(0, colon)) + item.Substring(colon) : Ore(item);
}
return string.Join(", ", items);
}
}
}
}
using System;
namespace AutoMiningScript
{
public partial class Program
{
// Resources are selected at build time. Wire values and persisted codes stay invariant.
public static partial class L
{
public static string F(string format, params object[] args) { return string.Format(Data.Culture, format, args); }
public static string Bool(bool value) { return value ? DisplayYes : DisplayNo; }
public static string State(FlightState state)
{
switch (state)
{
case FlightState.Boot: return DisplayStateBoot;
case FlightState.Docked: return DisplayStateDocked;
case FlightState.Servicing: return DisplayStateServicing;
case FlightState.Ready: return DisplayStateReady;
case FlightState.Departing: return DisplayStateDeparting;
case FlightState.Transit: return DisplayStateTransit;
case FlightState.Survey: return DisplayStateSurvey;
case FlightState.Align: return DisplayStateAlign;
case FlightState.Drilling: return DisplayStateDrilling;
case FlightState.Retreat: return DisplayStateRetreat;
case FlightState.Returning: return DisplayStateReturning;
case FlightState.Holding: return DisplayStateHolding;
case FlightState.DockAlign: return DisplayStateDockAlign;
case FlightState.DockApproach: return DisplayStateDockApproach;
case FlightState.DockRetreat: return DisplayStateDockRetreat;
case FlightState.Paused: return DisplayStatePaused;
case FlightState.Manual: return DisplayStateManual;
case FlightState.Fault: return DisplayStateFault;
default: return DisplayUnknown;
}
}
public static string Outcome(string code)
{
switch (code)
{
case "": case "Pending": return DisplayOutcomePending;
case "Complete": return DisplayOutcomeComplete;
case "Blocked": return DisplayOutcomeBlocked;
case "SurveyHit": return DisplayOutcomeSurveyHit;
case "SurveyEmpty": return DisplayOutcomeSurveyEmpty;
case "InvalidSample": return DisplayOutcomeInvalidSample;
case "Discovery": return DisplayOutcomeDiscovery;
case "Paused": return DisplayStatePaused;
default: return code;
}
}
public static string Ore(string code)
{
switch (code)
{
case "Iron": return DisplayOreIron;
case "Nickel": return DisplayOreNickel;
case "Cobalt": return DisplayOreCobalt;
case "Magnesium": return DisplayOreMagnesium;
case "Silicon": return DisplayOreSilicon;
case "Silver": return DisplayOreSilver;
case "Gold": return DisplayOreGold;
case "Platinum": return DisplayOrePlatinum;
case "Uranium": return DisplayOreUranium;
case "Stone": return DisplayOreStone;
case "Ice": return DisplayOreIce;
case "Scrap": return DisplayOreScrap;
default: return code;
}
}
public static string Role(string code)
{
switch (code)
{
case "fleet": return DisplayRoleFleet;
case "miner": return DisplayRoleMiner;
case "marker": return DisplayRoleMarker;
case "watchdog": return DisplayRoleWatchdog;
default: return code;
}
}
public static string OreList(string value)
{
if (string.IsNullOrEmpty(value)) return "";
string[] items = value.Split(',');
for (int i = 0; i < items.Length; i++)
{
string item = items[i].Trim(); int colon = item.IndexOf(':');
items[i] = colon >= 0 ? Ore(item.Substring(0, colon)) + item.Substring(colon) : Ore(item);
}
return string.Join(", ", items);
}
}
}
}