Git Product home page Git Product logo

csl_rebalancedindustries's People

Contributors

quboid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

csl_rebalancedindustries's Issues

BUG - Reloading Saved Game

Every time I reload a saved game, the number of trucks available in "Large Crude Oil Tank Farm" drops by half (11 -> 5 -> 3 -> 2)!
The number of workers also decreases with each reload!
If I exit the game and start again, everything returns to normal.

Applying modifier OnLevelLoaded causes issue

I initially found that with this mod running, loading any save game repeatedly would cause farming extractors to have halved production rate and maintenance cost, while unique factories would have doubled material cost.

After a little bit of experimenting and looking at your code, I figured that every time OnLevelLoaded(), modifiers are applied to those industrial facilities, but those modified values doesn't get reverted upon OnLevelUnloaded(). I also suspect that the Building Manager doesn't clean up the m_building array upon OnLevelLoaded(), only overwriting elements in it when needed. This sometimes leads to the said issue even when loading two different save games. (Happened when I tested with a map that has like 3 buildings, not much of an issue I suppose.)

I have zero experience with C# or modding, but since you already have the ResetBuildingToVanilla(), calling it on every relevant industrial building object could have solved the issue perhaps?

Really appreciate your hard work on modding. ๐Ÿ’ฏ ๐Ÿ‘ Thank you for what you have brought to us gamers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.