Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,12 @@ This mod tries to give a lot of configuration and control to the user to customi
### Language
This setting determines what language package the mod uses. Upon starting up, the mod will look for the file named `lang-CODE`, where `CODE` is the value of this parameter. This allows anyone to create their own language pack.

## Chute
### Store Permission
This setting determines who can store items into the chute. This is on top of the base item check. For example, if the setting is set to `CLIENTS_ONLY`, only clients will be able to store items in the chute.

If a player tries to store an item while not having the required permission, a special message will appear to notify them that they can't store items.

### Only In Orbit
This setting determines when the chute can store items. If the setting is set to `true`, no one will be able to store items inside the chute while the ship is on a planet. The chute will be enabled again once the ship is back in orbit.

If a player tries to store an item while the ship is not in orbit, a special message will appear to notify them that they can't store items.

### Time to Store
This setting determines how long a player has to hold the `interact` button in order to store an item. If players usually store items in bulk, the setting can be set to a lower value, allowing them to store items faster.

### Time to Retrieve
This setting determines how fast each item takes to be retrieved. If players usually retrieve items in bulk, the setting can be set to a lower value, allowing the process to be done way faster.

### Max Chute Capacity
This setting determines how many items can be in the chute itself at once before pausing the retrieve process. For example, if the setting is set to `5` but a player retrieves 20 items, the chute will pause after retrieving 5 items.

### Blacklist
This setting determines which items are not allowed to be stored in the chute. The mod already blocks certain items due to not working with the system, but players can also block certain items that they don't want to allow.

Expand All @@ -72,23 +58,14 @@ Here are the different things you should know about it:
If a player tries to store an item that is blacklisted, a special message will appear to notify them that this item is not valid.

## Inventory
### Retrieve Permission
This setting determines who can retrieve items from the inventory. For example, if the setting is set to `CLIENTS_ONLY`, only clients will be able to retrieve items from the inventory. The host itself will not be able to retrieve items.

### Safe Once Stored
This setting determines if the inventory is cleared when all players die. This is useful if you want to use this mod as a safe, allowing you to keep some items in order to recover better from the loss.

### Persist through fire
This setting determines if the inventory is cleared when the crew gets fired. This is useful if you want to have an advantage when restarting a run, removing some of the grinding by allowing you to keep some items.

### Maximum Item Count
This setting determines how many items can be stored in the inventory. For example, if the setting is set to `20`, players will only be able to store 20 items in the inventory before needing to retrieve some items to free up space.

If a player tries to store an item while the inventory is full, a special message will appear to notify them that the inventory is already full.

### Keep Rate
This setting determines how likely each item is to be kept when the inventory is cleared. For example, if the setting is set to `50`, each item has a 50% chance to be kept or to be cleared.

## Terminal
### Inventory Command
This setting determines the command to type in order to access the inventory. Commands are something exclusive, so you might need to change the command to something else in order to be able to type it.
Expand All @@ -105,26 +82,12 @@ This setting determines if the inventory shows the trademark in the terminal. Ev
### Sort Order
This setting determines in which order the items are shown in the inventory. For example, if the setting is set to `VALUE_DESC`, the most valuable items are going to be on the first pages while the least valuable items will be at the end.

### Allow Retrieve All
This setting determines if the `retrieve all` option is shown for every player. This is useful to stop players from simply dumping every item possible, with no way to stop them. While it's still possible to retrieve items in bulk, it's slower than using the `retrieve all` option.

## Network
### Refresh Rate
This setting determines how often clients will update their copy of the inventory.

This was implemented due to past problems with desync between clients. However, this comes at a cost of an higher WIFI cost, sending a small request every time (the cost is actually very small, almost negligible).

### Update Silencer
This setting determines if the mod logs each update in the console. The logs can be useful for developers to debug the mod.

*If you decide to remove this, you are on your own for any desync problem*

### Force when Storing
This setting determines if the client forces to update itself when the player stores an item.

### Force when Retrieving
This setting determines if the client forces to update itself when the player retrieves an item.

## Unlock
### Is Unlockable
This setting determines if the chute is an unlockable upgrade. If you enter a lobby with the setting set to `false`, the chute will be permanently unlocked for this save.
Expand Down
7 changes: 6 additions & 1 deletion src/ShipInventoryUpdated/Configurations/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@ internal class Configuration

private Configuration(ConfigFile cfg)
{
Mod = new ModConfig(cfg);

var languageCode = Mod.Language.Value;
var language = Helpers.Localization.LoadLanguage(languageCode);
Helpers.Localization.SetAsDefault(language);

Chute = new ChuteConfig(cfg);
Unlock = new UnlockConfig(cfg);
Terminal = new TerminalConfig(cfg);
Inventory = new InventoryConfig(cfg);
Mod = new ModConfig(cfg);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/ShipInventoryUpdated/Configurations/ModConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public ModConfig(ConfigFile cfg)
Language = cfg.Bind(
new ConfigDefinition(SECTION, "Language"),
"en",
new ConfigDescription(Localization.Get("configuration.mod.language.description"))
new ConfigDescription("Determines the language package to use.")
);
}
}
2 changes: 1 addition & 1 deletion src/ShipInventoryUpdated/Configurations/UnlockConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public UnlockConfig(ConfigFile cfg)

IsChuteUnlocked = cfg.Bind(
new ConfigDefinition(SECTION, "ChuteIsUnlock"),
true,
false,
new ConfigDescription(Localization.Get("configuration.unlock.isUnlockable.description"))
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private static void ApplyModConfiguration(ModConfig config)
config.Language,
new TextInputFieldOptions
{
Name = Localization.Get("configuration.mod.language.name"),
Name = "Language",
NumberOfLines = 1,
CharacterLimit = 16,
TrimText = true,
Expand Down
6 changes: 0 additions & 6 deletions src/ShipInventoryUpdated/Resources/Localization/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@
"description": "Determines the speed in seconds at which a player can retrieve items."
}
},
"mod": {
"language": {
"name": "Language",
"description": "Determines the language package to use."
}
},
"unlock": {
"unlockName": {
"name": "Unlock Name",
Expand Down
4 changes: 0 additions & 4 deletions src/ShipInventoryUpdated/ShipInventoryUpdated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ private void Awake()

Configuration.Load(Config);

var languageCode = Configuration.Instance?.Mod.Language.Value ?? "en";
var language = Helpers.Localization.LoadLanguage(languageCode);
Helpers.Localization.SetAsDefault(language);

Helpers.Dependencies.LoadDependencies(Configuration.Instance);
Patch();

Expand Down