This commit is contained in:
Anuken
2020-09-05 13:35:36 -04:00
parent 9fb570f965
commit 09e34da880
4 changed files with 10 additions and 5 deletions

View File

@@ -209,6 +209,7 @@ public class Blocks implements ContentList{
liquidDrop = Liquids.slag; liquidDrop = Liquids.slag;
isLiquid = true; isLiquid = true;
cacheLayer = CacheLayer.slag; cacheLayer = CacheLayer.slag;
attributes.set(Attribute.heat, 0.85f);
}}; }};
stone = new Floor("stone"){{ stone = new Floor("stone"){{
@@ -1131,6 +1132,7 @@ public class Blocks implements ContentList{
powerProduction = 1.8f; powerProduction = 1.8f;
generateEffect = Fx.redgeneratespark; generateEffect = Fx.redgeneratespark;
size = 2; size = 2;
floating = true;
}}; }};
turbineGenerator = new BurnerGenerator("turbine-generator"){{ turbineGenerator = new BurnerGenerator("turbine-generator"){{

View File

@@ -336,7 +336,7 @@ public class UnitTypes implements ContentList{
shootSound = Sounds.laser; shootSound = Sounds.laser;
bullet = new LaserBulletType(){{ bullet = new LaserBulletType(){{
damage = 30f; damage = 40f;
recoil = 1f; recoil = 1f;
sideAngle = 45f; sideAngle = 45f;
sideWidth = 1f; sideWidth = 1f;

View File

@@ -192,9 +192,7 @@ public class World{
} }
} }
if(!headless){ addDarkness(tiles);
addDarkness(tiles);
}
Groups.resize(-finalWorldBounds, -finalWorldBounds, tiles.width * tilesize + finalWorldBounds * 2, tiles.height * tilesize + finalWorldBounds * 2); Groups.resize(-finalWorldBounds, -finalWorldBounds, tiles.width * tilesize + finalWorldBounds * 2, tiles.height * tilesize + finalWorldBounds * 2);

View File

@@ -72,8 +72,13 @@ public class PointDefenseTurret extends Block{
target = Groups.bullet.intersect(x - range, y - range, range*2, range*2).min(b -> b.team == team || !b.type().hittable ? Float.MAX_VALUE : b.dst2(this)); target = Groups.bullet.intersect(x - range, y - range, range*2, range*2).min(b -> b.team == team || !b.type().hittable ? Float.MAX_VALUE : b.dst2(this));
} }
//pooled bullets
if(target != null && !target.isAdded()){
target = null;
}
//look at target //look at target
if(target != null && target.within(this, range) && target.team != team && target.type().hittable){ if(target != null && target.within(this, range) && target.team != team && target.type() != null && target.type().hittable){
float dest = angleTo(target); float dest = angleTo(target);
rotation = Angles.moveToward(rotation, dest, rotateSpeed * edelta()); rotation = Angles.moveToward(rotation, dest, rotateSpeed * edelta());
reload -= edelta(); reload -= edelta();