17
17
import extrasandredux .ui .*;
18
18
import extrasandredux .util .*;
19
19
import mindustry .core .*;
20
- import mindustry .game .*;
21
20
import mindustry .game .EventType .*;
21
+ import mindustry .game .*;
22
22
import mindustry .gen .*;
23
23
import mindustry .graphics .*;
24
24
import mindustry .type .*;
@@ -37,6 +37,7 @@ public class FlowrateVoid extends PayloadVoid{
37
37
public float extraAbsorbOffset = 6f ;
38
38
public float extraAbsorbEffectMinDelay = 15f , extraAbsorbEffectMaxDelay = 35f ;
39
39
public float absorbPitch = 1f , absorbVolume = 0.2f ;
40
+ public float sclMax = 20f ;
40
41
public Color effectColor = Color .valueOf ("1d053a" );
41
42
42
43
protected TextureRegion baseRegion , spaceRegion ;
@@ -222,16 +223,19 @@ public void consumePayload(){
222
223
payloads .add (payload .content ());
223
224
}
224
225
225
- payload = null ;
226
226
incinerateEffect .at (x , y , effectColor );
227
227
incinerateSound .at (x , y , absorbPitch , absorbVolume );
228
228
229
- for (int i = 0 ; i < extraAbsorbEffects ; i ++){
229
+ float scl = Mathf .clamp (payload .size () / sclMax );
230
+ int count = (int )(extraAbsorbEffects * scl * scl );
231
+ for (int i = 0 ; i < count ; i ++){
230
232
Time .run (Mathf .random (extraAbsorbEffectMinDelay , extraAbsorbEffectMaxDelay ), () -> {
231
- Vec2 pos = ESRUtls .randomPoint (extraAbsorbOffset );
233
+ Vec2 pos = ESRUtls .randomPoint (extraAbsorbOffset * scl );
232
234
incinerateEffect .at (x + pos .x , y + pos .y , effectColor );
233
235
});
234
236
}
237
+
238
+ payload = null ;
235
239
}
236
240
237
241
@ Override
0 commit comments