diff --git a/annotations/src/main/java/mindustry/annotations/entity/EntityProcess.java b/annotations/src/main/java/mindustry/annotations/entity/EntityProcess.java index e01d0f15cb..3f8d56c249 100644 --- a/annotations/src/main/java/mindustry/annotations/entity/EntityProcess.java +++ b/annotations/src/main/java/mindustry/annotations/entity/EntityProcess.java @@ -141,7 +141,7 @@ public class EntityProcess extends BaseProcessor{ //getter if(!signatures.contains(cname + "()")){ inter.addMethod(MethodSpec.methodBuilder(cname).addModifiers(Modifier.ABSTRACT, Modifier.PUBLIC) - .addAnnotations(Seq.with(field.annotations()).select(a -> a.toString().contains("Null")).map(AnnotationSpec::get)) + .addAnnotations(Seq.with(field.annotations()).select(a -> a.toString().contains("Null") || a.toString().contains("Deprecated")).map(AnnotationSpec::get)) .addJavadoc(field.doc() == null ? "" : field.doc()) .returns(field.tname()).build()); } @@ -153,7 +153,7 @@ public class EntityProcess extends BaseProcessor{ .addJavadoc(field.doc() == null ? "" : field.doc()) .addParameter(ParameterSpec.builder(field.tname(), field.name()) .addAnnotations(Seq.with(field.annotations()) - .select(a -> a.toString().contains("Null")).map(AnnotationSpec::get)).build()).build()); + .select(a -> a.toString().contains("Null") || a.toString().contains("Deprecated")).map(AnnotationSpec::get)).build()).build()); } } diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 19b12019d6..c4192e9ee6 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -1074,6 +1074,7 @@ content.unit.name = Units content.block.name = Blocks content.status.name = Status Effects content.sector.name = Sectors +content.team.name = Factions item.copper.name = Copper item.lead.name = Lead diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 56c687acf4..264f5956db 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -1056,7 +1056,7 @@ public class Blocks{ iconOverride = new String[]{"-bottom", "", "-top1"}; drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawLiquidRegion(), new DrawBlock(), new DrawHeatOutput()); - craftTime = 60f * 4f; + craftTime = 60f * 3f; liquidCapacity = 30f; heatOutput = 5f; }}; @@ -1248,6 +1248,7 @@ public class Blocks{ }}; //TODO needs to be completely redone from the ground up + if(false) cellSynthesisChamber = new LiquidConverter("cell-synthesis-chamber"){{ //TODO booster mechanics? requirements(Category.crafting, with(Items.thorium, 100, Items.phaseFabric, 120, Items.titanium, 150, Items.surgeAlloy, 70)); diff --git a/core/src/mindustry/content/TeamEntries.java b/core/src/mindustry/content/TeamEntries.java new file mode 100644 index 0000000000..d7a71026fb --- /dev/null +++ b/core/src/mindustry/content/TeamEntries.java @@ -0,0 +1,13 @@ +package mindustry.content; + +public class TeamEntries{ + + public static void load(){ + //more will be added later - do these need references? + + //TODO + //new TeamEntry(Team.derelict); + //new TeamEntry(Team.sharded); + //new TeamEntry(Team.crux); + } +} diff --git a/core/src/mindustry/core/ContentLoader.java b/core/src/mindustry/core/ContentLoader.java index 5755d19dea..ffb5ebf885 100644 --- a/core/src/mindustry/core/ContentLoader.java +++ b/core/src/mindustry/core/ContentLoader.java @@ -40,6 +40,7 @@ public class ContentLoader{ /** Creates all base types. */ public void createBaseContent(){ + TeamEntries.load(); Items.load(); StatusEffects.load(); Liquids.load(); diff --git a/core/src/mindustry/ctype/UnlockableContent.java b/core/src/mindustry/ctype/UnlockableContent.java index ed18c3b402..868caf2a45 100644 --- a/core/src/mindustry/ctype/UnlockableContent.java +++ b/core/src/mindustry/ctype/UnlockableContent.java @@ -3,6 +3,7 @@ package mindustry.ctype; import arc.*; import arc.func.*; import arc.graphics.g2d.*; +import arc.scene.ui.layout.*; import arc.util.*; import mindustry.annotations.Annotations.*; import mindustry.content.TechTree.*; @@ -88,6 +89,11 @@ public abstract class UnlockableContent extends MappableContent{ public void setStats(){ } + /** Display any extra info after details. */ + public void displayExtra(Table table){ + + } + /** * Generate any special icons for this content. Called synchronously. * No regions are loaded at this point; grab pixmaps from the packer. diff --git a/core/src/mindustry/entities/comp/CommanderComp.java b/core/src/mindustry/entities/comp/CommanderComp.java index 4e10af62e1..46630e25de 100644 --- a/core/src/mindustry/entities/comp/CommanderComp.java +++ b/core/src/mindustry/entities/comp/CommanderComp.java @@ -14,7 +14,11 @@ import mindustry.game.*; import mindustry.gen.*; import mindustry.type.*; -/** A unit that can command other units. */ +/** + * A unit that can command other units. + * @deprecated This mechanic is likely to be removed or completely reworked in the future. + * */ +@Deprecated @Component abstract class CommanderComp implements Entityc, Posc{ private static final Seq members = new Seq<>(); diff --git a/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java b/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java index 8ef53b7eb5..9e31b0f80f 100644 --- a/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java +++ b/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java @@ -241,7 +241,7 @@ public class ErekirPlanetGenerator extends PlanetGenerator{ Schematics.placeLaunchLoadout(spawnX, spawnY); //TODO this is only for testing - state.rules.defaultTeam.items().add(Seq.with(ItemStack.with(Items.beryllium, 200, Items.graphite, 200))); + state.rules.defaultTeam.items().add(Seq.with(ItemStack.with(Items.beryllium, 300, Items.graphite, 300))); //TODO proper waves state.rules.waves = !OS.hasProp("mindustry.debug"); diff --git a/core/src/mindustry/type/TeamEntry.java b/core/src/mindustry/type/TeamEntry.java index b288637447..e3f1d42868 100644 --- a/core/src/mindustry/type/TeamEntry.java +++ b/core/src/mindustry/type/TeamEntry.java @@ -1,10 +1,11 @@ package mindustry.type; +import arc.scene.ui.layout.*; import mindustry.ctype.*; import mindustry.game.*; /** This class is only for displaying team lore in the content database. */ -//TODO +//TODO more stuff, make unlockable, don't display in campaign at all public class TeamEntry extends UnlockableContent{ public final Team team; @@ -13,6 +14,11 @@ public class TeamEntry extends UnlockableContent{ this.team = team; } + @Override + public void displayExtra(Table table){ + table.add("@team." + name + ".log").pad(6).padTop(20).width(400f).wrap().fillX(); + } + @Override public ContentType getContentType(){ return ContentType.team; diff --git a/core/src/mindustry/ui/dialogs/ContentInfoDialog.java b/core/src/mindustry/ui/dialogs/ContentInfoDialog.java index d234c1ca72..5478af3861 100644 --- a/core/src/mindustry/ui/dialogs/ContentInfoDialog.java +++ b/core/src/mindustry/ui/dialogs/ContentInfoDialog.java @@ -85,6 +85,8 @@ public class ContentInfoDialog extends BaseDialog{ table.row(); } + content.displayExtra(table); + ScrollPane pane = new ScrollPane(table); cont.add(pane);