Weight is being modified without code to do so

Bugs that are actually features.
dakotazinn
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Mar 07, 2019 6:40 pm
Contact:

Weight is being modified without code to do so

Post by dakotazinn »

In the mod Productivity Fix (https://mods.factorio.com/mod/productiv ... 9e094cc937), beacons and the recycler are modified to allow productivity modules.
Somehow, this has an unintended side-effect of also modifying the weight of certain entities.
Specifically: Inserters, Long Handed Inserters, Fast Inserters, Burner Inserters.

There is no code that exists in the mod that modifies weight values.
Attachments
Untitled.png
Untitled.png (325.58 KiB) Viewed 211 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4245
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Weight is being modified without code to do so

Post by boskid »

https://lua-api.factorio.com/2.0.69/aux ... eight.html
https://lua-api.factorio.com/2.0.69/auxiliary/item-weight.html wrote:Following this, if a recipe doesn't support productivity, its simple result is determined as rocket_lift_weight / stack_size (see rocket_lift_weight and stack_size). If this simple result is larger than or equal to the intermediate result, it becomes the item's weight.

Otherwise, the game determines the amount of stacks that would result from the intermediate result as rocket_lift_weight / intermediate_result / stack_size. If this amount is less than or equal to 1, the intermediate result becomes the item's weight. Else, the item's weight is set to rocket_lift_weight / floor(stack_amount) / stack_size.
Post Reply

Return to “Not a bug”