WIP logic particle effect instruction

This commit is contained in:
Anuken
2023-08-02 22:15:44 -04:00
parent 660c38db43
commit 6bf5e8ae1e
19 changed files with 596 additions and 23 deletions

View File

@@ -1370,7 +1370,7 @@ public class Block extends UnlockableContent implements Senseable{
return switch(sensor){
case color -> mapColor.toDoubleBits();
case health, maxHealth -> health;
case size -> size * tilesize;
case size -> size;
case itemCapacity -> itemCapacity;
case liquidCapacity -> liquidCapacity;
case powerCapacity -> consPower != null && consPower.buffered ? consPower.capacity : 0f;

View File

@@ -37,6 +37,8 @@ public class CoreBlock extends StorageBlock{
public @Load(value = "@-thruster2", fallback = "clear-effect") TextureRegion thruster2; //bot left
public float thrusterLength = 14f/4f;
public boolean isFirstTier;
/** If true, this core type requires a core zone to upgrade. */
public boolean requiresCoreZone;
public boolean incinerateNonBuildable = false;
public UnitType unitType = UnitTypes.alpha;
@@ -60,8 +62,6 @@ public class CoreBlock extends StorageBlock{
//support everything
replaceable = false;
//TODO should AI ever rebuild this?
//rebuildable = false;
}
@Remote(called = Loc.server)
@@ -160,7 +160,7 @@ public class CoreBlock extends StorageBlock{
//must have all requirements
if(core == null || (!state.rules.infiniteResources && !core.items.has(requirements, state.rules.buildCostMultiplier))) return false;
return tile.block() instanceof CoreBlock && size > tile.block().size;
return tile.block() instanceof CoreBlock && size > tile.block().size && (!requiresCoreZone || tempTiles.allMatch(o -> o.floor().allowCorePlacement));
}
@Override

View File

@@ -239,7 +239,7 @@ public class Reconstructor extends UnitBlock{
@Override
public int getMaximumAccepted(Item item){
return capacities[item.id];
return Mathf.round(capacities[item.id] * state.rules.unitCost(team));
}
@Override