Giter VIP home page Giter VIP logo

Comments (7)

Nexela avatar Nexela commented on July 26, 2024

Third the events look like they are using the name and not the type. if that is the case this wouldn't work for mod added trains.

from factorio-stdlib.

Afforess avatar Afforess commented on July 26, 2024

@Nexela I moved the train registry to global and updated the events to filter on the locomotive type rather than diesel-locomotive entity name.

I think a bit more robust logic for surfaces is needed beyond what you've proposed, as surfaces could be created (or destroyed) mid-game. I need to look into this further.

However at a minimum, the critical issues should be resolved, if you want to test with the latest codebase.

from factorio-stdlib.

Nexela avatar Nexela commented on July 26, 2024

I wouldn't spend too much time on this until .15
It has recently been confirmed base game will have more train related events
https://forums.factorio.com/viewtopic.php?f=28&t=44280&p=255850&hilit=train+event#p255850

from factorio-stdlib.

Nexela avatar Nexela commented on July 26, 2024

I think a bit more robust logic for surfaces is needed beyond what you've proposed, as surfaces could be created (or destroyed) mid-game. I need to look into this further.

That part is fine, factorio handles cleanup as long as .valid is checked before doing anything. The train will cease to exists if the surface does. Of course storing per surface would also add the overhead that now you might as well store per force, and open up a whole nother can of worms.

from factorio-stdlib.

Nexela avatar Nexela commented on July 26, 2024

global._registry seems too ambiguous As no other modules seem to use this global._trains would be a better choice

from factorio-stdlib.

Afforess avatar Afforess commented on July 26, 2024

@Nexela Fair point about the naming.

from factorio-stdlib.

Afforess avatar Afforess commented on July 26, 2024

I updated stdlib to register trains on any surfaces. I think that covers everything you've raised - if you find more, open another issue.

from factorio-stdlib.

Related Issues (20)

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.