why? cause it doesn`t there,which make know current inserter capacity with this value really hard.
discussion from here:
viewtopic.php?f=25&p=555924
LuaEntityPrototype.stack_size_bonus :: uint32
Re: LuaEntityPrototype.stack_size_bonus :: uint32
What's hard about
?
Code: Select all
local prototype = (inserter.type == 'entity-ghost'
and inserter.ghost_prototype or inserter.prototype)
local stack_size = inserter.inserter_stack_size_override
if stack_size == 0 then
local force = inserter.force
if prototype.stack then
stack_size = 1 + force.stack_inserter_capacity_bonus
else
stack_size = 1 + force.inserter_stack_size_bonus
end
end
Re: LuaEntityPrototype.stack_size_bonus :: uint32
EntityPrototype.stack_size_bonus was added in 1.1, but it is not readable in control.lua.
Re: LuaEntityPrototype.stack_size_bonus :: uint32
That makes a lot more sense.
Re: LuaEntityPrototype.stack_size_bonus :: uint32
Looks like this is implemented in 1.1.47.
I think the description could do with some work though...
I think the description could do with some work though...
This sounds dependent on the current applicable inserter capacity bonus, but I would expect it to match:https://lua-api.factorio.com/1.1.47/LuaEntityPrototype.html#LuaEntityPrototype.inserter_stack_size_bonus wrote: Gets the current stack size bonus of this entity, returns nil if not an inserter.
https://wiki.factorio.com/Prototype/Inserter#stack_size_bonus wrote: Stack size bonus that is inherent to the prototype without having to be researched.
Re: LuaEntityPrototype.stack_size_bonus :: uint32
Description was fixed in the docs, so I am moving this to implemented.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.