[0.18.18] Correction to LuaEntity.train documentation

This subforum contains all the issues which we already resolved.
Post Reply
calcwizard
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sat Apr 20, 2019 6:30 am
Contact:

[0.18.18] Correction to LuaEntity.train documentation

Post by calcwizard »

LuaEntity.train reads:
The train this rolling stock belongs to or nil if not rolling stock.

Can only be used if this is RollingStock
The second line is incorrect, .train can be used on an entity that isn't a RollingStock, in which case it returns nil (as stated in the first line).

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.18.18] Correction to LuaEntity.train documentation

Post by posila »

Hmm, you are correct, but looking at it in the code, it seems to me like limitation of our documentation format. I don't want to remove $subclass(RollingStock) attribute, which would remove "Can only be used if this is RollingStock" line. But going through other places $subclass is used ... I guess I'll remove it.

Post Reply

Return to “Resolved Problems and Bugs”