Minor rule fixes

This commit is contained in:
Anuken 2022-02-18 21:01:32 -05:00
parent 5181f88db1
commit 20b10e924b
4 changed files with 9 additions and 3 deletions

View File

@ -1897,7 +1897,7 @@ public class Blocks{
ductUnloader = new DirectionalUnloader("duct-unloader"){{
requirements(Category.distribution, with(Items.graphite, 20, Items.silicon, 20, Items.tungsten, 10));
health = 90;
health = 120;
speed = 4f;
regionRotated1 = 1;
}};

View File

@ -65,6 +65,8 @@ public class Planets{
hiddenItems.addAll(Items.serpuloItems).removeAll(Items.erekirItems);
ruleSetter = r -> {
r.placeRangeCheck = true;
r.attributes.set(Attribute.heat, 0.8f);
r.showSpawns = true;
};
unlockedOnLand.add(Blocks.coreBastion);
@ -107,6 +109,11 @@ public class Planets{
allowWaveSimulation = true;
allowSectorInvasion = true;
allowLaunchSchematics = true;
ruleSetter = r -> {
r.placeRangeCheck = false;
r.attributes.clear();
r.showSpawns = false;
};
defaultAI = true;
atmosphereColor = Color.valueOf("3c1b8f");
atmosphereRadIn = 0.02f;

View File

@ -213,7 +213,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
for(int id : unitIds){
Unit unit = Groups.unit.getByID(id);
if(unit.team == player.team() && unit.controller() instanceof CommandAI ai){
if(unit != null && unit.team == player.team() && unit.controller() instanceof CommandAI ai){
if(teamTarget != null && teamTarget.team() != player.team()){
ai.commandTarget(teamTarget);
}else if(posTarget != null){

View File

@ -442,7 +442,6 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
decoration(0.017f);
//it is very hot
state.rules.attributes.set(Attribute.heat, 0.8f);
state.rules.env = sector.planet.defaultEnv;
state.rules.placeRangeCheck = true;