Make craters affected by overdrive projectors

This commit is contained in:
Patrick 'Quezler' Mounier
2019-12-29 20:31:11 +01:00
parent 326f75cbda
commit 6b091b4d31
2 changed files with 15 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ public class UnitTypes implements ContentList{
mass = 0.5f;
health = 50;
rotatespeed = 0.1f;
itemCapacity = 10;
itemCapacity = 16;
weapon = new Weapon(){{
length = 1.5f;
reload = 28f;

View File

@@ -119,4 +119,18 @@ public class CraterUnit extends GroundUnit{
public boolean loading(){
return state.is(load);
}
/**
* Since normal conveyors get faster when boosted,
* this piece of code changes their capacity,
* make sure capacity is dividable by 4,
* for the best user experience.
*/
@Override
public int getItemCapacity(){
if(on() == null || on().entity == null) return type.itemCapacity;
return Mathf.round(type.itemCapacity * on().entity.timeScale);
}
}