Mass renaming of blocks and units
This commit is contained in:
@@ -28,6 +28,7 @@ import io.anuke.ucore.util.Translator;
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public class Vars{
|
||||
public static final String discordURL = "https://discord.gg/mindustry";
|
||||
public static final String releasesURL = "https://api.github.com/repos/Anuken/Mindustry/releases";
|
||||
@@ -139,7 +140,6 @@ public class Vars{
|
||||
}
|
||||
|
||||
Arrays.sort(locales, (l1, l2) -> Platform.instance.getLocaleName(l1).compareTo(Platform.instance.getLocaleName(l2)));
|
||||
|
||||
Version.init();
|
||||
|
||||
content = new ContentLoader();
|
||||
|
||||
@@ -145,18 +145,18 @@ public class Recipes implements ContentList{
|
||||
//UNITS
|
||||
|
||||
//bodies
|
||||
new Recipe(units, UpgradeBlocks.dartFactory, new ItemStack(Items.lead, 150), new ItemStack(Items.copper, 150), new ItemStack(Items.silicon, 200), new ItemStack(Items.titanium, 240)).setDesktop(); //dart is desktop only, because it's the starter mobile ship
|
||||
new Recipe(units, UpgradeBlocks.tridentFactory, new ItemStack(Items.lead, 250), new ItemStack(Items.copper, 250), new ItemStack(Items.silicon, 250), new ItemStack(Items.titanium, 300), new ItemStack(Items.plastanium, 200));
|
||||
new Recipe(units, UpgradeBlocks.javelinFactory, new ItemStack(Items.lead, 350), new ItemStack(Items.silicon, 450), new ItemStack(Items.titanium, 500), new ItemStack(Items.plastanium, 400), new ItemStack(Items.phasematter, 200));
|
||||
new Recipe(units, UpgradeBlocks.glaiveFactory, new ItemStack(Items.lead, 450), new ItemStack(Items.silicon, 650), new ItemStack(Items.titanium, 700), new ItemStack(Items.plastanium, 600), new ItemStack(Items.surgealloy, 200));
|
||||
new Recipe(units, UpgradeBlocks.dartPad, new ItemStack(Items.lead, 150), new ItemStack(Items.copper, 150), new ItemStack(Items.silicon, 200), new ItemStack(Items.titanium, 240)).setDesktop(); //dart is desktop only, because it's the starter mobile ship
|
||||
new Recipe(units, UpgradeBlocks.tridentPad, new ItemStack(Items.lead, 250), new ItemStack(Items.copper, 250), new ItemStack(Items.silicon, 250), new ItemStack(Items.titanium, 300), new ItemStack(Items.plastanium, 200));
|
||||
new Recipe(units, UpgradeBlocks.javelinPad, new ItemStack(Items.lead, 350), new ItemStack(Items.silicon, 450), new ItemStack(Items.titanium, 500), new ItemStack(Items.plastanium, 400), new ItemStack(Items.phasematter, 200));
|
||||
new Recipe(units, UpgradeBlocks.glaivePad, new ItemStack(Items.lead, 450), new ItemStack(Items.silicon, 650), new ItemStack(Items.titanium, 700), new ItemStack(Items.plastanium, 600), new ItemStack(Items.surgealloy, 200));
|
||||
|
||||
new Recipe(units, UpgradeBlocks.tauFactory, new ItemStack(Items.lead, 250), new ItemStack(Items.densealloy, 250), new ItemStack(Items.copper, 250), new ItemStack(Items.silicon, 250)).setDesktop();
|
||||
new Recipe(units, UpgradeBlocks.deltaFactory, new ItemStack(Items.lead, 350), new ItemStack(Items.densealloy, 350), new ItemStack(Items.copper, 400), new ItemStack(Items.silicon, 450), new ItemStack(Items.thorium, 300)).setDesktop();
|
||||
new Recipe(units, UpgradeBlocks.omegaFactory, new ItemStack(Items.lead, 450), new ItemStack(Items.densealloy, 550), new ItemStack(Items.silicon, 650), new ItemStack(Items.thorium, 600), new ItemStack(Items.surgealloy, 240)).setDesktop();
|
||||
new Recipe(units, UpgradeBlocks.tauPad, new ItemStack(Items.lead, 250), new ItemStack(Items.densealloy, 250), new ItemStack(Items.copper, 250), new ItemStack(Items.silicon, 250)).setDesktop();
|
||||
new Recipe(units, UpgradeBlocks.deltaPad, new ItemStack(Items.lead, 350), new ItemStack(Items.densealloy, 350), new ItemStack(Items.copper, 400), new ItemStack(Items.silicon, 450), new ItemStack(Items.thorium, 300)).setDesktop();
|
||||
new Recipe(units, UpgradeBlocks.omegaPad, new ItemStack(Items.lead, 450), new ItemStack(Items.densealloy, 550), new ItemStack(Items.silicon, 650), new ItemStack(Items.thorium, 600), new ItemStack(Items.surgealloy, 240)).setDesktop();
|
||||
|
||||
//actual unit related stuff
|
||||
new Recipe(units, UnitBlocks.dronePad, new ItemStack(Items.copper, 70), new ItemStack(Items.lead, 110), new ItemStack(Items.silicon, 130));
|
||||
new Recipe(units, UnitBlocks.fabricatorPad, new ItemStack(Items.densealloy, 90), new ItemStack(Items.thorium, 80), new ItemStack(Items.lead, 110), new ItemStack(Items.silicon, 210));
|
||||
new Recipe(units, UnitBlocks.spiritPad, new ItemStack(Items.copper, 70), new ItemStack(Items.lead, 110), new ItemStack(Items.silicon, 130));
|
||||
new Recipe(units, UnitBlocks.phantomPad, new ItemStack(Items.densealloy, 90), new ItemStack(Items.thorium, 80), new ItemStack(Items.lead, 110), new ItemStack(Items.silicon, 210));
|
||||
|
||||
new Recipe(units, UnitBlocks.daggerPad, new ItemStack(Items.lead, 90), new ItemStack(Items.silicon, 70));
|
||||
new Recipe(units, UnitBlocks.titanPad, new ItemStack(Items.thorium, 90), new ItemStack(Items.lead, 140), new ItemStack(Items.silicon, 90));
|
||||
|
||||
@@ -8,20 +8,14 @@ import io.anuke.mindustry.game.ContentList;
|
||||
import io.anuke.mindustry.type.ContentType;
|
||||
|
||||
public class UnitTypes implements ContentList{
|
||||
public static UnitType drone, alphaDrone, dagger, wraith, monsoon, revenant, titan, fortress, fabricator;
|
||||
public static UnitType
|
||||
spirit, phantom,
|
||||
alphaDrone,
|
||||
wraith, ghoul, revenant,
|
||||
dagger, titan, fortress;
|
||||
|
||||
@Override
|
||||
public void load(){
|
||||
drone = new UnitType("drone", Drone.class, Drone::new){{
|
||||
isFlying = true;
|
||||
drag = 0.01f;
|
||||
speed = 0.2f;
|
||||
maxVelocity = 0.8f;
|
||||
range = 50f;
|
||||
healSpeed = 0.25f;
|
||||
health = 60;
|
||||
}};
|
||||
|
||||
alphaDrone = new UnitType("alpha-drone", AlphaDrone.class, AlphaDrone::new){
|
||||
{
|
||||
isFlying = true;
|
||||
@@ -40,6 +34,16 @@ public class UnitTypes implements ContentList{
|
||||
}
|
||||
};
|
||||
|
||||
spirit = new UnitType("spirit", Spirit.class, Spirit::new){{
|
||||
isFlying = true;
|
||||
drag = 0.01f;
|
||||
speed = 0.2f;
|
||||
maxVelocity = 0.8f;
|
||||
range = 50f;
|
||||
healSpeed = 0.25f;
|
||||
health = 60;
|
||||
}};
|
||||
|
||||
dagger = new UnitType("dagger", Dagger.class, Dagger::new){{
|
||||
maxVelocity = 1.1f;
|
||||
speed = 0.2f;
|
||||
@@ -76,7 +80,7 @@ public class UnitTypes implements ContentList{
|
||||
health = 70;
|
||||
}};
|
||||
|
||||
monsoon = new UnitType("monsoon", Monsoon.class, Monsoon::new){{
|
||||
ghoul = new UnitType("ghoul", Ghoul.class, Ghoul::new){{
|
||||
health = 250;
|
||||
speed = 0.2f;
|
||||
maxVelocity = 1.4f;
|
||||
@@ -94,7 +98,7 @@ public class UnitTypes implements ContentList{
|
||||
weapon = Weapons.bomber;
|
||||
}};
|
||||
|
||||
fabricator = new UnitType("fabricator", Fabricator.class, Fabricator::new){{
|
||||
phantom = new UnitType("phantom", Phantom.class, Phantom::new){{
|
||||
isFlying = true;
|
||||
drag = 0.01f;
|
||||
speed = 0.2f;
|
||||
|
||||
@@ -8,29 +8,31 @@ import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.blocks.units.*;
|
||||
|
||||
public class UnitBlocks extends BlockList implements ContentList{
|
||||
public static Block repairPoint, dronePad,
|
||||
fabricatorPad, interceptorPad, monsoonPad, daggerPad, titanPad,
|
||||
reconstructor, commandCenter;
|
||||
public static Block
|
||||
spiritPad, phantomPad,
|
||||
interceptorPad, monsoonPad, revenantPad,
|
||||
daggerPad, titanPad,
|
||||
reconstructor, repairPoint, commandCenter;
|
||||
|
||||
@Override
|
||||
public void load(){
|
||||
dronePad = new UnitPad("drone-pad"){{
|
||||
type = UnitTypes.drone;
|
||||
spiritPad = new UnitFactory("spirit-factory"){{
|
||||
type = UnitTypes.spirit;
|
||||
produceTime = 5700;
|
||||
size = 2;
|
||||
consumes.power(0.08f);
|
||||
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 30), new ItemStack(Items.lead, 30)});
|
||||
}};
|
||||
|
||||
fabricatorPad = new UnitPad("fabricator-pad"){{
|
||||
type = UnitTypes.fabricator;
|
||||
phantomPad = new UnitFactory("phantom-factory"){{
|
||||
type = UnitTypes.phantom;
|
||||
produceTime = 7300;
|
||||
size = 2;
|
||||
consumes.power(0.2f);
|
||||
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 70), new ItemStack(Items.lead, 80), new ItemStack(Items.titanium, 80)});
|
||||
}};
|
||||
|
||||
interceptorPad = new UnitPad("wraith-pad"){{
|
||||
interceptorPad = new UnitFactory("wraith-factory"){{
|
||||
type = UnitTypes.wraith;
|
||||
produceTime = 1800;
|
||||
size = 2;
|
||||
@@ -38,8 +40,8 @@ public class UnitBlocks extends BlockList implements ContentList{
|
||||
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 10), new ItemStack(Items.titanium, 10)});
|
||||
}};
|
||||
|
||||
monsoonPad = new UnitPad("monsoon-pad"){{
|
||||
type = UnitTypes.monsoon;
|
||||
monsoonPad = new UnitFactory("ghoul-factory"){{
|
||||
type = UnitTypes.ghoul;
|
||||
produceTime = 3600;
|
||||
size = 3;
|
||||
consumes.power(0.2f);
|
||||
@@ -47,7 +49,16 @@ public class UnitBlocks extends BlockList implements ContentList{
|
||||
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 30), new ItemStack(Items.titanium, 30), new ItemStack(Items.plastanium, 20)});
|
||||
}};
|
||||
|
||||
daggerPad = new UnitPad("dagger-pad"){{
|
||||
revenantPad = new UnitFactory("revenant-factory"){{
|
||||
type = UnitTypes.revenant;
|
||||
produceTime = 3600;
|
||||
size = 4;
|
||||
consumes.power(0.2f);
|
||||
shadow = "shadow-round-3";
|
||||
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 30), new ItemStack(Items.titanium, 30), new ItemStack(Items.plastanium, 20)});
|
||||
}};
|
||||
|
||||
daggerPad = new UnitFactory("dagger-factory"){{
|
||||
type = UnitTypes.dagger;
|
||||
produceTime = 1700;
|
||||
size = 2;
|
||||
@@ -55,7 +66,7 @@ public class UnitBlocks extends BlockList implements ContentList{
|
||||
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 10), new ItemStack(Items.copper, 10)});
|
||||
}};
|
||||
|
||||
titanPad = new UnitPad("titan-pad"){{
|
||||
titanPad = new UnitFactory("titan-factory"){{
|
||||
type = UnitTypes.titan;
|
||||
produceTime = 3400;
|
||||
size = 3;
|
||||
|
||||
@@ -2,53 +2,53 @@ package io.anuke.mindustry.content.blocks;
|
||||
|
||||
import io.anuke.mindustry.content.Mechs;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.blocks.units.MechFactory;
|
||||
import io.anuke.mindustry.world.blocks.units.MechPad;
|
||||
|
||||
public class UpgradeBlocks extends BlockList{
|
||||
public static Block deltaFactory, tauFactory, omegaFactory, dartFactory, javelinFactory, tridentFactory, glaiveFactory;
|
||||
public static Block deltaPad, tauPad, omegaPad, dartPad, javelinPad, tridentPad, glaivePad;
|
||||
|
||||
@Override
|
||||
public void load(){
|
||||
deltaFactory = new MechFactory("delta-mech-factory"){{
|
||||
deltaPad = new MechPad("delta-mech-pad"){{
|
||||
mech = Mechs.delta;
|
||||
size = 2;
|
||||
powerCapacity = 70f;
|
||||
}};
|
||||
|
||||
tauFactory = new MechFactory("tau-mech-factory"){{
|
||||
tauPad = new MechPad("tau-mech-pad"){{
|
||||
mech = Mechs.tau;
|
||||
size = 2;
|
||||
powerCapacity = 100f;
|
||||
}};
|
||||
|
||||
omegaFactory = new MechFactory("omega-mech-factory"){{
|
||||
omegaPad = new MechPad("omega-mech-pad"){{
|
||||
mech = Mechs.omega;
|
||||
size = 3;
|
||||
powerCapacity = 120f;
|
||||
}};
|
||||
|
||||
dartFactory = new MechFactory("dart-ship-factory"){{
|
||||
dartPad = new MechPad("dart-ship-pad"){{
|
||||
mech = Mechs.dart;
|
||||
size = 2;
|
||||
powerCapacity = 50f;
|
||||
shadow = "shadow-rounded-2";
|
||||
}};
|
||||
|
||||
javelinFactory = new MechFactory("javelin-ship-factory"){{
|
||||
javelinPad = new MechPad("javelin-ship-pad"){{
|
||||
mech = Mechs.javelin;
|
||||
size = 2;
|
||||
powerCapacity = 80f;
|
||||
shadow = "shadow-rounded-2";
|
||||
}};
|
||||
|
||||
tridentFactory = new MechFactory("trident-ship-factory"){{
|
||||
tridentPad = new MechPad("trident-ship-pad"){{
|
||||
mech = Mechs.trident;
|
||||
size = 2;
|
||||
powerCapacity = 100f;
|
||||
shadow = "shadow-rounded-2";
|
||||
}};
|
||||
|
||||
glaiveFactory = new MechFactory("glaive-ship-factory"){{
|
||||
glaivePad = new MechPad("glaive-ship-pad"){{
|
||||
mech = Mechs.glaive;
|
||||
size = 3;
|
||||
powerCapacity = 120f;
|
||||
|
||||
@@ -201,6 +201,9 @@ public class ContentLoader{
|
||||
if(id < 0) id += 256;
|
||||
|
||||
if(temporaryMapper != null && temporaryMapper[type.ordinal()] != null && temporaryMapper[type.ordinal()].length != 0){
|
||||
if(temporaryMapper[type.ordinal()][id] == null){
|
||||
return getByID(type, 0); //default value is always ID 0
|
||||
}
|
||||
return (T)temporaryMapper[type.ordinal()][id];
|
||||
}
|
||||
|
||||
|
||||
@@ -290,10 +290,6 @@ public class Renderer extends RendererModule{
|
||||
|
||||
float trnsX = -12, trnsY = -13;
|
||||
|
||||
//Graphics.end();
|
||||
//Core.batch.getTransformMatrix().translate(trnsX, trnsY, 0);
|
||||
//Graphics.begin();
|
||||
|
||||
for(EntityGroup<? extends BaseUnit> group : unitGroups){
|
||||
if(!group.isEmpty()){
|
||||
drawAndInterpolate(group, unit -> unit.isFlying() && !unit.isDead(), baseUnit -> baseUnit.drawShadow(trnsX, trnsY));
|
||||
@@ -304,11 +300,6 @@ public class Renderer extends RendererModule{
|
||||
drawAndInterpolate(playerGroup, unit -> unit.isFlying() && !unit.isDead(), player -> player.drawShadow(trnsX, trnsY));
|
||||
}
|
||||
|
||||
//Graphics.end();
|
||||
//Core.batch.getTransformMatrix().translate(-trnsX, -trnsY, 0);
|
||||
//Graphics.begin();
|
||||
|
||||
//TODO this actually isn't necessary
|
||||
Draw.color(0, 0, 0, 0.15f);
|
||||
Graphics.flushSurface();
|
||||
Draw.color();
|
||||
|
||||
@@ -136,11 +136,13 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
||||
public void update(){
|
||||
super.update();
|
||||
|
||||
updateRotation();
|
||||
if(!Net.client()){
|
||||
updateRotation();
|
||||
wobble();
|
||||
}
|
||||
|
||||
trail.update(x + Angles.trnsx(rotation + 180f, 6f) + Mathf.range(wobblyness),
|
||||
y + Angles.trnsy(rotation + 180f, 6f) + Mathf.range(wobblyness));
|
||||
|
||||
wobble();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -185,11 +187,11 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
||||
protected void wobble(){
|
||||
if(Net.client()) return;
|
||||
|
||||
x += Mathf.sin(Timers.time() + id * 999, 25f, 0.07f)*Timers.delta();
|
||||
y += Mathf.cos(Timers.time() + id * 999, 25f, 0.07f)*Timers.delta();
|
||||
x += Mathf.sin(Timers.time() + id * 999, 25f, 0.08f)*Timers.delta();
|
||||
y += Mathf.cos(Timers.time() + id * 999, 25f, 0.08f)*Timers.delta();
|
||||
|
||||
if(velocity.len() <= 0.05f){
|
||||
rotation += Mathf.sin(Timers.time() + id * 99, 10f, 5f)*Timers.delta();
|
||||
rotation += Mathf.sin(Timers.time() + id * 99, 10f, 2.5f)*Timers.delta();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ import io.anuke.ucore.core.Effects;
|
||||
import io.anuke.ucore.core.Events;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.entities.EntityGroup;
|
||||
import io.anuke.ucore.entities.EntityPhysics;
|
||||
import io.anuke.ucore.graphics.Draw;
|
||||
import io.anuke.ucore.graphics.Shapes;
|
||||
import io.anuke.ucore.util.Angles;
|
||||
|
||||
@@ -2,6 +2,6 @@ package io.anuke.mindustry.entities.units.types;
|
||||
|
||||
import io.anuke.mindustry.entities.units.FlyingUnit;
|
||||
|
||||
public class Monsoon extends FlyingUnit{
|
||||
public class Ghoul extends FlyingUnit{
|
||||
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
package io.anuke.mindustry.entities.units.types;
|
||||
|
||||
public class Fabricator extends Drone{
|
||||
public class Phantom extends Drone{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package io.anuke.mindustry.entities.units.types;
|
||||
|
||||
public class Spirit extends Drone{
|
||||
}
|
||||
@@ -116,7 +116,7 @@ public class Waves{
|
||||
end = 130;
|
||||
}},
|
||||
|
||||
new SpawnGroup(UnitTypes.monsoon){{
|
||||
new SpawnGroup(UnitTypes.ghoul){{
|
||||
begin = 40;
|
||||
unitAmount = 2;
|
||||
spacing = 2;
|
||||
@@ -134,7 +134,7 @@ public class Waves{
|
||||
max = 8;
|
||||
}},
|
||||
|
||||
new SpawnGroup(UnitTypes.monsoon){{
|
||||
new SpawnGroup(UnitTypes.ghoul){{
|
||||
begin = 53;
|
||||
unitAmount = 2;
|
||||
unitScaling = 3;
|
||||
@@ -143,7 +143,7 @@ public class Waves{
|
||||
end = 74;
|
||||
}},
|
||||
|
||||
new SpawnGroup(UnitTypes.monsoon){{
|
||||
new SpawnGroup(UnitTypes.ghoul){{
|
||||
begin = 53;
|
||||
unitAmount = 2;
|
||||
unitScaling = 3;
|
||||
|
||||
@@ -27,7 +27,7 @@ import io.anuke.mindustry.world.blocks.production.Drill;
|
||||
import io.anuke.mindustry.world.blocks.production.Pump;
|
||||
import io.anuke.mindustry.world.blocks.storage.CoreBlock;
|
||||
import io.anuke.mindustry.world.blocks.storage.StorageBlock;
|
||||
import io.anuke.mindustry.world.blocks.units.UnitPad;
|
||||
import io.anuke.mindustry.world.blocks.units.UnitFactory;
|
||||
import io.anuke.mindustry.world.consumers.ConsumePower;
|
||||
import io.anuke.ucore.function.BiFunction;
|
||||
import io.anuke.ucore.function.IntPositionConsumer;
|
||||
@@ -206,7 +206,7 @@ public class FortressGenerator{
|
||||
Tile tile = gen.tile(x + point.x, y + point.y);
|
||||
if(tile != null){
|
||||
tile = tile.target();
|
||||
if(tile.getTeamID() == team.ordinal() && !(tile.block() instanceof Wall) && !(tile.block() instanceof UnitPad)){
|
||||
if(tile.getTeamID() == team.ordinal() && !(tile.block() instanceof Wall) && !(tile.block() instanceof UnitFactory)){
|
||||
gen.setBlock(x, y, wall, team);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ import static io.anuke.mindustry.Vars.unitGroups;
|
||||
|
||||
public class CoreBlock extends StorageBlock{
|
||||
protected float droneRespawnDuration = 60 * 6;
|
||||
protected UnitType droneType = UnitTypes.drone;
|
||||
protected UnitType droneType = UnitTypes.spirit;
|
||||
|
||||
protected TextureRegion openRegion;
|
||||
protected TextureRegion topRegion;
|
||||
|
||||
@@ -34,13 +34,13 @@ import java.io.IOException;
|
||||
import static io.anuke.mindustry.Vars.mobile;
|
||||
import static io.anuke.mindustry.Vars.tilesize;
|
||||
|
||||
public class MechFactory extends Block{
|
||||
public class MechPad extends Block{
|
||||
protected Mech mech;
|
||||
protected float buildTime = 60 * 5;
|
||||
|
||||
protected TextureRegion openRegion;
|
||||
|
||||
public MechFactory(String name){
|
||||
public MechPad(String name){
|
||||
super(name);
|
||||
update = true;
|
||||
solidifes = true;
|
||||
@@ -83,7 +83,7 @@ public class MechFactory extends Block{
|
||||
|
||||
if(entity.player == null) return;
|
||||
|
||||
Mech result = ((MechFactory) tile.block()).mech;
|
||||
Mech result = ((MechPad) tile.block()).mech;
|
||||
|
||||
if(entity.player.mech == result){
|
||||
entity.player.mech = (entity.player.isMobile ? Mechs.starterMobile : Mechs.starterDesktop);
|
||||
@@ -34,7 +34,7 @@ import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
public class UnitPad extends Block{
|
||||
public class UnitFactory extends Block{
|
||||
protected float gracePeriodMultiplier = 23f;
|
||||
protected float speedupTime = 60f * 60f * 20;
|
||||
protected float maxSpeedup = 2f;
|
||||
@@ -44,7 +44,7 @@ public class UnitPad extends Block{
|
||||
protected float launchVelocity = 0f;
|
||||
protected TextureRegion topRegion;
|
||||
|
||||
public UnitPad(String name){
|
||||
public UnitFactory(String name){
|
||||
super(name);
|
||||
update = true;
|
||||
hasPower = true;
|
||||
@@ -58,10 +58,10 @@ public class UnitPad extends Block{
|
||||
|
||||
@Remote(called = Loc.server)
|
||||
public static void onUnitFactorySpawn(Tile tile){
|
||||
if(!(tile.entity instanceof UnitFactoryEntity) || !(tile.block() instanceof UnitPad)) return;
|
||||
if(!(tile.entity instanceof UnitFactoryEntity) || !(tile.block() instanceof UnitFactory)) return;
|
||||
|
||||
UnitFactoryEntity entity = tile.entity();
|
||||
UnitPad factory = (UnitPad) tile.block();
|
||||
UnitFactory factory = (UnitFactory) tile.block();
|
||||
|
||||
entity.buildTime = 0f;
|
||||
|
||||
Reference in New Issue
Block a user