LuaEntity::productivity_bonus read

Post Reply
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 451
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

LuaEntity::productivity_bonus read

Post by raiguard »

Currently there is no way that I've found to simply retrieve a crafting machine's current productivity bonus. You can get the crafting speed, but the productivity bonus isn't included with that. Right now the only way to calculate it is to retrieve all of the beacons that are affecting the machine and combine the productivity that they're broadcasting.

The bonus is shown in the crafter's tooltip so the game already calculates it, it's just a matter of exposing it to the API.

Thanks!
Don't forget, you're here forever.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaEntity::productivity_bonus read

Post by Rseding91 »

Ok.
If you want to get ahold of me I'm almost always on Discord.

User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 451
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: LuaEntity::productivity_bonus read

Post by raiguard »

Sweet! Thank you!
Don't forget, you're here forever.

Post Reply

Return to “Implemented mod requests”