mattsemar / dsp-personal-logistics

MIT License
10 stars 7 forks source link

Issue with automatic refueling #25

Closed nirahiel closed 2 years ago

nirahiel commented 2 years ago

So here's the thing. I have 6+ stacks of graphite in my inventory, and my mecha is fueled by 4 stacks of it. I also have 5 stray coal pieces, and I decide I want to burn them, so I swap the last slot of my mecha's fuel chamber for these few pieces of coal, and put the stack of graphite in my inventory. A few seconds later, the mod simply deleted all the graphite in my inventory. The 3 stacks left in my mecha are still there.

EDIT : Looks like it deleted all other types of fuel as well ... Tsk. i'm disabling auto refuel for now.

mattsemar commented 2 years ago

I definitely changed this code when I was adding support for sprayed items. I'll check it out

nirahiel commented 2 years ago

Thanks !

mattsemar commented 2 years ago

The fix should be out there now. I've been using sprayed AM rods so I didn't notice it because they burn so slow.

But geez, great bug report, thank you very much. I can't believe I let it past.

To make up for it, what do you think about a button that would players turn on a mode where the next logistics vessel worth of fuel items (for each type) is free?

nirahiel commented 2 years ago

What do you mean, make up for it ? Also free vessel worth of fuel ? I don't get it.

While we're talking about logistics, i have a few questions. Mostly, what happens when things are removed from my inventory (because recycling them manually, they exceed my quota, or I drop them on the ground), but there is no station set to the corresponding item, or they're completely full ?

mattsemar commented 2 years ago

What do you mean, make up for it ? Also free vessel worth of fuel ? I don't get it.

Was just saying I could try to recover what was lost by giving away free stuff.

what happens when things are removed from my inventory [...] but there is no station set to the corresponding item, or they're completely full

If there's no station anywhere for the item they shouldn't be picked up from the ground at all (or removed from recycle area). If there is a station it will first go to the buffer and then if the item is not currently requested it stays until a free station can be found for it.

nirahiel commented 2 years ago

Was just saying I could try to recover what was lost by giving away free stuff.

Nah, I guess it's fine, people should know (myself included) that installing mods could lead to some issues. "Remember guys, always backup" ;)

If there's no station anywhere for the item they shouldn't be picked up from the ground at all (or removed from recycle area). If there is a station it will first go to the buffer and then if the item is not currently requested it stays until a free station can be found for it.

And if I then remove the only station, while the item is still in the buffer ? Also is there a way to get items from the buffer manually ? (For example, if I recycled something that no station is configured to accept)

mattsemar commented 2 years ago

And if I then remove the only station, while the item is still in the buffer ?

It gets stuck. The buffer is persisted in a file next to your game save so it shouldn't ever be completely lost, though (unless the game is saved with the mod disabled)

Also is there a way to get items from the buffer manually ? (For example, if I recycled something that no station is configured to accept)

Yeah, if you click the Settings icon it will open the legacy UI window. There is a Buffered Items tab. You should be able to use "Add to inventory" from there.

nirahiel commented 2 years ago

Well then I think it's all good. I'll re-enable refueling then, and will post a new bug report if I notice something odd again. Thanks ! I'm closing this.