Toolbars


If the Quickbar is not enough, create toolbars that can hold items and tools and be positioned anywhere you like.

Utilities
11 days ago
1.1 - 2.0
7.73K

b [Factorio] Crash when entering Aircraft (Aircraft-space-age mod)

I like using your mod but it conflicts with Aircraft-space-age ( 2.3.4, by MeteorSwarm ) when entering a craft ( jet ) receiving a non-recoverable error ( multiple errors )..

Would you be willing to add compatibility:


Error while running event toolbars-mod::on_nth_tick(1)
'inventory index': real number expected got nil.
stack traceback:
[C]: in function 'get_inventory'
.../src/player/inventory/personal/VehicleTrashInventory.lua:83: in function 'inventory'
.../src/player/inventory/personal/VehicleTrashInventory.lua:46: in function 'freshContent'
.../src/player/inventory/personal/VehicleTrashInventory.lua:40: in function 'forceRefresh'
.../src/player/inventory/personal/VehicleTrashInventory.lua:32: in function 'refresh'
toolbars-mod/src/player/inventory/ViewInventory.lua:59: in function 'refreshMains'
toolbars-mod/src/player/inventory/ViewInventory.lua:40: in function 'refresh'
toolbars-mod/control/general.lua:14: in function <toolbars-mod/control/general.lua:7>


I guess its because the aircraft ( flying-fortress, jet, cargo-plane and gunship ) aren't apart of the vehicles list in toolbars which results in receiving nil-ch, I attempted a fix but it failed, I failed, failure.

best regards.

6 days ago

I will fix it.

5 days ago
(updated 5 days ago)

thanks.

5 days ago
(updated 5 days ago)

I cannot reproduce it. I can enter any type of a plane and it works fine. There are no errors and toolbars show count of items properly. It looks like in your case defines.inventory.car_trash is nil, which is very strange because it's defined by the game and it should never be nil.

Please give me more details. Think what can be different in your setup than the standard one: operating system, version of Factorio, other mods, etc.

Till we find the cause and I fix it you can turn off "Show vehicle inventories content" in mod settings to mitigate the issue.

5 days ago
(updated 5 days ago)

I tried disabling "Show vehicle inventories content" but got the same error.


[temp-fix]:
As a workaround I traced and changed (disabled) a line inside "..\control\general.lua" which now restores the core functionality of your mod alongside Aircraft, just without the item amounts updating but they are visible I have the usable icons.

Added -- to: "player:viewInventory():refresh()".


I just don't have the knowledge to debug the core of the issue, willing to help but just don't know how. OS is outdated win10, using sable SA Factorio, other mods disabled before submitting original request.

Thanks.

5 days ago

Are you sure you are using factorio version equal or greater than 2.0.29? This constant was added in it.

5 days ago
(updated 5 days ago)

v2.0.72. I've reinstalled Factorio, the three mods Toolbars, Aircraft-Space-Age and its dependency Flib-0.16.5 and started a new save and now I'm getting the same as you, its working fine including items refreshing without "Show vehicle inventories content" disabled. So problems' Resolved! --user error!

Cheers for the support!

4 days ago

Good too hear :)

New response