EarendelDevelopers / factorio-mods

This is a public repository for tracking issues with Earendel's factorio mods.
19 stars 3 forks source link

Cargo Rocket Reusability throwing away "unused" sections on empty rocket #246

Closed Bird-31 closed 1 year ago

Bird-31 commented 1 year ago

Hi, First off, love the mod. Please continue your great work!

I noticed something weird with my cargo rocket cargo section reusability and I'm trying to figure out how its supposed to work. I noticed on the mod changelog page updated 0.6.28 (also similar on the in game informatron):

- Cargo rockets no only use some % of parts and fuel if part of the cargo space us unsed. Costs scale up from 50% cost if 0 cargo slots are used.

That sounds like it means empty cargo rockets cost half as much to launch. Meaning that if my normal reusability modifier is 72%, I should either get back 72 sections, or maybe 50+72.5=86 sections. Instead I seem to be getting back ~40 sections

It seems like line 1158 in the launchpad.lua file is returning me cargo sections at the minimum of sections used and sections usedreusability. It seems like instead I also need to get back the unused sections. Perhaps:

local reusable_parts = math.floor(math.min(sections_used, sections_used * reusability * ( 0.9 + 0.2 * math.random()))) + rocket_sections

Thanks,

-Bird

BurninSun commented 1 year ago

Did you check the rocket silo for sections that were unused? If your rocket is empty, you may get 40 back in the landing pad, but still have 50 in the rocket silo because they weren't needed to launch in the first place.

Bird-31 commented 1 year ago

Yes, that is where they are going. Thank you.