Integrate radio-delivered convoy cover and conservative squad ammunition reports
This commit is contained in:
@@ -25,8 +25,29 @@ class ERR_HQAdminProvider : ERR_AdminProvider
|
||||
m_HQ.Journal().Read(after, lines, cursor, limit);
|
||||
return true;
|
||||
}
|
||||
// A saved chance changes only future individual startup rolls. It cannot
|
||||
// reroll registered soldiers or remove/replenish an issued physical launcher.
|
||||
protected void StingerSetting(ERR_GameMode mode, array<string> parts, array<string> replies)
|
||||
{
|
||||
string key = "stingerChanceOneIn";
|
||||
string effect = "Only eligible actors which have not rolled yet use this chance; no reroll, removal or replenishment of existing equipment.";
|
||||
string range = "0 off, 1 every eligible soldier, 2..10000 one in N";
|
||||
if (parts.Count() == 3 && parts[2] == "show")
|
||||
{ replies.Insert(key + "=" + mode.Settings().Get(key).ToString() + ". " + effect); return; }
|
||||
int value;
|
||||
if (parts.Count() == 4 && parts[2] == "set" && ERR_CommandArguments.Integer(parts[3], value) && mode.Settings().Set(key, value))
|
||||
replies.Insert(key + "=" + value.ToString() + " saved. " + effect);
|
||||
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);
|
||||
}
|
||||
override bool Execute(ERR_GameMode mode, string arguments, array<string> replies)
|
||||
{
|
||||
if (arguments.IndexOf("hq stinger ") == 0)
|
||||
{
|
||||
if (!m_HQ) { replies.Insert("HQ unavailable."); return true; }
|
||||
array<string> parts = {}; arguments.Split(" ", parts, true);
|
||||
StingerSetting(mode, parts, replies); return true;
|
||||
}
|
||||
if (arguments != "status" && arguments != "hq show" && arguments != "hq log" && arguments != "hq memory" && arguments != "hq convoy show" && arguments != "hq convoy start") return false;
|
||||
if (!m_HQ) { replies.Insert("HQ unavailable."); return true; }
|
||||
if (arguments == "hq convoy start")
|
||||
|
||||
Reference in New Issue
Block a user