Mass renaming of blocks and units

This commit is contained in:
Anuken 2018-09-16 19:48:15 -04:00
parent 5e7ca0374c
commit 8946af4831
57 changed files with 1180 additions and 1113 deletions

View File

Before

Width:  |  Height:  |  Size: 208 B

After

Width:  |  Height:  |  Size: 208 B

View File

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

View File

Before

Width:  |  Height:  |  Size: 292 B

After

Width:  |  Height:  |  Size: 292 B

View File

Before

Width:  |  Height:  |  Size: 208 B

After

Width:  |  Height:  |  Size: 208 B

View File

Before

Width:  |  Height:  |  Size: 283 B

After

Width:  |  Height:  |  Size: 283 B

View File

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

View File

Before

Width:  |  Height:  |  Size: 210 B

After

Width:  |  Height:  |  Size: 210 B

View File

Before

Width:  |  Height:  |  Size: 232 B

After

Width:  |  Height:  |  Size: 232 B

View File

Before

Width:  |  Height:  |  Size: 230 B

After

Width:  |  Height:  |  Size: 230 B

View File

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 140 B

View File

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 178 B

View File

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 170 B

View File

Before

Width:  |  Height:  |  Size: 543 B

After

Width:  |  Height:  |  Size: 543 B

View File

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 178 B

View File

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 170 B

View File

Before

Width:  |  Height:  |  Size: 298 B

After

Width:  |  Height:  |  Size: 298 B

View File

Before

Width:  |  Height:  |  Size: 196 B

After

Width:  |  Height:  |  Size: 196 B

View File

Before

Width:  |  Height:  |  Size: 208 B

After

Width:  |  Height:  |  Size: 208 B

View File

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 140 B

View File

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 178 B

View File

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 170 B

View File

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 295 B

View File

Before

Width:  |  Height:  |  Size: 185 B

After

Width:  |  Height:  |  Size: 185 B

View File

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 175 B

View File

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

View File

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 234 B

View File

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 234 B

View File

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 140 B

View File

Before

Width:  |  Height:  |  Size: 245 B

After

Width:  |  Height:  |  Size: 245 B

View File

Before

Width:  |  Height:  |  Size: 204 B

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 B

After

Width:  |  Height:  |  Size: 687 B

View File

Before

Width:  |  Height:  |  Size: 182 B

After

Width:  |  Height:  |  Size: 182 B

View File

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

View File

@ -561,13 +561,13 @@ block.pneumatic-drill.name=Pneumatic Drill
block.laser-drill.name=Laser Drill block.laser-drill.name=Laser Drill
block.water-extractor.name=Water Extractor block.water-extractor.name=Water Extractor
block.cultivator.name=Cultivator block.cultivator.name=Cultivator
block.dart-ship-factory.name=Dart Ship Reconstructor block.dart-ship-pad.name=Dart Ship Pad
block.delta-mech-factory.name=Delta Mech Reconstructor block.delta-mech-pad.name=Delta Mech Pad
block.javelin-ship-factory.name=Javelin Ship Reconstructor block.javelin-ship-pad.name=Javelin Ship Pad
block.trident-ship-factory.name=Trident Ship Reconstructor block.trident-ship-pad.name=Trident Ship Pad
block.glaive-ship-factory.name=Glaive Ship Reconstructor block.glaive-ship-pad.name=Glaive Ship Pad
block.omega-mech-factory.name=Omega Mech Reconstructor block.omega-mech-pad.name=Omega Mech Pad
block.tau-mech-factory.name=Tau Mech Reconstructor block.tau-mech-pad.name=Tau Mech Pad
block.repairpoint.name=Repair Point block.repairpoint.name=Repair Point
block.resupplypoint.name=Resupply Point block.resupplypoint.name=Resupply Point
block.conduit.name=Conduit block.conduit.name=Conduit
@ -598,10 +598,12 @@ block.solidifer.name=Solidifer
block.solar-panel.name=Solar Panel block.solar-panel.name=Solar Panel
block.solar-panel-large.name=Large Solar Panel block.solar-panel-large.name=Large Solar Panel
block.oil-extractor.name=Oil Extractor block.oil-extractor.name=Oil Extractor
block.drone-pad.name=Drone Pad block.spirit-factory.name=Spirit Drone Pad
block.fabricator-pad.name=Fabricator Pad block.phantom-factory.name=Phantom Drone Pad
block.interceptor-pad.name=Interceptor Pad block.wraith-factory.name=Wraith Fighter Pad
block.monsoon-pad.name=Monsoon Pad block.ghoul-factory.name=Ghoul Bomber Pad
block.dagger-factory.name=Dagger Pad
block.titan-factory.name=Titan Pad
block.repair-point.name=Repair Point block.repair-point.name=Repair Point
block.resupply-point.name=Resupply Point block.resupply-point.name=Resupply Point
block.pulse-conduit.name=Pulse Conduit block.pulse-conduit.name=Pulse Conduit
@ -616,8 +618,6 @@ block.command-center.name=Command Center
block.mass-driver.name=Mass Driver block.mass-driver.name=Mass Driver
block.blast-drill.name=Blast Drill block.blast-drill.name=Blast Drill
block.thermal-pump.name=Thermal Pump block.thermal-pump.name=Thermal Pump
block.dagger-pad.name=Dagger Pad
block.titan-pad.name=Titan Pad
block.thermal-generator.name=Thermal Generator block.thermal-generator.name=Thermal Generator
block.alloy-smelter.name=Alloy Smelter block.alloy-smelter.name=Alloy Smelter
block.mend-projector.name=Mend Projector block.mend-projector.name=Mend Projector
@ -634,15 +634,19 @@ block.spectre.name=Spectre
block.meltdown.name=Meltdown block.meltdown.name=Meltdown
unit.alpha-drone.name=Alpha Drone unit.alpha-drone.name=Alpha Drone
unit.drone.name=Drone unit.spirit.name=Spirit Drone
unit.drone.description=The starter drone unit. Spawns in the core by default. Automatically mines ores, collects items and repairs blocks. unit.spirit.description=The starter drone unit. Spawns in the core by default. Automatically mines ores, collects items and repairs blocks.
unit.fabricator.name=Fabricator unit.phantom.name=Phantom Drone
unit.fabricator.description=An advanced drone unit. Automatically mines ores, collects items and repairs blocks. Significantly more effective than a drone. unit.phantom.description=An advanced drone unit. Automatically mines ores, collects items and repairs blocks. Significantly more effective than a drone.
unit.dagger.name=Dagger unit.dagger.name=Dagger
unit.dagger.description=A basic ground unit. Useful in swarms. unit.dagger.description=A basic ground unit. Useful in swarms.
unit.titan.name=Titan unit.titan.name=Titan
unit.titan.description=An advanced, armored ground unit. Attacks both ground and air targets. unit.titan.description=An advanced, armored ground unit. Attacks both ground and air targets.
unit.monsoon.name=Monsoon unit.ghoul.name=Ghoul Bomber
unit.monsoon.description=A heavy carpet bomber. Uses blast compound or pyratite as ammo. unit.ghoul.description=A heavy carpet bomber. Uses blast compound or pyratite as ammo.
unit.interceptor.name=Interceptor unit.wraith.name=Wraith Fighter
unit.interceptor.description=A fast, hit-and-run strike unit. unit.wraith.description=A fast, hit-and-run interceptor unit.
unit.fortress.name=Fortress
unit.fortress.description=A heavy artillery ground unit.
unit.revenant.name=Revenant
unit.revenant.description=A heavy laser platform.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 100 KiB

View File

@ -28,6 +28,7 @@ import io.anuke.ucore.util.Translator;
import java.util.Arrays; import java.util.Arrays;
import java.util.Locale; import java.util.Locale;
@SuppressWarnings("unchecked")
public class Vars{ public class Vars{
public static final String discordURL = "https://discord.gg/mindustry"; public static final String discordURL = "https://discord.gg/mindustry";
public static final String releasesURL = "https://api.github.com/repos/Anuken/Mindustry/releases"; 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))); Arrays.sort(locales, (l1, l2) -> Platform.instance.getLocaleName(l1).compareTo(Platform.instance.getLocaleName(l2)));
Version.init(); Version.init();
content = new ContentLoader(); content = new ContentLoader();

View File

@ -145,18 +145,18 @@ public class Recipes implements ContentList{
//UNITS //UNITS
//bodies //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.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.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.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.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.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.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.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.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.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.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.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.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 //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.spiritPad, 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.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.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)); new Recipe(units, UnitBlocks.titanPad, new ItemStack(Items.thorium, 90), new ItemStack(Items.lead, 140), new ItemStack(Items.silicon, 90));

View File

@ -8,20 +8,14 @@ import io.anuke.mindustry.game.ContentList;
import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.type.ContentType;
public class UnitTypes implements ContentList{ 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 @Override
public void load(){ 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){ alphaDrone = new UnitType("alpha-drone", AlphaDrone.class, AlphaDrone::new){
{ {
isFlying = true; 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){{ dagger = new UnitType("dagger", Dagger.class, Dagger::new){{
maxVelocity = 1.1f; maxVelocity = 1.1f;
speed = 0.2f; speed = 0.2f;
@ -76,7 +80,7 @@ public class UnitTypes implements ContentList{
health = 70; health = 70;
}}; }};
monsoon = new UnitType("monsoon", Monsoon.class, Monsoon::new){{ ghoul = new UnitType("ghoul", Ghoul.class, Ghoul::new){{
health = 250; health = 250;
speed = 0.2f; speed = 0.2f;
maxVelocity = 1.4f; maxVelocity = 1.4f;
@ -94,7 +98,7 @@ public class UnitTypes implements ContentList{
weapon = Weapons.bomber; weapon = Weapons.bomber;
}}; }};
fabricator = new UnitType("fabricator", Fabricator.class, Fabricator::new){{ phantom = new UnitType("phantom", Phantom.class, Phantom::new){{
isFlying = true; isFlying = true;
drag = 0.01f; drag = 0.01f;
speed = 0.2f; speed = 0.2f;

View File

@ -8,29 +8,31 @@ import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.blocks.units.*; import io.anuke.mindustry.world.blocks.units.*;
public class UnitBlocks extends BlockList implements ContentList{ public class UnitBlocks extends BlockList implements ContentList{
public static Block repairPoint, dronePad, public static Block
fabricatorPad, interceptorPad, monsoonPad, daggerPad, titanPad, spiritPad, phantomPad,
reconstructor, commandCenter; interceptorPad, monsoonPad, revenantPad,
daggerPad, titanPad,
reconstructor, repairPoint, commandCenter;
@Override @Override
public void load(){ public void load(){
dronePad = new UnitPad("drone-pad"){{ spiritPad = new UnitFactory("spirit-factory"){{
type = UnitTypes.drone; type = UnitTypes.spirit;
produceTime = 5700; produceTime = 5700;
size = 2; size = 2;
consumes.power(0.08f); consumes.power(0.08f);
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 30), new ItemStack(Items.lead, 30)}); consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 30), new ItemStack(Items.lead, 30)});
}}; }};
fabricatorPad = new UnitPad("fabricator-pad"){{ phantomPad = new UnitFactory("phantom-factory"){{
type = UnitTypes.fabricator; type = UnitTypes.phantom;
produceTime = 7300; produceTime = 7300;
size = 2; size = 2;
consumes.power(0.2f); consumes.power(0.2f);
consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 70), new ItemStack(Items.lead, 80), new ItemStack(Items.titanium, 80)}); 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; type = UnitTypes.wraith;
produceTime = 1800; produceTime = 1800;
size = 2; 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)}); consumes.items(new ItemStack[]{new ItemStack(Items.silicon, 10), new ItemStack(Items.titanium, 10)});
}}; }};
monsoonPad = new UnitPad("monsoon-pad"){{ monsoonPad = new UnitFactory("ghoul-factory"){{
type = UnitTypes.monsoon; type = UnitTypes.ghoul;
produceTime = 3600; produceTime = 3600;
size = 3; size = 3;
consumes.power(0.2f); 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)}); 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; type = UnitTypes.dagger;
produceTime = 1700; produceTime = 1700;
size = 2; 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)}); 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; type = UnitTypes.titan;
produceTime = 3400; produceTime = 3400;
size = 3; size = 3;

View File

@ -2,53 +2,53 @@ package io.anuke.mindustry.content.blocks;
import io.anuke.mindustry.content.Mechs; import io.anuke.mindustry.content.Mechs;
import io.anuke.mindustry.world.Block; 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 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 @Override
public void load(){ public void load(){
deltaFactory = new MechFactory("delta-mech-factory"){{ deltaPad = new MechPad("delta-mech-pad"){{
mech = Mechs.delta; mech = Mechs.delta;
size = 2; size = 2;
powerCapacity = 70f; powerCapacity = 70f;
}}; }};
tauFactory = new MechFactory("tau-mech-factory"){{ tauPad = new MechPad("tau-mech-pad"){{
mech = Mechs.tau; mech = Mechs.tau;
size = 2; size = 2;
powerCapacity = 100f; powerCapacity = 100f;
}}; }};
omegaFactory = new MechFactory("omega-mech-factory"){{ omegaPad = new MechPad("omega-mech-pad"){{
mech = Mechs.omega; mech = Mechs.omega;
size = 3; size = 3;
powerCapacity = 120f; powerCapacity = 120f;
}}; }};
dartFactory = new MechFactory("dart-ship-factory"){{ dartPad = new MechPad("dart-ship-pad"){{
mech = Mechs.dart; mech = Mechs.dart;
size = 2; size = 2;
powerCapacity = 50f; powerCapacity = 50f;
shadow = "shadow-rounded-2"; shadow = "shadow-rounded-2";
}}; }};
javelinFactory = new MechFactory("javelin-ship-factory"){{ javelinPad = new MechPad("javelin-ship-pad"){{
mech = Mechs.javelin; mech = Mechs.javelin;
size = 2; size = 2;
powerCapacity = 80f; powerCapacity = 80f;
shadow = "shadow-rounded-2"; shadow = "shadow-rounded-2";
}}; }};
tridentFactory = new MechFactory("trident-ship-factory"){{ tridentPad = new MechPad("trident-ship-pad"){{
mech = Mechs.trident; mech = Mechs.trident;
size = 2; size = 2;
powerCapacity = 100f; powerCapacity = 100f;
shadow = "shadow-rounded-2"; shadow = "shadow-rounded-2";
}}; }};
glaiveFactory = new MechFactory("glaive-ship-factory"){{ glaivePad = new MechPad("glaive-ship-pad"){{
mech = Mechs.glaive; mech = Mechs.glaive;
size = 3; size = 3;
powerCapacity = 120f; powerCapacity = 120f;

View File

@ -201,6 +201,9 @@ public class ContentLoader{
if(id < 0) id += 256; if(id < 0) id += 256;
if(temporaryMapper != null && temporaryMapper[type.ordinal()] != null && temporaryMapper[type.ordinal()].length != 0){ 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]; return (T)temporaryMapper[type.ordinal()][id];
} }

View File

@ -290,10 +290,6 @@ public class Renderer extends RendererModule{
float trnsX = -12, trnsY = -13; float trnsX = -12, trnsY = -13;
//Graphics.end();
//Core.batch.getTransformMatrix().translate(trnsX, trnsY, 0);
//Graphics.begin();
for(EntityGroup<? extends BaseUnit> group : unitGroups){ for(EntityGroup<? extends BaseUnit> group : unitGroups){
if(!group.isEmpty()){ if(!group.isEmpty()){
drawAndInterpolate(group, unit -> unit.isFlying() && !unit.isDead(), baseUnit -> baseUnit.drawShadow(trnsX, trnsY)); 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)); 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); Draw.color(0, 0, 0, 0.15f);
Graphics.flushSurface(); Graphics.flushSurface();
Draw.color(); Draw.color();

View File

@ -136,11 +136,13 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
public void update(){ public void update(){
super.update(); super.update();
if(!Net.client()){
updateRotation(); updateRotation();
wobble();
}
trail.update(x + Angles.trnsx(rotation + 180f, 6f) + Mathf.range(wobblyness), trail.update(x + Angles.trnsx(rotation + 180f, 6f) + Mathf.range(wobblyness),
y + Angles.trnsy(rotation + 180f, 6f) + Mathf.range(wobblyness)); y + Angles.trnsy(rotation + 180f, 6f) + Mathf.range(wobblyness));
wobble();
} }
@Override @Override
@ -185,11 +187,11 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
protected void wobble(){ protected void wobble(){
if(Net.client()) return; if(Net.client()) return;
x += Mathf.sin(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.07f)*Timers.delta(); y += Mathf.cos(Timers.time() + id * 999, 25f, 0.08f)*Timers.delta();
if(velocity.len() <= 0.05f){ 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();
} }
} }

View File

@ -27,7 +27,6 @@ import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Events; import io.anuke.ucore.core.Events;
import io.anuke.ucore.core.Timers; import io.anuke.ucore.core.Timers;
import io.anuke.ucore.entities.EntityGroup; import io.anuke.ucore.entities.EntityGroup;
import io.anuke.ucore.entities.EntityPhysics;
import io.anuke.ucore.graphics.Draw; import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.graphics.Shapes; import io.anuke.ucore.graphics.Shapes;
import io.anuke.ucore.util.Angles; import io.anuke.ucore.util.Angles;

View File

@ -2,6 +2,6 @@ package io.anuke.mindustry.entities.units.types;
import io.anuke.mindustry.entities.units.FlyingUnit; import io.anuke.mindustry.entities.units.FlyingUnit;
public class Monsoon extends FlyingUnit{ public class Ghoul extends FlyingUnit{
} }

View File

@ -1,5 +1,5 @@
package io.anuke.mindustry.entities.units.types; package io.anuke.mindustry.entities.units.types;
public class Fabricator extends Drone{ public class Phantom extends Drone{
} }

View File

@ -0,0 +1,4 @@
package io.anuke.mindustry.entities.units.types;
public class Spirit extends Drone{
}

View File

@ -116,7 +116,7 @@ public class Waves{
end = 130; end = 130;
}}, }},
new SpawnGroup(UnitTypes.monsoon){{ new SpawnGroup(UnitTypes.ghoul){{
begin = 40; begin = 40;
unitAmount = 2; unitAmount = 2;
spacing = 2; spacing = 2;
@ -134,7 +134,7 @@ public class Waves{
max = 8; max = 8;
}}, }},
new SpawnGroup(UnitTypes.monsoon){{ new SpawnGroup(UnitTypes.ghoul){{
begin = 53; begin = 53;
unitAmount = 2; unitAmount = 2;
unitScaling = 3; unitScaling = 3;
@ -143,7 +143,7 @@ public class Waves{
end = 74; end = 74;
}}, }},
new SpawnGroup(UnitTypes.monsoon){{ new SpawnGroup(UnitTypes.ghoul){{
begin = 53; begin = 53;
unitAmount = 2; unitAmount = 2;
unitScaling = 3; unitScaling = 3;

View File

@ -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.production.Pump;
import io.anuke.mindustry.world.blocks.storage.CoreBlock; import io.anuke.mindustry.world.blocks.storage.CoreBlock;
import io.anuke.mindustry.world.blocks.storage.StorageBlock; 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.mindustry.world.consumers.ConsumePower;
import io.anuke.ucore.function.BiFunction; import io.anuke.ucore.function.BiFunction;
import io.anuke.ucore.function.IntPositionConsumer; import io.anuke.ucore.function.IntPositionConsumer;
@ -206,7 +206,7 @@ public class FortressGenerator{
Tile tile = gen.tile(x + point.x, y + point.y); Tile tile = gen.tile(x + point.x, y + point.y);
if(tile != null){ if(tile != null){
tile = tile.target(); 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); gen.setBlock(x, y, wall, team);
break; break;
} }

View File

@ -39,7 +39,7 @@ import static io.anuke.mindustry.Vars.unitGroups;
public class CoreBlock extends StorageBlock{ public class CoreBlock extends StorageBlock{
protected float droneRespawnDuration = 60 * 6; protected float droneRespawnDuration = 60 * 6;
protected UnitType droneType = UnitTypes.drone; protected UnitType droneType = UnitTypes.spirit;
protected TextureRegion openRegion; protected TextureRegion openRegion;
protected TextureRegion topRegion; protected TextureRegion topRegion;

View File

@ -34,13 +34,13 @@ import java.io.IOException;
import static io.anuke.mindustry.Vars.mobile; import static io.anuke.mindustry.Vars.mobile;
import static io.anuke.mindustry.Vars.tilesize; import static io.anuke.mindustry.Vars.tilesize;
public class MechFactory extends Block{ public class MechPad extends Block{
protected Mech mech; protected Mech mech;
protected float buildTime = 60 * 5; protected float buildTime = 60 * 5;
protected TextureRegion openRegion; protected TextureRegion openRegion;
public MechFactory(String name){ public MechPad(String name){
super(name); super(name);
update = true; update = true;
solidifes = true; solidifes = true;
@ -83,7 +83,7 @@ public class MechFactory extends Block{
if(entity.player == null) return; if(entity.player == null) return;
Mech result = ((MechFactory) tile.block()).mech; Mech result = ((MechPad) tile.block()).mech;
if(entity.player.mech == result){ if(entity.player.mech == result){
entity.player.mech = (entity.player.isMobile ? Mechs.starterMobile : Mechs.starterDesktop); entity.player.mech = (entity.player.isMobile ? Mechs.starterMobile : Mechs.starterDesktop);

View File

@ -34,7 +34,7 @@ import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
public class UnitPad extends Block{ public class UnitFactory extends Block{
protected float gracePeriodMultiplier = 23f; protected float gracePeriodMultiplier = 23f;
protected float speedupTime = 60f * 60f * 20; protected float speedupTime = 60f * 60f * 20;
protected float maxSpeedup = 2f; protected float maxSpeedup = 2f;
@ -44,7 +44,7 @@ public class UnitPad extends Block{
protected float launchVelocity = 0f; protected float launchVelocity = 0f;
protected TextureRegion topRegion; protected TextureRegion topRegion;
public UnitPad(String name){ public UnitFactory(String name){
super(name); super(name);
update = true; update = true;
hasPower = true; hasPower = true;
@ -58,10 +58,10 @@ public class UnitPad extends Block{
@Remote(called = Loc.server) @Remote(called = Loc.server)
public static void onUnitFactorySpawn(Tile tile){ 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(); UnitFactoryEntity entity = tile.entity();
UnitPad factory = (UnitPad) tile.block(); UnitFactory factory = (UnitFactory) tile.block();
entity.buildTime = 0f; entity.buildTime = 0f;