Search found 3 matches

by dehook
Tue May 23, 2017 11:30 pm
Forum: Resolved Problems and Bugs
Topic: [0.15] [Rseding91] LuaEntity:neighbours on underground belt returns {} not nil
Replies: 19
Views: 7844

Re: [0.15] [Rseding91] LuaEntity:neighbours on underground belt returns {} not nil

I find that returning nil is generally far easier to work with, The savings comes in something like this from an effected mod: for _, neighbour in pairs(entity.neighbours) do... If entity.neighbours is an empty collection, then the for loop just doesn't do anything with no check for nil or empty re...
by dehook
Tue May 23, 2017 7:31 pm
Forum: Resolved Problems and Bugs
Topic: [0.15] [Rseding91] LuaEntity:neighbours on underground belt returns {} not nil
Replies: 19
Views: 7844

Re: [0.15] [Rseding91] LuaEntity:neighbours on underground belt returns {} not nil

Regardless of what the docs say, returning an empty collection generally allows for more concise client code than returning nil. This change has also broken at least two mods that used that more concise style.
by dehook
Sun Jan 15, 2017 2:04 pm
Forum: News
Topic: Friday Facts #173 - Nuclear stuff is almost done
Replies: 192
Views: 79775

Re: Friday Facts #173 - Nuclear stuff is almost done

The percentage of 235U versus 238U should be configurable. On earth, they were originally equally abundant, but 235U has a shorter half life. The 0.7% point is just where the earth is now, and as such is an unlikely point for an alien planet unless it is exactly the same age as earth.

Go to advanced search