[0.16.15] Modded Items Not Removed From Rockets In-Flight

This subforum contains all the issues which we already resolved.
Post Reply
can00336
Inserter
Inserter
Posts: 28
Joined: Sun Dec 11, 2016 9:39 pm
Contact:

[0.16.15] Modded Items Not Removed From Rockets In-Flight

Post by can00336 »

It seems that once a mod is removed from a save that has modded rocket_launch_products that the rockets in-flight do not have their modded items removed and thus cause a crash.
Quickly destroying the rockets in-flight via command before they can trigger the on_rocket_launched event prevents the crash from ever occuring.
modded_rocket_error.jpg
modded_rocket_error.jpg (36.88 KiB) Viewed 3059 times
Edit: I forgot to mention that the modded rocket_launch_products were also added to the tracked_items via add_tracked_item at an earlier point in time.
Last edited by can00336 on Tue Jan 09, 2018 8:08 pm, edited 1 time in total.

Loewchen
Global Moderator
Global Moderator
Posts: 8308
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [0.16.15] Modded Items Not Removed From Rockets In-Flight

Post by Loewchen »

Post save and mod where this can be observed please.

can00336
Inserter
Inserter
Posts: 28
Joined: Sun Dec 11, 2016 9:39 pm
Contact:

Re: [0.16.15] Modded Items Not Removed From Rockets In-Flight

Post by can00336 »

Neither the save nor the mod are publicly available for various reasons as the save is Xterminator's Sending Supporters to Space series save and the mod contains thousands of people's real names.
If the devs really need the mod and/or save for some reason, they can DM me or Xterminator for them.

can00336
Inserter
Inserter
Posts: 28
Joined: Sun Dec 11, 2016 9:39 pm
Contact:

Re: [0.16.15] Modded Items Not Removed From Rockets In-Flight

Post by can00336 »

The following change to \data\core\lualib\silo-script.lua seems sufficient to fix the bug:

Code: Select all

*** 137,143 ****
    local force = rocket.force
    local any_tracked = false
    for k, tracked_item in pairs (global.silo_script.tracked_items) do
!     if rocket.get_item_count(tracked_item) > 0 then
        any_tracked = true
        break
      end
--- 137,143 ----
    local force = rocket.force
    local any_tracked = false
    for k, tracked_item in pairs (global.silo_script.tracked_items) do
!     if tracked_item.valid and rocket.get_item_count(tracked_item) > 0 then
        any_tracked = true
        break
      end

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.16.15] Modded Items Not Removed From Rockets In-Flight

Post by Klonan »

Thanks for the report,

This is fixed for the next release

Post Reply

Return to “Resolved Problems and Bugs”