Fixed 116 infinite resources / Fixed #11251
This commit is contained in:
Binary file not shown.
@@ -134,6 +134,7 @@ public class Logic implements ApplicationListener{
|
|||||||
//enable building AI on campaign unless the preset disables it
|
//enable building AI on campaign unless the preset disables it
|
||||||
|
|
||||||
state.rules.coreIncinerates = true;
|
state.rules.coreIncinerates = true;
|
||||||
|
state.rules.infiniteResources = false;
|
||||||
state.rules.allowEditRules = false;
|
state.rules.allowEditRules = false;
|
||||||
state.rules.allowEditWorldProcessors = false;
|
state.rules.allowEditWorldProcessors = false;
|
||||||
state.rules.waveTeam.rules().infiniteResources = true;
|
state.rules.waveTeam.rules().infiniteResources = true;
|
||||||
|
|||||||
@@ -82,12 +82,12 @@ public class ShieldArcAbility extends Ability{
|
|||||||
paramField.data -= unit.health() * paramField.missileUnitMultiplier * Vars.state.rules.unitDamage(unit.team);
|
paramField.data -= unit.health() * paramField.missileUnitMultiplier * Vars.state.rules.unitDamage(unit.team);
|
||||||
paramField.alpha = 1f;
|
paramField.alpha = 1f;
|
||||||
|
|
||||||
}else{
|
}else if(paramField.pushUnits && !(!unit.isFlying() && paramUnit.isFlying())){
|
||||||
|
|
||||||
float reach = paramField.radius + paramField.width;
|
float reach = paramField.radius + paramField.width;
|
||||||
float overlapDst = reach - unit.dst(paramPos.x,paramPos.y);
|
float overlapDst = reach - unit.dst(paramPos.x,paramPos.y);
|
||||||
|
|
||||||
if(overlapDst>0){
|
if(overlapDst > 0){
|
||||||
//stop
|
//stop
|
||||||
unit.vel.setZero();
|
unit.vel.setZero();
|
||||||
// get out
|
// get out
|
||||||
@@ -132,6 +132,8 @@ public class ShieldArcAbility extends Ability{
|
|||||||
public @Nullable Color color;
|
public @Nullable Color color;
|
||||||
/** If true, sprite position will be influenced by x/y. */
|
/** If true, sprite position will be influenced by x/y. */
|
||||||
public boolean offsetRegion = false;
|
public boolean offsetRegion = false;
|
||||||
|
/** If true, enemy units are pushed out. */
|
||||||
|
public boolean pushUnits = true;
|
||||||
|
|
||||||
/** State. */
|
/** State. */
|
||||||
protected float widthScale, alpha;
|
protected float widthScale, alpha;
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ public class Junction extends Block{
|
|||||||
underBullets = true;
|
underBullets = true;
|
||||||
group = BlockGroup.transportation;
|
group = BlockGroup.transportation;
|
||||||
unloadable = false;
|
unloadable = false;
|
||||||
floating = true;
|
|
||||||
noUpdateDisabled = true;
|
noUpdateDisabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -298,18 +298,16 @@ public class StackConveyor extends Block implements Autotiler{
|
|||||||
}
|
}
|
||||||
}else{ //transfer
|
}else{ //transfer
|
||||||
if(state != stateLoad || (items.total() >= getMaximumAccepted(lastItem))){
|
if(state != stateLoad || (items.total() >= getMaximumAccepted(lastItem))){
|
||||||
if(front() instanceof StackConveyorBuild e && e.team == team){
|
if(front() instanceof StackConveyorBuild e && e.team == team && e.link == -1){
|
||||||
if(e.link == -1){
|
e.items.add(items);
|
||||||
e.items.add(items);
|
e.lastItem = lastItem;
|
||||||
e.lastItem = lastItem;
|
e.link = tile.pos();
|
||||||
e.link = tile.pos();
|
//▲ to | from ▼
|
||||||
//▲ to | from ▼
|
link = -1;
|
||||||
link = -1;
|
items.clear();
|
||||||
items.clear();
|
|
||||||
|
|
||||||
cooldown = recharge;
|
cooldown = recharge;
|
||||||
e.cooldown = 1;
|
e.cooldown = 1;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ public class LiquidJunction extends LiquidBlock{
|
|||||||
|
|
||||||
public LiquidJunction(String name){
|
public LiquidJunction(String name){
|
||||||
super(name);
|
super(name);
|
||||||
|
floating = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -897,6 +897,9 @@ public class ApplicationTests{
|
|||||||
ObjectSet<Item> resources = new ObjectSet<>();
|
ObjectSet<Item> resources = new ObjectSet<>();
|
||||||
boolean hasSpawnPoint = false;
|
boolean hasSpawnPoint = false;
|
||||||
|
|
||||||
|
assertFalse(state.rules.infiniteResources, "Sector " + zone.name + " must not have infinite resources.");
|
||||||
|
assertFalse(state.rules.allowEditRules, "Sector " + zone.name + " must not have rule editing enabled.");
|
||||||
|
|
||||||
for(Tile tile : world.tiles){
|
for(Tile tile : world.tiles){
|
||||||
if(tile.drop() != null){
|
if(tile.drop() != null){
|
||||||
resources.add(tile.drop());
|
resources.add(tile.drop());
|
||||||
|
|||||||
Reference in New Issue
Block a user