[0.10.1] Game.itemprototypes naming

This subforum contains all the issues which we already resolved.
Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

[0.10.1] Game.itemprototypes naming

Post by Rahjital »

The prototype values of LuaItemPrototype in game.itemprototypes have different names from the values in prototype definition files.

Image
(Please be sure to view the entire image)

Stacksize and fuelvalue lack underscores (should be stack_size and fuel_value) while buildresult is named entirely differently (should be place_result).
slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [0.10.1] Game.itemprototypes naming

Post by slpwnd »

The naming (without underscores) is intentional. The standard lua naming across the api is without underscores. The lua prototype definition files use naming with underscores for historical reasons. I understand it can be annoying though.

The buildresult is renamed to placeresult for 0.10.3 to keep consistency.
Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: [0.10.1] Game.itemprototypes naming

Post by Rahjital »

Ah, that makes sense. The wiki is very misleading as it says the values are the same as in the prototype definiton files, but adding a little warning about the different naming system should resolve this issue.
Post Reply

Return to “Resolved Problems and Bugs”