hi bob,
I am working on a mod where it is possible to get all the items/recipes etc out the game in a json, for vanilla it is all fine, but i noticed, when i added your mod that the hydrogen canister emtying has results, but its like this:
results = {
{
amount = 5,
name = "hydrogen",
type = "fluid"
} --[[table: 0x000000000e668400]],
{
"gas-canister",
1
} --[[table: 0x000000000e668460]]
} --[[table: 0x000000000e6683a0]],
It might probably still work(not playing with bobs atm) but for consistancy wouldnt it be better to have the second one also with the amout, name & type?
i can probably work around it, but I dont know if you did this on purpose, or that you have it good on other places as well?
if this is the case, just reply then ill build it so it can thanks
[0.14] inconsistancy
Moderator: bobingabout
Re: [0.14] inconsistancy
never mind, build the fix already
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: [0.14] inconsistancy
Oh right, I see were that is.
The first ingredient there, Hydrogen is a fluid and MUST be written in the full type/name/amount format. Gas canister is an item, and can be written in either full, or short mode.
Short mode is most commonly used by the base game, therefore a lot of my mod uses short form where available, and long where it isn't.
If something is run through my functions to add items though, the function will always add in full mode.
So yes, there is a bit of inconsistency there, but the inconsistencies you're pointing out in this specific case is exactly how the base game would handle it anyway.
Code: Select all
ingredients =
{
{type="fluid", name="hydrogen", amount=5},
{"gas-canister", 1},
},
Short mode is most commonly used by the base game, therefore a lot of my mod uses short form where available, and long where it isn't.
If something is run through my functions to add items though, the function will always add in full mode.
So yes, there is a bit of inconsistency there, but the inconsistencies you're pointing out in this specific case is exactly how the base game would handle it anyway.