Giter Site home page Giter Site logo

jamienyanchi / pollution-combinator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zackgomez/pollution-combinator

0.0 0.0 0.0 259 KB

Factorio mod that adds a combinator that outputs the amount of pollution in the chunk where it is placed as a circuit network signal.

Home Page: https://mods.factorio.com/mod/PollutionCombinator-JamieFork

License: MIT License

Lua 100.00%

pollution-combinator's Introduction

Pollution Combinator (Jamie's Fork)

This is a forked and updated version of starruler's Pollution Combinator mod. It adds a new, simple combinator that outputs the amount of pollution in the chunk where it is placed as a new pollution signal.

Changes from original

  • Performance Improvements: Pollution combinators now update every 180 game ticks (3 seconds) instead of every single game tick, and the update is distributed over multiple ticks instead of all on a single tick. The code is also more optimized to avoid unnecessary API calls when possible, further improving performance.
  • New Settings: Two new settings were added to allow the user to control how often the combinators should update. If you want the combinators to update as frequently as the original mod, you can change the update rate to every 1 tick in the settings.
  • New Appearance: Thanks to S6X's kind contribution, the pollution combinators have now been recolored purple to differentiate them from other combinators.
  • Picker Dollies Support: Full support has been added for the Picker Dollies mod. When you move the combinators around with that mod, they will now update to output the pollution amount of their new position.
  • Other Minor Fixes: Includes various small fixes such as listening to more build/destroy events to ensure all placed combinators work as expected.

Migration

If you are switching from the original mod to this version, then everything will transfer over and work perfectly fine. There's no extra steps necessary. All your existing combinators and circuit networks will continue working.

Important: This mod is not compatible with the original mod. If you enable this mod, you must disable the original. Please note that due to some changes, such as renaming the pollution signal's internal name, it will not be possible to seamlessly go back to the original if you save with this mod active. If you only wish to try out this mod and not commit to switching, please make a copy of your existing save first.

Performance notes

I did not conduct any full, proper performance tests. However, when playing on default settings and with 400 pollution combinators placed, I have a 95% performance impact reduction compared to the original mod. Even when updating on every tick like the original mod, I have a 30% performance impact reduction compared to the original mod. If you need further performance impact reductions, use the settings to update the combinators even less frequently than the default.

Future

There is still some room for potential further performance improvements. However, the current changes should still be great for most players! If you'd like to contribute to help improve the mod further, feel free to check the Github and submit a pull request!

pollution-combinator's People

Contributors

zackgomez avatar jamienyanchi avatar

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.