Added shield shader, temporarily disabled dependencies and shield energy
This commit is contained in:
@@ -58,6 +58,13 @@ public class EffectCreator{
|
||||
Draw.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
|
||||
Draw.reset();
|
||||
});
|
||||
|
||||
Effects.create("generate", 11, e -> {
|
||||
Draw.color(Hue.mix(Color.ORANGE, Color.YELLOW, e.ifract()));
|
||||
Draw.thickness(1f);
|
||||
Draw.spikes(e.x, e.y, e.ifract() * 5f, 2, 8);
|
||||
Draw.reset();
|
||||
});
|
||||
|
||||
Effects.create("spark", 10, e -> {
|
||||
Draw.thickness(1f);
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.Input.Buttons;
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.OrthographicCamera;
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.math.MathUtils;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
@@ -41,6 +42,7 @@ public class Renderer extends RendererModule{
|
||||
pixelate();
|
||||
|
||||
Graphics.addSurface("shadow", Core.cameraScale);
|
||||
Graphics.addSurface("shield", Core.cameraScale);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -118,8 +120,14 @@ public class Renderer extends RendererModule{
|
||||
|
||||
@Override
|
||||
public void draw(){
|
||||
Graphics.surface("shield");
|
||||
Graphics.surface();
|
||||
|
||||
renderTiles();
|
||||
Entities.draw();
|
||||
|
||||
drawShield();
|
||||
|
||||
renderPixelOverlay();
|
||||
}
|
||||
|
||||
@@ -131,6 +139,24 @@ public class Renderer extends RendererModule{
|
||||
AndroidInput.mousey = Gdx.graphics.getHeight() / 2;
|
||||
camera.position.set(player.x, player.y, 0);
|
||||
}
|
||||
|
||||
void drawShield(){
|
||||
Texture texture = Graphics.getSurface("shield").texture();
|
||||
Shaders.shield.color.set(Color.SKY);
|
||||
|
||||
Tmp.tr2.setRegion(texture);
|
||||
Shaders.shield.region = Tmp.tr2;
|
||||
|
||||
Graphics.end();
|
||||
Graphics.shader(Shaders.shield);
|
||||
Graphics.setScreen();
|
||||
|
||||
Core.batch.draw(texture, 0, Gdx.graphics.getHeight(), Gdx.graphics.getWidth(), -Gdx.graphics.getHeight());
|
||||
|
||||
Graphics.shader();
|
||||
Graphics.end();
|
||||
Graphics.beginCam();
|
||||
}
|
||||
|
||||
void renderTiles(){
|
||||
int chunksx = World.width() / chunksize, chunksy = World.height() / chunksize;
|
||||
@@ -374,6 +400,7 @@ public class Renderer extends RendererModule{
|
||||
clampScale();
|
||||
Graphics.getSurface("pixel").setScale(targetscale);
|
||||
Graphics.getSurface("shadow").setScale(targetscale);
|
||||
Graphics.getSurface("shield").setScale(targetscale);
|
||||
}
|
||||
|
||||
public void scaleCamera(int amount){
|
||||
|
||||
@@ -2,11 +2,14 @@ package io.anuke.mindustry;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
|
||||
import io.anuke.ucore.core.Core;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.graphics.Shader;
|
||||
import io.anuke.ucore.util.Tmp;
|
||||
|
||||
public class Shaders{
|
||||
public static final Outline outline = new Outline();
|
||||
public static final Shield shield = new Shield();
|
||||
|
||||
public static class Outline extends Shader{
|
||||
public Color color = new Color();
|
||||
@@ -22,4 +25,21 @@ public class Shaders{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class Shield extends Shader{
|
||||
public Color color = new Color();
|
||||
|
||||
public Shield(){
|
||||
super("shield", "default");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(){
|
||||
shader.setUniformf("u_color", color);
|
||||
shader.setUniformf("u_time", Timers.time());
|
||||
shader.setUniformf("u_offset", Tmp.v1.set(Core.camera.position.x, Core.camera.position.y));
|
||||
shader.setUniformf("u_texsize", Tmp.v1.set(region.getTexture().getWidth(), region.getTexture().getHeight()));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,56 @@
|
||||
package io.anuke.mindustry.entities.effect;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.blocks.types.ShieldBlock;
|
||||
import io.anuke.ucore.core.Draw;
|
||||
import io.anuke.ucore.core.Graphics;
|
||||
import io.anuke.ucore.entities.Entity;
|
||||
|
||||
public class Shield extends Entity{
|
||||
public boolean active;
|
||||
private final Tile tile;
|
||||
//TODO
|
||||
|
||||
public Shield(Tile tile){
|
||||
this.tile = tile;
|
||||
this.x = tile.worldx();
|
||||
this.y = tile.worldy();
|
||||
}
|
||||
|
||||
public float drawSize(){
|
||||
return 150;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(){
|
||||
if(!(tile.block() instanceof ShieldBlock)){
|
||||
remove();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(){
|
||||
Graphics.surface("shield", false);
|
||||
Draw.color(Color.ROYAL);
|
||||
Draw.thick(2f);
|
||||
Draw.rect("circle2", (int)x + 0.5f, (int)y + 0.5f, 102f, 102f);
|
||||
Draw.reset();
|
||||
Graphics.surface();
|
||||
}
|
||||
/*
|
||||
@Override
|
||||
public void drawOver(){
|
||||
Graphics.surface("shield", false);
|
||||
Draw.thick(1f);
|
||||
Draw.color(Color.SKY);
|
||||
Draw.circle(x, y, ((Timers.time() + 50f) % 100f) / 2f);
|
||||
Draw.circle(x, y, (Timers.time() % 100f) / 2f);
|
||||
Draw.reset();
|
||||
Graphics.surface();
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public void added(){
|
||||
active = true;
|
||||
|
||||
@@ -44,6 +44,8 @@ public enum Recipe{
|
||||
coalpurifier(production, ProductionBlocks.coalpurifier, stack(Item.steel, 10), stack(Item.iron, 10)),
|
||||
titaniumpurifier(production, ProductionBlocks.titaniumpurifier, stack(Item.steel, 30), stack(Item.iron, 30)),
|
||||
omnidrill(production, ProductionBlocks.omnidrill, stack(Item.titanium, 10), stack(Item.dirium, 10)),
|
||||
coalgenerator(production, ProductionBlocks.coalgenerator, stack(Item.titanium, 10), stack(Item.dirium, 10)),
|
||||
shieldgenerator(production, WeaponBlocks.shieldgenerator, stack(Item.titanium, 10), stack(Item.dirium, 10)),
|
||||
|
||||
conduit(distribution, ProductionBlocks.conduit, stack(Item.steel, 1)),
|
||||
liquidrouter(distribution, ProductionBlocks.liquidrouter, stack(Item.steel, 2)),
|
||||
|
||||
@@ -65,7 +65,7 @@ public class Block{
|
||||
tile.entity.addItem(item, 1);
|
||||
}
|
||||
|
||||
public boolean accept(Item item, Tile dest, Tile source){
|
||||
public boolean acceptItem(Item item, Tile dest, Tile source){
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public class Block{
|
||||
|
||||
for(int j = 0; j < 4; j ++){
|
||||
Tile other = tiles[i];
|
||||
if(other != null && other.block().accept(item, other, tile)
|
||||
if(other != null && other.block().acceptItem(item, other, tile)
|
||||
//don't output to things facing this thing
|
||||
&& !(other.block().rotate && (other.rotation + 2) % 4 == i)){
|
||||
|
||||
@@ -123,7 +123,7 @@ public class Block{
|
||||
|
||||
if(todump != null && item != todump) continue;
|
||||
|
||||
if(tile.entity.hasItem(item) && other != null && other.block().accept(item, other, tile) &&
|
||||
if(tile.entity.hasItem(item) && other != null && other.block().acceptItem(item, other, tile) &&
|
||||
//don't output to things facing this thing
|
||||
!(other.block().rotate && (other.rotation + 2) % 4 == i)){
|
||||
other.block().handleItem(other, item, tile);
|
||||
@@ -144,7 +144,7 @@ public class Block{
|
||||
*/
|
||||
protected boolean offloadDir(Tile tile, Item item){
|
||||
Tile other = tile.getNearby()[tile.rotation];
|
||||
if(other != null && other.block().accept(item, other, tile)){
|
||||
if(other != null && other.block().acceptItem(item, other, tile)){
|
||||
other.block().handleItem(other, item, tile);
|
||||
//other.entity.addCovey(item, ch == 1 ? 0.5f : ch ==2 ? 1f : 0f);
|
||||
return true;
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ProductionBlocks{
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean accept(Item item, Tile dest, Tile source){
|
||||
public boolean acceptItem(Item item, Tile dest, Tile source){
|
||||
return true;
|
||||
}
|
||||
},
|
||||
@@ -75,12 +75,12 @@ public class ProductionBlocks{
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean accept(Item item, Tile dest, Tile source){
|
||||
public boolean acceptItem(Item item, Tile dest, Tile source){
|
||||
int dir = source.relativeTo(dest.x, dest.y);
|
||||
dir = (dir+4)%4;
|
||||
Tile to = dest.getNearby()[dir];
|
||||
//uncomment the junction bit to disable giving items to other junctions
|
||||
return to != null /*&& to.block() != junction*/ && to.block().accept(item, to, dest);
|
||||
return to != null /*&& to.block() != junction*/ && to.block().acceptItem(item, to, dest);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -199,7 +199,15 @@ public class ProductionBlocks{
|
||||
public String description(){
|
||||
return "Mines 1 of any resource every "+time+" seconds.";
|
||||
}
|
||||
}
|
||||
},
|
||||
coalgenerator = new ItemPowerGenerator("coalgenerator"){
|
||||
{
|
||||
//TODO
|
||||
generateItem = Item.stone;
|
||||
generateAmount = 4f;
|
||||
powerCapacity = 40f;
|
||||
}
|
||||
};
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
@@ -8,9 +8,7 @@ import io.anuke.mindustry.entities.effect.TeslaOrb;
|
||||
import io.anuke.mindustry.resource.Item;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.blocks.types.LaserTurret;
|
||||
import io.anuke.mindustry.world.blocks.types.RepairTurret;
|
||||
import io.anuke.mindustry.world.blocks.types.Turret;
|
||||
import io.anuke.mindustry.world.blocks.types.*;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.util.Angles;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
@@ -182,5 +180,9 @@ public class WeaponBlocks{
|
||||
reload = 20f;
|
||||
health = 90;
|
||||
}
|
||||
},
|
||||
|
||||
shieldgenerator = new ShieldBlock("shieldgenerator"){
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class Conveyor extends Block{
|
||||
ConveyorEntity entity = tile.entity();
|
||||
|
||||
Draw.rect(name() +
|
||||
(Timers.time() % ((20 / 100f) / speed) < (10 / 100f) / speed && accept(Item.stone, tile, null) ? "" : "move"), tile.worldx(), tile.worldy(), tile.rotation * 90);
|
||||
(Timers.time() % ((20 / 100f) / speed) < (10 / 100f) / speed && acceptItem(Item.stone, tile, null) ? "" : "move"), tile.worldx(), tile.worldy(), tile.rotation * 90);
|
||||
|
||||
for(ItemPos pos : entity.convey){
|
||||
Tmp.v1.set(tilesize, 0).rotate(tile.rotation * 90);
|
||||
@@ -94,7 +94,7 @@ public class Conveyor extends Block{
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean accept(Item item, Tile dest, Tile source){
|
||||
public boolean acceptItem(Item item, Tile dest, Tile source){
|
||||
int direction = source == null ? 0 : Math.abs(source.relativeTo(dest.x, dest.y) - dest.rotation);
|
||||
float minitem = dest.<ConveyorEntity>entity().minitem;
|
||||
return ((direction == 0) && minitem > 0.05f) ||
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Crafter extends Block{
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean accept(Item item, Tile dest, Tile source){
|
||||
public boolean acceptItem(Item item, Tile dest, Tile source){
|
||||
boolean craft = false;
|
||||
for(Item req : requirements){
|
||||
if(item == req){
|
||||
|
||||
@@ -1,9 +1,65 @@
|
||||
package io.anuke.mindustry.world.blocks.types;
|
||||
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.World;
|
||||
import io.anuke.ucore.core.Draw;
|
||||
|
||||
public class Generator extends PowerBlock{
|
||||
public static final int powerTime = 8;
|
||||
|
||||
public int powerRange = 6;
|
||||
public float powerSpeed = 1f;
|
||||
|
||||
public Generator(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void drawPixelOverlay(Tile tile){
|
||||
super.drawPixelOverlay(tile);
|
||||
|
||||
Draw.color("yellow");
|
||||
Draw.dashcircle(tile.worldx(), tile.worldy(), powerRange * Vars.tilesize);
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
protected void distributePower(Tile tile){
|
||||
PowerEntity p = tile.entity();
|
||||
//TODO have two phases, where it checks nearby blocks first, then distributes it evenly
|
||||
for(int x = -powerRange; x <= powerRange; x ++){
|
||||
for(int y = -powerRange; y <= powerRange; y ++){
|
||||
|
||||
if(x == 0 && y == 0){
|
||||
continue;
|
||||
}
|
||||
|
||||
if(p.power <= 0.0001f){
|
||||
return;
|
||||
}
|
||||
|
||||
if(Vector2.dst(x, y, 0, 0) < powerRange){
|
||||
Tile dest = World.tile(tile.x + x, tile.y + y);
|
||||
if(dest != null && dest.block() instanceof PowerAcceptor){
|
||||
PowerAcceptor block = (PowerAcceptor)dest.block();
|
||||
|
||||
float transmission = Math.min(powerSpeed, p.power);
|
||||
|
||||
if(p.power >= 0.0001f){
|
||||
float amount = block.addPower(dest, transmission);
|
||||
p.power -= amount;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//don't accept any power
|
||||
@Override
|
||||
public float addPower(Tile tile, float amount){
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package io.anuke.mindustry.world.blocks.types;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.entities.TileEntity;
|
||||
import io.anuke.mindustry.resource.Item;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.ucore.core.Effects;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
|
||||
public class ItemPowerGenerator extends Generator{
|
||||
public int itemCapacity = 20;
|
||||
public Item generateItem;
|
||||
public float generateAmount;
|
||||
|
||||
public ItemPowerGenerator(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawPixelOverlay(Tile tile){
|
||||
super.drawPixelOverlay(tile);
|
||||
|
||||
TileEntity entity = tile.entity;
|
||||
|
||||
//TODO maybe don't draw it due to clutter
|
||||
Vars.renderer.drawBar(Color.GREEN, tile.worldx(), tile.worldy() + 13 + 4, (float)entity.totalItems() / itemCapacity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean acceptItem(Item item, Tile tile, Tile source){
|
||||
return item == generateItem && tile.entity.totalItems() < itemCapacity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Tile tile){
|
||||
PowerEntity entity = tile.entity();
|
||||
|
||||
if(entity.hasItem(generateItem) && tryAddPower(tile, generateAmount)){
|
||||
Effects.effect("generate", tile.entity);
|
||||
entity.removeItem(generateItem, 1);
|
||||
}
|
||||
|
||||
if(Timers.get(tile, "power", powerTime)){
|
||||
distributePower(tile);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package io.anuke.mindustry.world.blocks.types;
|
||||
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
|
||||
public interface PowerAcceptor{
|
||||
/**Attempts to add some power to this block; returns the amount of power <i>not</i> accepted.*/
|
||||
public float addPower(Tile tile, float amount);
|
||||
}
|
||||
@@ -1,15 +1,75 @@
|
||||
package io.anuke.mindustry.world.blocks.types;
|
||||
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
public abstract class PowerBlock extends Block{
|
||||
public float powerCapacity;
|
||||
public float power;
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.entities.TileEntity;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
|
||||
public abstract class PowerBlock extends Block implements PowerAcceptor{
|
||||
public float powerCapacity = 10f;
|
||||
|
||||
public PowerBlock(String name) {
|
||||
super(name);
|
||||
update = true;
|
||||
solid = true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void drawPixelOverlay(Tile tile){
|
||||
PowerEntity entity = tile.entity();
|
||||
|
||||
float fract = (float)entity.power / powerCapacity;
|
||||
if(fract > 0)
|
||||
fract = Mathf.clamp(fract, 0.24f, 1f);
|
||||
|
||||
Vars.renderer.drawBar(Color.YELLOW, tile.worldx(), tile.worldy() + 13, fract);
|
||||
}
|
||||
|
||||
/**Tries adding all the power with no remainder, returns success.*/
|
||||
public boolean tryAddPower(Tile tile, float amount){
|
||||
PowerEntity entity = tile.entity();
|
||||
|
||||
if(entity.power + amount <= powerCapacity){
|
||||
entity.power += amount;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float addPower(Tile tile, float amount){
|
||||
PowerEntity entity = tile.entity();
|
||||
|
||||
float canAccept = Math.min(powerCapacity - entity.power, amount);
|
||||
|
||||
entity.power += canAccept;
|
||||
|
||||
return canAccept;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity getEntity(){
|
||||
return new PowerEntity();
|
||||
}
|
||||
|
||||
public static class PowerEntity extends TileEntity{
|
||||
public float power;
|
||||
|
||||
@Override
|
||||
public void write(DataOutputStream stream) throws IOException{
|
||||
stream.writeFloat(power);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(DataInputStream stream) throws IOException{
|
||||
power = stream.readFloat();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public class Purifier extends Conduit{
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean accept(Item item, Tile tile, Tile source){
|
||||
public boolean acceptItem(Item item, Tile tile, Tile source){
|
||||
TileEntity entity = tile.entity();
|
||||
return item == input && entity.items.get(item, 0) < itemCapacity;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class Router extends Block{
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean accept(Item item, Tile dest, Tile source){
|
||||
public boolean acceptItem(Item item, Tile dest, Tile source){
|
||||
int items = dest.entity.totalItems();
|
||||
return items < maxitems;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package io.anuke.mindustry.world.blocks.types;
|
||||
import io.anuke.mindustry.entities.TileEntity;
|
||||
import io.anuke.mindustry.entities.effect.Shield;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
|
||||
public class ShieldBlock extends PowerBlock{
|
||||
public float shieldRadius = 40f;
|
||||
@@ -18,20 +17,23 @@ public class ShieldBlock extends PowerBlock{
|
||||
ShieldEntity entity = tile.entity();
|
||||
|
||||
if(entity.shield == null){
|
||||
entity.shield = new Shield();
|
||||
entity.shield = new Shield(tile);
|
||||
entity.shield.add();
|
||||
}
|
||||
|
||||
if(power > powerDrain * Timers.delta()){
|
||||
/*
|
||||
if(entity.power > powerDrain * Timers.delta()){
|
||||
if(!entity.shield.active){
|
||||
entity.shield.add();
|
||||
}
|
||||
|
||||
power -= powerDrain * Timers.delta();
|
||||
entity.power -= powerDrain * Timers.delta();
|
||||
}else{
|
||||
if(entity.shield.active){
|
||||
entity.shield.remove();
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -39,7 +41,7 @@ public class ShieldBlock extends PowerBlock{
|
||||
return new ShieldEntity();
|
||||
}
|
||||
|
||||
static class ShieldEntity extends TileEntity{
|
||||
static class ShieldEntity extends PowerEntity{
|
||||
Shield shield;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public class Turret extends Block{
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean accept(Item item, Tile dest, Tile source){
|
||||
public boolean acceptItem(Item item, Tile dest, Tile source){
|
||||
return item == ammo && dest.<TurretEntity>entity().ammo < maxammo;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user