generated from Anuken/MindustryJavaModTemplate
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tech Tree readjustment 1 - Turret Classing & Descriptyion
- Loading branch information
1 parent
81168d8
commit 420f807
Showing
19 changed files
with
334 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package UAW.content.techTree; | ||
|
||
import mindustry.content.Items; | ||
|
||
import static mindustry.type.ItemStack.with; | ||
|
||
public class TechTreeContent { | ||
public static TechTreeNode placeholder, | ||
|
||
// Title | ||
uawBegin, | ||
|
||
// SubBranch - blockCategory | ||
production, crafters, defence, power, | ||
|
||
// SubBranch - turret | ||
turret, turretMG, turretSG, turretART, turretMSL | ||
|
||
// others | ||
; | ||
|
||
public static void load() { | ||
uawBegin = new TechTreeNode("start"); | ||
|
||
turret = new TechTreeNode("turret"){{ | ||
}}; | ||
turretMG = new TechTreeNode("turret-mg"); | ||
turretSG = new TechTreeNode("turret-sg"); | ||
turretART = new TechTreeNode("turret-art"); | ||
turretMSL = new TechTreeNode("turret-msl"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package UAW.content.techTree; | ||
|
||
import UAW.audiovisual.Outliner; | ||
import arc.Core; | ||
import arc.graphics.Color; | ||
import arc.util.Nullable; | ||
import mindustry.ctype.*; | ||
import mindustry.graphics.*; | ||
import mindustry.type.ItemStack; | ||
|
||
public class TechTreeNode extends UnlockableContent { | ||
public Color outlineColor = Pal.darkerMetal; | ||
public int outlineThickness = 3; | ||
|
||
public @Nullable | ||
ItemStack[] researchCost; | ||
|
||
@Nullable | ||
public String iconName; | ||
|
||
public TechTreeNode(String name) { | ||
super(name); | ||
hideDetails = false; | ||
selectionSize = 128; | ||
outlineThickness = 0; | ||
} | ||
|
||
@Override | ||
public void loadIcon() { | ||
fullIcon = | ||
Core.atlas.find(getContentType().name() + "-" + (iconName == null ? name : iconName) + "-full", | ||
Core.atlas.find((iconName == null ? name : iconName) + "-full", | ||
Core.atlas.find((iconName == null ? name : iconName), | ||
Core.atlas.find(getContentType().name() + "-" + (iconName == null ? name : iconName), | ||
Core.atlas.find((iconName == null ? name : iconName) + "1"))))); | ||
|
||
uiIcon = Core.atlas.find(getContentType().name() + "-" + (iconName == null ? name : iconName) + "-ui", fullIcon); | ||
} | ||
|
||
@Override | ||
public ItemStack[] researchRequirements() { | ||
super.researchRequirements(); | ||
if (researchCost != null) { | ||
return researchCost; | ||
} else return ItemStack.empty; | ||
} | ||
|
||
@Override | ||
public ContentType getContentType() { | ||
return ContentType.typeid_UNUSED; | ||
} | ||
|
||
public void init() { | ||
super.init(); | ||
} | ||
|
||
@Override | ||
public boolean isHidden() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public void createIcons(MultiPacker packer) { | ||
if (outlineThickness > 0) { | ||
Outliner.outlineRegion(packer, fullIcon, outlineColor, (iconName == null ? name : iconName), outlineThickness); | ||
} | ||
super.createIcons(packer); | ||
} | ||
|
||
} |
Oops, something went wrong.