Skip to content

Commit

Permalink
Release 1.4.0 - Customize warper demand (#15)
Browse files Browse the repository at this point in the history
* Add config option for warper demand

* Release 1.4.0

Co-authored-by: Pascal Ludwig <[email protected]>
  • Loading branch information
DanielHeEGG and Pasukaru authored Jan 29, 2022
1 parent 9d66489 commit e5fd15d
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 5 deletions.
8 changes: 8 additions & 0 deletions AutoStationConfig/AspConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public static class ILS

public static ConfigEntry<double> MinWarpDistance;
public static ConfigEntry<bool> WarperInLastItemSlot;
public static ConfigEntry<int> WarperDemand;
public static ConfigEntry<ELogisticStorage> WarperLocalMode;
public static ConfigEntry<ELogisticStorage> WarperRemoteMode;

Expand Down Expand Up @@ -182,6 +183,13 @@ internal static void Init(ConfigFile config)
ILS.WarperInLastItemSlot = config.Bind(ILS_SECTION, "Add Warpers in last Slot", true,
"If true, the last item slot will automatically select Space Warpers"
);

ILS.WarperDemand = config.Bind(ILS_SECTION, "Warper Demand", 1, new ConfigDescription(
"Amount of warpers to request, divided by 100. Ex: Set demand to 500 warpers in ILS, 500/100 = 5",
new AcceptableValueRange<int>(1, 100),
new { }
)
);

ILS.WarperLocalMode = config.Bind(ILS_SECTION, "Warper Local Mode", ELogisticStorage.Demand,
"Local logistics mode of the Warpers when \"Add Warpers in last Slot\" is true"
Expand Down
2 changes: 1 addition & 1 deletion AutoStationConfig/AutoStationConfigPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Pasukaru.DSP.AutoStationConfig
{
[BepInPlugin("pasukaru.dsp.AutoStationConfig", "AutoStationConfig", "1.3.4")]
[BepInPlugin("pasukaru.dsp.AutoStationConfig", "AutoStationConfig", "1.4.0")]
[BepInProcess("DSPGAME.exe")]
public class AutoStationConfigPlugin : BaseUnityPlugin
{
Expand Down
2 changes: 1 addition & 1 deletion AutoStationConfig/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ PlanetTransport planetTransport
component.id,
component.storage.Length - 1,
ItemIds.Warper,
100,
AspConfig.ILS.WarperDemand.Value * 100,
AspConfig.ILS.WarperLocalMode.Value,
AspConfig.ILS.WarperRemoteMode.Value,
GameMain.mainPlayer
Expand Down
4 changes: 2 additions & 2 deletions AutoStationConfig/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.4")]
[assembly: AssemblyFileVersion("1.3.4")]
[assembly: AssemblyVersion("1.4.0")]
[assembly: AssemblyFileVersion("1.4.0")]
Binary file modified AutoStationConfig/Release/AutoStationConfig.zip
Binary file not shown.
7 changes: 7 additions & 0 deletions AutoStationConfig/Release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ The available settings will then appear in the r2modman Config Editor (look for

## Changelog

### 1.4.0
Added configuration option for the amount of warpers requested. Previously was hardcoded to 100.
The default value for this config option is still 100, so change it manually if you want something else.
Only applies to newly placed stations. Existing stations will not have their warper requests changed.

Thanks to [DanielHeEGG](https://github.com/DanielHeEGG) for the PR!

### 1.3.4
The mod now automatically checks all ILS after loading a save and fixes the duplicate warper config glitch.
See [github ticket #12](https://github.com/Pasukaru/DSP-Mods/issues/12) for details.
Expand Down
2 changes: 1 addition & 1 deletion AutoStationConfig/Release/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "AutoStationConfig",
"version_number": "1.3.4",
"version_number": "1.4.0",
"website_url": "https://github.com/Pasukaru/DSP-Mods/tree/main/AutoStationConfig",
"description": "Automatically configures ILS when placed.",
"dependencies": [
Expand Down

0 comments on commit e5fd15d

Please sign in to comment.