Skip to content

Releases: pacoito123/LC_StoreRotationConfig

v2.5.1

10 Jan 03:54
fa8a4bd
Compare
Choose a tag to compare

[v2.5.1] Removed goofy TerminalFormatter compatibility, also recompiled for v69.

  • NOTE: TerminalFormatter v0.2.24 is currently incompatible; rotating item discounts aren't displayed (though they still apply), and any available items above the vanilla cap are not shown (but they can still be purchased).
    • Make sure to update to a newer version once available!

v2.5.0

04 Oct 02:41
2a1dcb0
Compare
Choose a tag to compare

[v2.5.0] Basic API added for managing rotating items, fixed rotating shop desync with 'removePurchased' setting.

  • Created RotationItemsAPI class, which contains several helper methods for interacting with which items can appear in store rotations.
    • Meant for other mods to use to allow items to appear in store rotations, or to simply add them to the list of permanent items.
  • Modified RotateShipDecorSelectionPatch and UnlockShipObjectPatches to use the new API.
  • Tweaked a few things with the config file.
    • Orphaned nodes (old entries) are now cleared when launching the game.
    • Configuration file no longer saves after every single Bind() call, which could very slightly impact loading performance.
    • Renamed stockPurchased setting to removePurchased, and inverted its function.
  • Fixed a desync that could happen with the removePurchased setting enabled when joining a lobby with already-purchased items, or items placed in storage.
    • Added transpiler for StartOfRound.SyncShipUnlockablesServerRpc() to actually fill the storedItems list before sending it to all clients.
      • When an item is put into storage, its PlaceableShipObject instance is despawned, but StartOfRound.SyncShipUnlockablesServerRpc() uses Object.FindObjectsOfType<PlaceableShipObject>() to fill the storedItems list, so it ends up always being empty.
    • Added postfix for SyncShipUnlockablesClientRpc() to update each of the ship unlockables' hasBeenUnlockedByPlayer and inStorage fields on all clients.
    • Ship purchases, as well as ship objects in storage, should now be properly synced upon joining a lobby.
    • This also fixes clients not being able to see items in storage when joining a lobby, though there's probably a better way to implement it.
  • Refactored patch for StartOfRound.UnlockShipObject() a bit.

v2.4.1

17 Aug 22:30
feaeb9a
Compare
Choose a tag to compare

[v2.4.1] Confirming compatibility with v61, but also a minor fix.

  • Everything seems to be working correctly in v61, but I'll keep an eye out if anything breaks in the latest updates.
  • Fixed relativeScroll setting being accidentally inverted in the previous release.

v2.4.0

13 Aug 23:55
f96b039
Compare
Choose a tag to compare

[v2.4.0] Basic API added for rotation sales, enabled 'Nullable' in the project file.

  • Created RotationSalesAPI class, which contains several helper methods for interacting with the rotation sales system.
    • Meant for other mods to use to check if an item is on sale, obtain its discount value and discounted price, add or remove discounts for specific items, among other things.
  • Modified TerminalItemSalesPatches and TerminalFormatterCompatibility to use the new API.
  • Enabled Nullable value types in the .csproj file so the compiler can yell at me if I forget a null check somewhere.
    • Should fix any current and (hopefully) future issues regarding null types (e.g. issue #3).
  • Added terminalFormatterCompat setting to toggle compatibility with TerminalFormatter.
    • This setting will be removed soon-ish, once compatibility is handled from their end.

v2.3.3

09 Aug 13:07
a20d3c8
Compare
Choose a tag to compare

[v2.3.3] Miscellaneous fixes for various issues.

  • Purchasing items now immediately removes from the permanent item list (NOT the config file's itemWhitelist itself) when stockPurchased is set to disabled.
  • Made saleChance determine sales likelihood more accurately now.
    • My original goal was to recreate how the vanilla game handles sales, only parameterized to allow for configuration; however, due to integer rounding, a sales chance of e.g. 85% and above could end up being exactly the same as 100%, depending on the maxSaleItems setting.
  • Fixed Terminal.TextPostProcess() transpiler occasionally replacing other items' displayed prices when appending a sale tag to a rotating item.
    • Also simplified it significantly by doing what was used for the TerminalFormatter compatibility transpiler.
  • Made minDiscount be used for maxDiscount when minDiscount is greater than maxDiscount, just like the other range settings.
  • Added a couple more null checks and debug messages.

v2.3.2

04 Aug 02:38
8c1b01d
Compare
Choose a tag to compare

[v2.3.2] Compatibility with TerminalFormatter's modified store, among other things.

  • Added TerminalFormatter as a soft dependency.
    • I think?
  • Sales for rotating items should now display with TerminalFormatter installed.
    • Added transpiler for Store.GetNodeText() to display discounted prices and amounts in the store page whenever an item is on sale.
    • Temporary fix until proper compatibility can be made.
  • relativeScroll now unpatches itself if TerminalFormatter is installed, since it already includes it.
  • Patching is done upon loading into the main menu for the first time.

v2.3.1

01 Aug 11:39
7fed1f6
Compare
Choose a tag to compare

[v2.3.1] Compatibility patch for Lategame Upgrades (and likely other moon-routing price adjustment mods).

  • Fixed compatibility with Lategame Upgrades' Efficient Engines upgrade.
    • Terminal.LoadNewNodeIfAffordable() transpiler no longer removes instructions or touches Terminal.totalCostOfItems when routing to a moon.
    • Changed priority of Terminal.LoadNewNodeIfAffordable() to High (600), so it's applied earlier.

v2.3.0

01 Aug 06:17
c6e1d74
Compare
Choose a tag to compare

[v2.3.0] Configurable item sales, whitelisting, and blacklisting.

  • Implemented configurable sales for items in the rotating shop.
    • Added postfix for Terminal.RotateShipDecorSelection() to assign rotating item sales after every quota.
    • Added transpiler for Terminal.TextPostProcess() to show discounts in the store page.
      • Compatibility patches might be needed for items that also modify the store page (e.g. TerminalFormatter); further testing is needed.
    • Added transpiler for Terminal.LoadNewNodeIfAffordable() to actually apply the rotating item discounts right before a purchase.
    • Configuration settings added:
      • saleChance determines the likelihood for ANY item to be on sale in every store rotation, with the value 0 disabling the entire sale system.
      • minSaleItems and maxSaleItems control the number of items that can be on sale at a time.
      • minDiscount and maxDiscount control the amount an item can be discounted by.
      • roundToNearestTen rounds sale amounts to the nearest ten (like the regular store).
  • Added both a whitelist and a blacklist for items available in the rotating shop.
    • itemWhitelist guarantees an item to be in stock every rotation, while itemBlacklist prevents them from ever showing up.
    • Both config settings are a comma-separated list of the exact item names shown in the terminal store page.
    • itemWhitelist will take priority over itemBlacklist, if an item is found in both lists.
    • itemWhitelist adds items separate from the range specified by the minItems and maxItems settings.
    • If an item name is not found, it will fail silently, but shouldn't cause any further issues.
  • Minor fixes for Terminal.RotateShipDecorSelection() patch.
    • maxItems value is now used instead of minItems when minItems is greater than maxItems, as intended.
    • Fixed items not sorting alphabetically with stockAll disabled.
    • Alphabetical sort now uses TerminalNode.creatureName (name displayed in the store page) instead of UnlockableItem.unlockableName.
  • Changed default value for relativeScroll to enabled.
  • Everything should still be compatible with every game version since v45.
  • Updated LICENSE name and year.

v2.2.1

16 Jul 07:40
93b4a3c
Compare
Choose a tag to compare

[v2.2.1] Compatibility with v56, previous game versions should still work.

  • Updated StartOfRound.SyncShipUnlockablesClientRpc() patch target reference to not include any parameters.
    • Additional parameter vehicleID was added in v55, and each parameter was previously declared explicitly in the patch (despite not actually using any).
  • Changed log level of plugin load message to Info.

v2.2.0

06 Jun 23:50
1ceb2df
Compare
Choose a tag to compare

[v2.2.0] Transpilers now used in place of some prefix patches, some minor refactoring.

  • Switched to using Transpilers for Terminal.RotateShipDecorSelection() and PlayerControllerB.ScrollMouse_performed() patches.
    • Should be much better for compatibility with any other mods that might potentially want to patch these methods as well.
    • From initial testing, everything seems to be working fine, but please let me know if any issues are encountered.
  • Changed maxItems and minItems to use their absolute values when rotating the store, to avoid any issues with negative numbers in the configuration file.
  • Modifying linesToScroll in-game (e.g. through LethalConfig) should now apply changes immediately, instead of until after scrolling on a different terminal page.
  • Updated minimum CSync library dependency to patch v5.0.1.
    • Previous release also works with v5.0.1, and is recommended.