Page 1 of 1

API typo: "their being" and more

Posted: Mon Jun 04, 2018 6:06 pm
by Roy
I found a small typo in the api:
LuaPlayer.get_associated_characters
Note: The array will always be empty when the player is disconnected (see LuaPlayer::connected) regardless of their being associated characters.
their => there

There are also some more typos that I mentioned in an earlier topic, but that one seems to be stuck in pending:
viewtopic.php?f=29&t=53923#p333543
Roy wrote:
Rseding91 wrote:These should be fixed in 0.16. Can you confirm?
Sorry for the late reply, I apparently forgot to turn on the notifications.

I've gone through the whole api again, and all the old mistakes seem to be fixed. But I did find a few more:

InfinityFilter
item :: string: Name of the item.
item => name (tested in-game with set_infinity_filter, and item doesn't work, but name does)

LuaEntityPrototype.construction_radius
The constrution radius for this roboport prototype or nil.
constrution => construction

LuaItemPrototype.resistances
Resistances of this armour item; nil if not an armor or or the armor has no resistances.
or or => or

LuaForce.max_successful_attemps_per_tick_per_construction_queue
max_successful_attemps_per_tick_per_construction_queue :: uint [Read-Write]
attemps => attempts (this is also incorrect in the game, so this will be a breaking change)

LuaSurface.can_fast_replace
If there exists an entity at the given location that can be fast-replaced with the the given entity parameters.
the the => the

script_raised_built
This is event is only raised if a mod uses in with script.raise_event(). Nothing passed with this event is validated and it is up to mod authors to to check for the existence of and validity of anything passed with it.
to to => to
Also the first part makes no sense, I think it's meant to say: "This event is only raised if a mod uses it with script.raise_event()."?

script_raised_destroy
This is event is only raised if a mod uses in with script.raise_event(). Nothing passed with this event is validated and it is up to mod authors to to check for the existence of and validity of anything passed with it.
to to => to
Also the first part makes no sense, I think it's meant to say: "This event is only raised if a mod uses it with script.raise_event()."?

script_raised_revive
This is event is only raised if a mod uses in with script.raise_event(). Nothing passed with this event is validated and it is up to mod authors to to check for the existence of and validity of anything passed with it.
to to => to
Also the first part makes no sense, I think it's meant to say: "This event is only raised if a mod uses it with script.raise_event()."?

LuaEntity.to_be_deconstructed
force :: string or LuaForce: The force which ordered the deconstruction. This parameter is is currently unused; it exists only for forward compatibility of the API.
is is => is

LuaEntity.active
Note: Entities that are are not active naturally can't be set to be active (setting it to be active will do nothing)
are are => are

And lastly, there are a bunch of places where color is written as colour. This isn't really incorrect, but it would be better to be consistent:
LuaPlayer.color
Color
LuaControlBehavior
LuaEntity.connect_neighbour
LuaEntity.disconnect_neighbour
LuaEntity.get_circuit_network
The same goes for centre/center.
Concepts.html#Command
destination :: Position: Centre of the attack area.
Centre => Center

EDIT: clarified a few things about centre, and removed deconstructible.

Re: API typo: "their being" and more

Posted: Mon Jun 04, 2018 6:29 pm
by eradicator
"Centre" is british english, which is the preferred form of english in factorio.
"Deconstructible" is also not wrong.

Re: API typo: "their being" and more

Posted: Mon Jun 04, 2018 6:41 pm
by Roy
eradicator wrote:"Centre" is british english, which is the preferred form of english in factorio.
"Deconstructible" is also not wrong.
The "centre" is more about consistency, it's only used once in the whole API, while "center" is used a lot.

"deconstructible" seems to be an alternative spelling to "deconstructable" (although my spellchecker doesn't agree with that). I had already decided to ignore that, and removed it from the previous topic, but forgot to edit the quote on this topic.

Re: API typo: "their being" and more

Posted: Mon Jun 04, 2018 7:05 pm
by eradicator
Roy wrote:"deconstructible" seems to be an alternative spelling to "deconstructable" (although my spellchecker doesn't agree with that).
My dictionary doen't have it either. But i don't trust random dictionaries too far :P.

I suspect the whole AE/BE mismash depends on which of the devs wrote the respective part. Certain devs are native AE, other's are second-language BE. I like consistency ofc ;).

Re: API typo: "their being" and more

Posted: Mon Jun 04, 2018 7:07 pm
by posila
Thanks for the report.
Fixed for next release.