pain and suffering of various kinds
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
package io.anuke.mindustry.content;
|
||||
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.content.bullets.*;
|
||||
import io.anuke.mindustry.content.fx.BulletFx;
|
||||
import io.anuke.mindustry.content.fx.Fx;
|
||||
import io.anuke.mindustry.content.fx.ShootFx;
|
||||
import io.anuke.mindustry.game.Content;
|
||||
import io.anuke.mindustry.type.AmmoType;
|
||||
import io.anuke.mindustry.game.ContentList;
|
||||
import io.anuke.mindustry.type.AmmoType;
|
||||
import io.anuke.mindustry.type.ContentType;
|
||||
|
||||
public class AmmoTypes implements ContentList{
|
||||
public static AmmoType bulletCopper, bulletDense, bulletThorium, bulletSilicon, bulletPyratite,
|
||||
@@ -219,7 +218,7 @@ public class AmmoTypes implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public Array<? extends Content> getAll(){
|
||||
return AmmoType.all();
|
||||
public ContentType type(){
|
||||
return ContentType.ammo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package io.anuke.mindustry.content;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.game.Content;
|
||||
import io.anuke.mindustry.game.ContentList;
|
||||
import io.anuke.mindustry.type.ContentType;
|
||||
import io.anuke.mindustry.type.Item;
|
||||
import io.anuke.mindustry.type.ItemType;
|
||||
|
||||
@@ -96,7 +95,7 @@ public class Items implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public Array<? extends Content> getAll(){
|
||||
return Item.all();
|
||||
public ContentType type(){
|
||||
return ContentType.item;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package io.anuke.mindustry.content;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.game.Content;
|
||||
import io.anuke.mindustry.game.ContentList;
|
||||
import io.anuke.mindustry.type.ContentType;
|
||||
import io.anuke.mindustry.type.Liquid;
|
||||
|
||||
public class Liquids implements ContentList{
|
||||
@@ -50,7 +49,7 @@ public class Liquids implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public Array<? extends Content> getAll(){
|
||||
return Liquid.all();
|
||||
public ContentType type(){
|
||||
return ContentType.liquid;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package io.anuke.mindustry.content;
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import com.badlogic.gdx.math.Rectangle;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.content.fx.BulletFx;
|
||||
import io.anuke.mindustry.content.fx.UnitFx;
|
||||
import io.anuke.mindustry.entities.Player;
|
||||
@@ -13,11 +12,11 @@ import io.anuke.mindustry.entities.effect.Fire;
|
||||
import io.anuke.mindustry.entities.effect.Lightning;
|
||||
import io.anuke.mindustry.entities.units.BaseUnit;
|
||||
import io.anuke.mindustry.entities.units.types.AlphaDrone;
|
||||
import io.anuke.mindustry.game.Content;
|
||||
import io.anuke.mindustry.game.ContentList;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.mindustry.graphics.Shaders;
|
||||
import io.anuke.mindustry.net.Net;
|
||||
import io.anuke.mindustry.game.ContentList;
|
||||
import io.anuke.mindustry.type.ContentType;
|
||||
import io.anuke.mindustry.type.Mech;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.ucore.core.Core;
|
||||
@@ -349,7 +348,7 @@ public class Mechs implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public Array<? extends Content> getAll(){
|
||||
return Mech.all();
|
||||
public ContentType type(){
|
||||
return ContentType.mech;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package io.anuke.mindustry.content;
|
||||
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.content.blocks.*;
|
||||
import io.anuke.mindustry.game.Content;
|
||||
import io.anuke.mindustry.game.ContentList;
|
||||
import io.anuke.mindustry.type.ContentType;
|
||||
import io.anuke.mindustry.type.ItemStack;
|
||||
import io.anuke.mindustry.type.Recipe;
|
||||
|
||||
@@ -181,7 +180,7 @@ public class Recipes implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public Array<? extends Content> getAll(){
|
||||
return Recipe.all();
|
||||
public ContentType type(){
|
||||
return ContentType.recipe;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
package io.anuke.mindustry.content;
|
||||
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.content.fx.EnvironmentFx;
|
||||
import io.anuke.mindustry.entities.StatusController.StatusEntry;
|
||||
import io.anuke.mindustry.entities.Unit;
|
||||
import io.anuke.mindustry.game.Content;
|
||||
import io.anuke.mindustry.game.ContentList;
|
||||
import io.anuke.mindustry.type.ContentType;
|
||||
import io.anuke.mindustry.type.StatusEffect;
|
||||
import io.anuke.ucore.core.Effects;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
@@ -149,7 +148,7 @@ public class StatusEffects implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public Array<? extends Content> getAll(){
|
||||
return StatusEffect.all();
|
||||
public ContentType type(){
|
||||
return ContentType.status;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
package io.anuke.mindustry.content;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.ObjectSet;
|
||||
import io.anuke.mindustry.entities.units.UnitType;
|
||||
import io.anuke.mindustry.entities.units.types.*;
|
||||
import io.anuke.mindustry.game.Content;
|
||||
import io.anuke.mindustry.game.ContentList;
|
||||
import io.anuke.mindustry.type.ContentType;
|
||||
|
||||
public class UnitTypes implements ContentList{
|
||||
public static UnitType drone, alphaDrone, dagger, interceptor, monsoon, titan, fabricator;
|
||||
@@ -93,7 +92,7 @@ public class UnitTypes implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public Array<? extends Content> getAll(){
|
||||
return UnitType.all();
|
||||
public ContentType type(){
|
||||
return ContentType.unit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package io.anuke.mindustry.content;
|
||||
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.content.fx.Fx;
|
||||
import io.anuke.mindustry.content.fx.ShootFx;
|
||||
import io.anuke.mindustry.game.Content;
|
||||
import io.anuke.mindustry.game.ContentList;
|
||||
import io.anuke.mindustry.type.ContentType;
|
||||
import io.anuke.mindustry.type.Weapon;
|
||||
|
||||
public class Weapons implements ContentList{
|
||||
@@ -153,7 +152,7 @@ public class Weapons implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public Array<? extends Content> getAll(){
|
||||
return Weapon.all();
|
||||
public ContentType type(){
|
||||
return ContentType.weapon;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
package io.anuke.mindustry.content.blocks;
|
||||
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.game.Content;
|
||||
import io.anuke.mindustry.game.ContentList;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.type.ContentType;
|
||||
|
||||
public abstract class BlockList implements ContentList{
|
||||
|
||||
@Override
|
||||
public Array<? extends Content> getAll(){
|
||||
return Block.all();
|
||||
public ContentType type(){
|
||||
return ContentType.item;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import io.anuke.ucore.scene.ui.layout.Table;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
public class DebugBlocks extends BlockList implements ContentList{
|
||||
public static Block powerVoid, powerInfinite, itemSource, liquidSource, itemVoid;
|
||||
@@ -105,7 +106,7 @@ public class DebugBlocks extends BlockList implements ContentList{
|
||||
public void buildTable(Tile tile, Table table){
|
||||
LiquidSourceEntity entity = tile.entity();
|
||||
|
||||
Array<Liquid> items = Liquid.all();
|
||||
Array<Liquid> items = content.liquids();
|
||||
|
||||
ButtonGroup<ImageButton> group = new ButtonGroup<>();
|
||||
Table cont = new Table();
|
||||
@@ -159,7 +160,7 @@ public class DebugBlocks extends BlockList implements ContentList{
|
||||
|
||||
@Override
|
||||
public void read(DataInputStream stream) throws IOException{
|
||||
source = Liquid.getByID(stream.readByte());
|
||||
source = content.liquid(stream.readByte());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import io.anuke.mindustry.type.Item;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.blocks.Floor;
|
||||
import io.anuke.mindustry.world.blocks.OreBlock;
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
public class OreBlocks extends BlockList{
|
||||
private static final ObjectMap<Item, ObjectMap<Block, Block>> oreBlockMap = new ObjectMap<>();
|
||||
@@ -25,7 +26,7 @@ public class OreBlocks extends BlockList{
|
||||
ObjectMap<Block, Block> map = new ObjectMap<>();
|
||||
oreBlockMap.put(item, map);
|
||||
|
||||
for(Block block : Block.all()){
|
||||
for(Block block : content.blocks()){
|
||||
if(block instanceof Floor && ((Floor) block).hasOres){
|
||||
map.put(block, new OreBlock(item, (Floor) block));
|
||||
}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
package io.anuke.mindustry.content.bullets;
|
||||
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.entities.bullet.BulletType;
|
||||
import io.anuke.mindustry.game.Content;
|
||||
import io.anuke.mindustry.game.ContentList;
|
||||
import io.anuke.mindustry.type.ContentType;
|
||||
|
||||
public abstract class BulletList implements ContentList{
|
||||
|
||||
@Override
|
||||
public Array<? extends Content> getAll(){
|
||||
return BulletType.all();
|
||||
public ContentType type(){
|
||||
return ContentType.bullet;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,9 +14,8 @@ import io.anuke.mindustry.entities.bullet.LiquidBulletType;
|
||||
import io.anuke.mindustry.entities.effect.Fire;
|
||||
import io.anuke.mindustry.entities.effect.ItemDrop;
|
||||
import io.anuke.mindustry.entities.effect.Lightning;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.mindustry.game.ContentList;
|
||||
import io.anuke.mindustry.type.Item;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.blocks.distribution.MassDriver.DriverBulletData;
|
||||
import io.anuke.ucore.core.Effects;
|
||||
@@ -28,6 +27,7 @@ import io.anuke.ucore.graphics.Shapes;
|
||||
import io.anuke.ucore.util.Angles;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
|
||||
import static io.anuke.mindustry.Vars.content;
|
||||
import static io.anuke.mindustry.Vars.world;
|
||||
|
||||
public class TurretBullets extends BulletList implements ContentList{
|
||||
@@ -328,7 +328,7 @@ public class TurretBullets extends BulletList implements ContentList{
|
||||
if(amountDropped > 0){
|
||||
float angle = b.angle() + Mathf.range(100f);
|
||||
float vs = Mathf.random(0f, 4f);
|
||||
ItemDrop.create(Item.getByID(i), amountDropped, b.x, b.y, Angles.trnsx(angle, vs), Angles.trnsy(angle, vs));
|
||||
ItemDrop.create(content.item(i), amountDropped, b.x, b.y, Angles.trnsx(angle, vs), Angles.trnsy(angle, vs));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package io.anuke.mindustry.content.fx;
|
||||
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.game.Content;
|
||||
import io.anuke.mindustry.game.ContentList;
|
||||
import io.anuke.mindustry.type.ContentType;
|
||||
|
||||
public abstract class FxList implements ContentList{
|
||||
|
||||
@Override
|
||||
public Array<? extends Content> getAll(){
|
||||
return Array.with();
|
||||
public ContentType type(){
|
||||
return ContentType.effect;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user