Bugfixes / Built-in rate limits

This commit is contained in:
Anuken
2020-05-15 15:45:23 -04:00
parent 9f20de427e
commit bc28dd392b
15 changed files with 106 additions and 32 deletions

View File

@@ -27,7 +27,8 @@ public class Door extends Wall{
solid = false;
solidifes = true;
consumesTap = true;
config(Boolean.class, (entity, open) -> {
config(Boolean.class, (entity, open) -> {
DoorEntity door = (DoorEntity)entity;
door.open = open;
pathfinder.updateTile(door.tile());

View File

@@ -72,7 +72,7 @@ public class LaunchPad extends Block{
Draw.reset();
}
float cooldown = Mathf.clamp(timer.getTime(timerLaunch) / 90f);
float cooldown = Mathf.clamp(timer.getTime(timerLaunch) / 90f / timeScale);
Draw.mixcol(lightColor, 1f - cooldown);
@@ -90,7 +90,7 @@ public class LaunchPad extends Block{
public void updateTile(){
//launch when full and base conditions are met
if(items.total() >= itemCapacity && efficiency() >= 1f && timer(timerLaunch, launchTime)){
if(items.total() >= itemCapacity && efficiency() >= 1f && timer(timerLaunch, launchTime / timeScale)){
LaunchPayloadc entity = LaunchPayloadEntity.create();
items.each((item, amount) -> entity.stacks().add(new ItemStack(item, amount)));
entity.set(this);