Project-RimFactory-Revived
Project-RimFactory-Revived copied to clipboard
Speed boost for the T3 Miner has a direct impact on the progress
Describe the bug
Steam: Dru
Plasma Drill (T3) (haven't tested others) - when rising power boost the current progress also rises. I can go to around 50% with minimal power, rise power to max and it instantly finishes.
To Reproduce
- Place T3 Drill
- Let it do some work
- pause game (for best visibility)
- Move the Power Slider A direct Change in the Progress can be observed.
Worth noting: The current progress greatly affects the change. at ~1% only a few % are changed at max at ~50% 100% is reached very quickly
Expected behavior The Speed slider only affects each progress step. not the total progress retroactively.
would properly only be plasma drill as they are 2 different thingclass =) even 2 different powerslider comps if i remember correctly are nobos stuff using hes own power slider and prf stuff are using prf_powerslider (another comp)
@zymex22 on the side of the Miners this only affects the T3 Miner.
the issue is in the Building_Base<T>
Class.
Therefor all building using that class a base will be affected by that issue.
This includes:
- Item Puller
- Slaughterhouse
edit: corrected Building_BaseMachine<T>
to Building_Base<T>
meaning that the impact could be larger.
Fixing this issue will require a complete overhaul on how work is handled for Building_Base
.
https://github.com/zymex22/Project-RimFactory-Revived/blob/master/Source/ProjectRimFactory/AutoMachineTool/Building_Base.cs
currently the work progress is not added upon but calculated on each read attempt and that is also the cause of the issue.
@lilwhitemouse do you think we will have performance losses if we switch from MapManager.AfterAction
to one of the Tick
events?
Let me finish belts and then take a look at this. Honestly speaking, there are some parts of how the AutoMachineTools work that baffle me.
For Documentation: SAL is also affected by this issue
Just a note more for this... on belts Power slider have very funny behavior.... it "stacks" power use in some scenarios, if moving up close, down close, up close.... you can make it go higher/lower for some reason.
i dont know if that apply to T3 miner too? but atleast they use same powerslider so might be worth checking if problem can happen on SAL, Slaugter, Miner too =) i suspect its something about only update when open and not yea... something...