mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-27 15:02:03 -08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
681bd19866
4 changed files with 536 additions and 494 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -38,7 +38,6 @@ Jaiun Lee
|
|||
Gab_351
|
||||
Carter Gale
|
||||
Jan Polák
|
||||
JrTRinny
|
||||
JustYanns
|
||||
BasedUser
|
||||
Rex Aliis
|
||||
|
|
@ -130,6 +129,7 @@ Skat
|
|||
WilloIzCitron
|
||||
SAMBUYYA
|
||||
genNAowl
|
||||
JniTrRny
|
||||
TranquillyUnpleasant
|
||||
Darkness6030
|
||||
hortiSquash
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package mindustry.world.blocks.production;
|
|||
import arc.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
import arc.util.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.logic.*;
|
||||
|
|
@ -19,6 +20,7 @@ public class Pump extends LiquidBlock{
|
|||
public float pumpAmount = 0.2f;
|
||||
/** Interval in-between item consumptions, if applicable. */
|
||||
public float consumeTime = 60f * 5f;
|
||||
public float warmupSpeed = 0.019f;
|
||||
public DrawBlock drawer = new DrawMulti(new DrawDefault(), new DrawPumpLiquid());
|
||||
|
||||
public Pump(String name){
|
||||
|
|
@ -105,6 +107,7 @@ public class Pump extends LiquidBlock{
|
|||
}
|
||||
|
||||
public class PumpBuild extends LiquidBuild{
|
||||
public float warmup, totalProgress;
|
||||
public float consTimer;
|
||||
public float amount = 0f;
|
||||
public @Nullable Liquid liquidDrop = null;
|
||||
|
|
@ -161,14 +164,34 @@ public class Pump extends LiquidBlock{
|
|||
//does nothing for most pumps, as those do not require items.
|
||||
if((consTimer += delta()) >= consumeTime){
|
||||
consume();
|
||||
consTimer = 0f;
|
||||
consTimer %= 1f;
|
||||
}
|
||||
|
||||
warmup = Mathf.approachDelta(warmup, maxPump > 0.001f ? 1f : 0f, warmupSpeed);
|
||||
}else{
|
||||
warmup = Mathf.approachDelta(warmup, 0f, warmupSpeed);
|
||||
}
|
||||
|
||||
totalProgress += warmup * Time.delta;
|
||||
|
||||
if(liquidDrop != null){
|
||||
dumpLiquid(liquidDrop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float warmup(){
|
||||
return warmup;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float progress(){
|
||||
return Mathf.clamp(consTimer / consumeTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float totalProgress(){
|
||||
return totalProgress;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@
|
|||
"address": ["0nera.ru:7777"]
|
||||
},
|
||||
{
|
||||
"name": "Voiddustry",
|
||||
"address": ["45.144.66.250:6566", "45.144.66.250:6565", "45.144.66.250:6561"]
|
||||
"name": "Voiddustry Network",
|
||||
"address": ["45.144.66.250:6566", "45.144.66.250:6567" ,"45.144.66.250:6565", "45.144.66.250:6561"]
|
||||
},
|
||||
{
|
||||
"name": "C.A.M.S.",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue