//TODO: Move to rare tick? public static void tick() { int currentTick = Find.TickManager.TicksGame; //Only every 20 ticks if (currentTick % 20 == 0) { //Check to not have multiple ticks at the same time if (currentTick != previousTickExecuted) { //Record the previous tick previousTickExecuted = currentTick; //Recharge NanoManager.addCharge(); } } }
public static void addCharge() { NanoManager.addCharge(1); }