[0.15.1] LuaFluidbox.get_capacity() indices off by 1

This subforum contains all the issues which we already resolved.
Post Reply
MagmaMcFry
Inserter
Inserter
Posts: 37
Joined: Sun Jul 17, 2016 9:05 pm
Contact:

[0.15.1] LuaFluidbox.get_capacity() indices off by 1

Post by MagmaMcFry »

entity.fluidbox.get_capacity(i) and entity.fluidbox.get_connections(i) returns the capacity/connections of the (i+1)st fluid box

Example: To get the contents of a boiler's fluidboxes, you use boiler.fluidbox[1] and boiler.fluidbox[2]. To get their capacities, currently you need to use boiler.fluidbox.get_capacity(0) and boiler.fluidbox.get_capacity(1).

I'll assume this is a bug and not that you've suddenly switched to 0-based indexing.
I don't visit the forum very often. If you want to contact me, message me on the mod portal for Factorissimo-related things, or on Discord.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.1] LuaFluidbox.get_capacity() indices off by 1

Post by Rseding91 »

Thanks for the report. Fixed for 0.15 :)
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”