Fixed maps converting improperly / Minor balancing
This commit is contained in:
@@ -35,7 +35,7 @@ public class Mechs implements ContentList{
|
|||||||
boostSpeed = 0.95f;
|
boostSpeed = 0.95f;
|
||||||
buildPower = 1.2f;
|
buildPower = 1.2f;
|
||||||
engineColor = Color.valueOf("ffd37f");
|
engineColor = Color.valueOf("ffd37f");
|
||||||
health = 300f;
|
health = 250f;
|
||||||
|
|
||||||
weapon = new Weapon("blaster"){{
|
weapon = new Weapon("blaster"){{
|
||||||
length = 1.5f;
|
length = 1.5f;
|
||||||
@@ -75,7 +75,7 @@ public class Mechs implements ContentList{
|
|||||||
weapon = new Weapon("shockgun"){{
|
weapon = new Weapon("shockgun"){{
|
||||||
shake = 2f;
|
shake = 2f;
|
||||||
length = 1f;
|
length = 1f;
|
||||||
reload = 40f;
|
reload = 45f;
|
||||||
shotDelay = 3f;
|
shotDelay = 3f;
|
||||||
roundrobin = true;
|
roundrobin = true;
|
||||||
shots = 2;
|
shots = 2;
|
||||||
@@ -163,12 +163,12 @@ public class Mechs implements ContentList{
|
|||||||
weaponOffsetX = 1;
|
weaponOffsetX = 1;
|
||||||
weaponOffsetY = 0;
|
weaponOffsetY = 0;
|
||||||
engineColor = Color.valueOf("feb380");
|
engineColor = Color.valueOf("feb380");
|
||||||
health = 300f;
|
health = 310f;
|
||||||
buildPower = 1.5f;
|
buildPower = 1.5f;
|
||||||
weapon = new Weapon("swarmer"){{
|
weapon = new Weapon("swarmer"){{
|
||||||
length = 1.5f;
|
length = 1.5f;
|
||||||
recoil = 4f;
|
recoil = 4f;
|
||||||
reload = 60f;
|
reload = 50f;
|
||||||
shots = 4;
|
shots = 4;
|
||||||
spacing = 8f;
|
spacing = 8f;
|
||||||
inaccuracy = 8f;
|
inaccuracy = 8f;
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ public class LiquidBulletType extends BulletType{
|
|||||||
statusDuration = 90f;
|
statusDuration = 90f;
|
||||||
despawnEffect = Fx.none;
|
despawnEffect = Fx.none;
|
||||||
hitEffect = Fx.hitLiquid;
|
hitEffect = Fx.hitLiquid;
|
||||||
|
smokeEffect = Fx.none;
|
||||||
shootEffect = Fx.none;
|
shootEffect = Fx.none;
|
||||||
drag = 0.009f;
|
drag = 0.009f;
|
||||||
knockback = 0.55f;
|
knockback = 0.55f;
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ public class LegacyMapIO{
|
|||||||
for(int x = 0; x < map.width; x++){
|
for(int x = 0; x < map.width; x++){
|
||||||
for(int y = 0; y < map.height; y++){
|
for(int y = 0; y < map.height; y++){
|
||||||
tiles[x][y] = new CachedTile();
|
tiles[x][y] = new CachedTile();
|
||||||
|
tiles[x][y].x = (short)x;
|
||||||
|
tiles[x][y].y = (short)y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
state.rules.spawns = groups;
|
state.rules.spawns = groups;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package io.anuke.mindustry.world;
|
package io.anuke.mindustry.world;
|
||||||
|
|
||||||
import io.anuke.arc.collection.IntMap;
|
|
||||||
import io.anuke.mindustry.entities.type.TileEntity;
|
import io.anuke.mindustry.entities.type.TileEntity;
|
||||||
import io.anuke.mindustry.game.Team;
|
import io.anuke.mindustry.game.Team;
|
||||||
import io.anuke.mindustry.world.modules.*;
|
import io.anuke.mindustry.world.modules.*;
|
||||||
@@ -10,7 +9,6 @@ import io.anuke.mindustry.world.modules.*;
|
|||||||
* Prevents garbage when loading previews.
|
* Prevents garbage when loading previews.
|
||||||
*/
|
*/
|
||||||
public class CachedTile extends Tile{
|
public class CachedTile extends Tile{
|
||||||
private static IntMap<TileEntity> entities = new IntMap<>();
|
|
||||||
|
|
||||||
public CachedTile(){
|
public CachedTile(){
|
||||||
super(0, 0);
|
super(0, 0);
|
||||||
@@ -23,7 +21,8 @@ public class CachedTile extends Tile{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void preChanged(){
|
protected void preChanged(){
|
||||||
super.setTeam(Team.none);
|
//this basically overrides the old tile code and doesn't remove from proximity
|
||||||
|
team = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -33,19 +32,14 @@ public class CachedTile extends Tile{
|
|||||||
Block block = block();
|
Block block = block();
|
||||||
|
|
||||||
if(block.hasEntity()){
|
if(block.hasEntity()){
|
||||||
//cache all entity types so only one is ever created per block type. do not add it.
|
TileEntity n = block.newEntity();
|
||||||
if(!entities.containsKey(block.id)){
|
n.cons = new ConsumeModule(entity);
|
||||||
TileEntity n = block.newEntity();
|
n.tile = this;
|
||||||
n.cons = new ConsumeModule(entity);
|
n.block = block;
|
||||||
n.tile = this;
|
if(block.hasItems) n.items = new ItemModule();
|
||||||
if(block.hasItems) n.items = new ItemModule();
|
if(block.hasLiquids) n.liquids = new LiquidModule();
|
||||||
if(block.hasLiquids) n.liquids = new LiquidModule();
|
if(block.hasPower) n.power = new PowerModule();
|
||||||
if(block.hasPower) n.power = new PowerModule();
|
entity = n;
|
||||||
entities.put(block.id, n);
|
|
||||||
}
|
|
||||||
|
|
||||||
entity = entities.get(block.id);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -439,6 +439,6 @@ public class Tile implements Position, TargetTrait{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString(){
|
public String toString(){
|
||||||
return floor.name + ":" + block.name + ":" + content.block(overlay) + "[" + x + "," + y + "] " + "entity=" + (entity == null ? "null" : (entity.getClass()));
|
return floor.name + ":" + block.name + ":" + content.block(overlay) + "[" + x + "," + y + "] " + "entity=" + (entity == null ? "null" : (entity.getClass())) + ":" + getTeam();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -214,7 +214,8 @@ public class MassDriver extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean acceptItem(Item item, Tile tile, Tile source){
|
public boolean acceptItem(Item item, Tile tile, Tile source){
|
||||||
return tile.entity.items.total() < itemCapacity;
|
//mass drivers that ouput only cannot accept items
|
||||||
|
return tile.entity.items.total() < itemCapacity && linkValid(tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user