Second map updates
This commit is contained in:
@@ -1322,6 +1322,7 @@ public class Blocks{
|
||||
}};
|
||||
|
||||
//TODO should have a useful turret ammo byproduct? scrap?
|
||||
//TODO surge being removed I think
|
||||
surgeCrucible = new HeatCrafter("surge-crucible"){{
|
||||
requirements(Category.crafting, with(Items.silicon, 100, Items.graphite, 80, Items.carbide, 60, Items.thorium, 90));
|
||||
|
||||
|
||||
@@ -491,7 +491,9 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
|
||||
/** @return whether this block is allowed to update based on team/environment */
|
||||
public boolean allowUpdate(){
|
||||
return team != Team.derelict && block.supportsEnv(state.rules.env);
|
||||
return team != Team.derelict && block.supportsEnv(state.rules.env) &&
|
||||
//check if outside map limit
|
||||
(!state.rules.limitMapArea || !state.rules.disableOutsideArea || Rect.contains(state.rules.limitX, state.rules.limitY, state.rules.limitWidth, state.rules.limitHeight, tile.x, tile.y));
|
||||
}
|
||||
|
||||
public BlockStatus status(){
|
||||
|
||||
@@ -144,6 +144,8 @@ public class Rules{
|
||||
public boolean limitMapArea = false;
|
||||
/** Map area limit rectangle. */
|
||||
public int limitX, limitY, limitWidth = 1, limitHeight = 1;
|
||||
/** If true, blocks outside the map area are disabled. */
|
||||
public boolean disableOutsideArea = true;
|
||||
/** special tags for additional info. */
|
||||
public StringMap tags = new StringMap();
|
||||
/** Name of callback to call for background rendering in mods; see Renderer#addCustomBackground. Runs last. */
|
||||
|
||||
@@ -201,7 +201,7 @@ public class Build{
|
||||
}
|
||||
}
|
||||
|
||||
if(state.rules.placeRangeCheck && getEnemyOverlap(type, team, x, y) != null){
|
||||
if(state.rules.placeRangeCheck && !state.isEditor() && getEnemyOverlap(type, team, x, y) != null){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ public class PayloadBlock extends Block{
|
||||
updatePayload();
|
||||
|
||||
if(rotate){
|
||||
payRotation = Angles.moveToward(payRotation, rotate ? rotdeg() : 90f, payloadRotateSpeed * delta());
|
||||
payRotation = Angles.moveToward(payRotation, block.rotate ? rotdeg() : 90f, payloadRotateSpeed * delta());
|
||||
}
|
||||
payVector.approach(Vec2.ZERO, payloadSpeed * delta());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user