LuaItemPrototype::get_module_effects(quality?)

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
SWeini
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Mon Apr 04, 2022 6:43 am
Contact:

LuaItemPrototype::get_module_effects(quality?)

Post by SWeini »

There is LuaItemPrototype::module_effects, but it is very difficult to properly calculate the effects of a module with given quality due to integer math and rounding going on. This problem got more serious with the addition of QualityPrototype::default_modifier. It's very difficult to reproduce the rounding behavior in Lua.

I'd like to see a method LuaItemPrototype::get_module_effects(quality?) that returns module_effects multiplied by the quality multiplier, with proper rounding.
Post Reply

Return to “Modding interface requests”