Giter VIP home page Giter VIP logo

Comments (3)

Afforess avatar Afforess commented on June 12, 2024

Honestly I am not convinced of it's utility overall - given the correct solution is what you just posted above, and fairly concise already. I'm deprecating the Inventory module and will just remove the code later.

from factorio-stdlib.

Nexela avatar Nexela commented on June 12, 2024

When I put in the PR I deliberately avoided set_stack due to a factorio bug that will be fixed in .15

Also copy_inventory has its benifits copy_inventory may be the wrong name for it but the function is usefull

for i=1,#src do
dest[i].set_stack(src[i])
end
This has no slot checking and will error if #dest is < #src_inv
Also if there is something in dest[i] it will just overwrite

For that reason I propose inventory module stays and gets expanded :)

Also the meta .valid isn't needed in copy_inventory() as simple_item_stacks are unreferenced tables anyway

from factorio-stdlib.

Afforess avatar Afforess commented on June 12, 2024

I'll re-evaluate when 0.15 drops. For now, the plan is to remove the existing implementation for the 0.15 release and if you want to contribute a fresh Inventory module with new functions, I'm all for that. I'm just not sure that it's worth tangling with right now, unless you really really want to.

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.