A few small bugfixes.

This commit is contained in:
Anna Rose 2025-02-23 18:27:13 -05:00
parent 64a1a414a1
commit b1bea42c69
3 changed files with 10 additions and 5 deletions

View File

@ -86,6 +86,7 @@ namespace IngameScript
Mode = DockMode.Loading;
_outputSorter.Enabled = false;
_inputSorter.Enabled = true;
UpdateDisplay();
}
public void StartUnloading()
@ -94,6 +95,7 @@ namespace IngameScript
Mode = DockMode.Unloading;
_inputSorter.Enabled = false;
_outputSorter.Enabled = true;
UpdateDisplay();
}
public void Reset()
@ -102,6 +104,7 @@ namespace IngameScript
Mode = DockMode.Off;
_inputSorter.Enabled = false;
_outputSorter.Enabled = false;
UpdateDisplay();
}
public void AddBlock(IMyTerminalBlock block, MyIni ini)

View File

@ -54,10 +54,12 @@ namespace IngameScript
Console.Print($"Found {_docks.Count} docks to manage.");
Runtime.UpdateFrequency |= UpdateFrequency.Update100;
Console.UpdateTickCount();
}
public void Main(string argument, UpdateType updateSource)
{
Console.UpdateTickCount();
handleInput(argument);
// Check on loading state
@ -93,8 +95,8 @@ namespace IngameScript
return;
}
string command = _cli.Argument(0).Trim().ToLower();
string dockId = _cli.Argument(1).Trim().ToLower();
string dockId = _cli.Argument(0).Trim().ToLower();
string command = _cli.Argument(1).Trim().ToLower();
if (!_docks.ContainsKey(dockId))
{

View File

@ -58,17 +58,17 @@ namespace IngameScript
_builder.Append(": ");
if (Type.HasFlag(ResourceType.Ore))
{
_builder.Append(OreAmount);
_builder.Append(OreAmount.ToString("N0"));
_builder.Append(' ');
}
if (Type.HasFlag(ResourceType.Ingot))
{
_builder.Append(IngotAmount);
_builder.Append(IngotAmount.ToString("N0"));
_builder.Append(' ');
}
if (Type.HasFlag(ResourceType.Component))
{
_builder.Append(ComponentAmount);
_builder.Append(ComponentAmount.ToString("N0"));
_builder.Append(' ');
}
return _builder.ToString();