Enable finite automatic convoy startup and scoped gunner skill
This commit is contained in:
@@ -40,8 +40,29 @@ class ERR_HQAdminProvider : ERR_AdminProvider
|
||||
else if (parts.Count() == 3 && parts[2] == "help") replies.Insert(range + ". " + effect);
|
||||
else replies.Insert("Invalid value or settings could not be saved; previous setting retained. " + range + ". " + effect);
|
||||
}
|
||||
// HQ snapshots this saved switch at round creation. Admin changes never
|
||||
// dispatch, cancel, refund or retry the current round's canonical convoy.
|
||||
protected void ConvoyAutoSetting(ERR_GameMode mode, array<string> parts, array<string> replies)
|
||||
{
|
||||
string key = "automaticConvoyEnabled";
|
||||
string effect = "Applies next round only; current startup and manual convoy start unchanged. At most one finite initial convoy; losses are not replaced.";
|
||||
string range = "0 disabled, 1 enabled (default)";
|
||||
if (parts.Count() == 4 && parts[3] == "show")
|
||||
{ replies.Insert(key + "=" + mode.Settings().Get(key).ToString() + " saved for next round. " + effect); return; }
|
||||
int value;
|
||||
if (parts.Count() == 5 && parts[3] == "set" && ERR_CommandArguments.Integer(parts[4], value) && mode.Settings().Set(key, value))
|
||||
replies.Insert(key + "=" + value.ToString() + " saved for next round. " + effect);
|
||||
else if (parts.Count() == 4 && parts[3] == "help") replies.Insert(range + ". " + effect);
|
||||
else replies.Insert("Invalid value or settings could not be saved; previous setting retained. " + range + ". " + effect);
|
||||
}
|
||||
override bool Execute(ERR_GameMode mode, string arguments, array<string> replies)
|
||||
{
|
||||
if (arguments == "hq convoy auto" || arguments.IndexOf("hq convoy auto ") == 0)
|
||||
{
|
||||
if (!m_HQ) { replies.Insert("HQ unavailable."); return true; }
|
||||
array<string> parts = {}; arguments.Split(" ", parts, true);
|
||||
ConvoyAutoSetting(mode, parts, replies); return true;
|
||||
}
|
||||
if (arguments.IndexOf("hq stinger ") == 0)
|
||||
{
|
||||
if (!m_HQ) { replies.Insert("HQ unavailable."); return true; }
|
||||
@@ -71,9 +92,9 @@ class ERR_HQAdminProvider : ERR_AdminProvider
|
||||
{
|
||||
if (topic != "hq") return false;
|
||||
replies.Insert("/esc hq show | hq memory | hq log show|next|set on|off | hq convoy show|start");
|
||||
replies.Insert("/esc hq interval|squads|radius|stinger show|set N");
|
||||
replies.Insert("/esc hq interval|squads|radius|stinger show|set N | hq convoy auto show|set 0|1|help");
|
||||
replies.Insert("Stinger: 0 off, 1 every eligible soldier, 2..10000 one in N; applies only before each actor rolls.");
|
||||
replies.Insert("HQ assigns available physical squads through delivered reports. Convoy start uses the single finite initial deployment; losses are not replaced.");
|
||||
replies.Insert("Convoy auto defaults to 1; saves apply next round only. Auto and manual start share one finite initial deployment; losses are not replaced.");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user