Project-RimFactory-Revived icon indicating copy to clipboard operation
Project-RimFactory-Revived copied to clipboard

Speed boost for the T3 Miner has a direct impact on the progress

Open Sn1p3rr3c0n opened this issue 4 years ago • 6 comments

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

  1. Place T3 Drill
  2. Let it do some work
  3. pause game (for best visibility)
  4. 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.

Sn1p3rr3c0n avatar Sep 17 '20 18:09 Sn1p3rr3c0n

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 avatar Sep 17 '20 19:09 zymex22

@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.

Sn1p3rr3c0n avatar Sep 17 '20 19:09 Sn1p3rr3c0n

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?

Sn1p3rr3c0n avatar Sep 17 '20 20:09 Sn1p3rr3c0n

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.

lilwhitemouse avatar Sep 18 '20 23:09 lilwhitemouse

For Documentation: SAL is also affected by this issue

Sn1p3rr3c0n avatar Oct 30 '20 19:10 Sn1p3rr3c0n

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...

zymex22 avatar Nov 17 '20 17:11 zymex22