susanw1 / Factorio-Inventory-Trim

A mod for Factorio that automatically frees inventory slots by removing insignificant excess quantities
MIT License
1 stars 0 forks source link

FATAL: `character_personal_logistic_requests_enabled` non-existent #32

Closed susanw1 closed 5 days ago

susanw1 commented 1 week ago

Error trace:

Error while running event Inventory-Trim::on_nth_tick(613) LuaPlayer doesn't contain key character_personal_logistic_requests_enabled. stack traceback: [C]: in function 'index' Inventory-Trim__/control.lua:304: in function 'process_player' Inventory-Trim/control.lua:383: in function 'check_monitored_players' Inventory-Trim/control.lua:410: in function <Inventory-Trim/control.lua:409>

Ouch - whole thing is new: we have multiple LuaLogisticPoints with multiple Sections.

susanw1 commented 5 days ago

Rewrote the find_player_logistic_requests function to accommodate new logistic rules.

Allegedly, logistic requests can only ever relate to a single "quality", so we don't need to cope with "quality > Rare" etc. Defer "quality" to another task. Added FIXMEs wherever it looked appropriate.

susanw1 commented 5 days ago

And, game.item_prototypes[item_name] has become prototypes.item[item_name].

susanw1 commented 5 days ago

And, item.subgroup.name == "intermediate-product" or item.subgroup.name == "raw-material" has become: item.group.name == "intermediate-products" or item.subgroup.name == "raw-resource"

(was that ever right? )

(Update: ah, the copper wire was item.group.name == "intermediate-products", item.subgroup.name == "intermediate-product" )