Allow unit icons for sectors

This commit is contained in:
Anuken
2021-08-28 20:49:39 -04:00
parent a3270dd908
commit e30d7e998d
2 changed files with 2 additions and 2 deletions

View File

@@ -45,7 +45,7 @@ public class Vars implements Loadable{
/** Name of current Steam player. */
public static String steamPlayerName = "";
/** Default accessible content types used for player-selectable icons. */
public static final ContentType[] defaultContentIcons = {ContentType.item, ContentType.liquid, ContentType.block};
public static final ContentType[] defaultContentIcons = {ContentType.item, ContentType.liquid, ContentType.block, ContentType.unit};
/** Wall darkness radius. */
public static final int darkRadius = 4;
/** Maximum extra padding around deployment schematics. */

View File

@@ -176,7 +176,7 @@ public class PowerGraph{
public void distributePower(float needed, float produced, boolean charged){
//distribute even if not needed. this is because some might be requiring power but not using it; it updates consumers
float coverage = Mathf.zero(needed) && Mathf.zero(produced) && !charged ? 0f : Mathf.zero(needed) ? 1f : Math.min(1, produced / needed);
float coverage = Mathf.zero(needed) && Mathf.zero(produced) && !charged && Mathf.zero(lastPowerStored) ? 0f : Mathf.zero(needed) ? 1f : Math.min(1, produced / needed);
for(Building consumer : consumers){
Consumers consumes = consumer.block.consumes;
if(consumes.hasPower()){