mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-26 06:22:17 -08:00
Modded payload factory sprites (#8595)
* Search for modded payload factory blocks
* Generate payload mass driver outlines in mods
* Revert weird change
* Revert "Revert weird change"
This reverts commit 0afd64077a.
This commit is contained in:
parent
4a456645d3
commit
c193206ccb
2 changed files with 14 additions and 5 deletions
|
|
@ -33,9 +33,18 @@ public class PayloadBlock extends Block{
|
|||
public void load(){
|
||||
super.load();
|
||||
|
||||
topRegion = Core.atlas.find(name + "-top", "factory-top-" + size + regionSuffix);
|
||||
outRegion = Core.atlas.find(name + "-out", "factory-out-" + size + regionSuffix);
|
||||
inRegion = Core.atlas.find(name + "-in", "factory-in-" + size + regionSuffix);
|
||||
topRegion = findFactoryRegion("-top");
|
||||
outRegion = findFactoryRegion("-out");
|
||||
inRegion = findFactoryRegion("-in");
|
||||
}
|
||||
|
||||
protected TextureRegion findFactoryRegion(String suf){
|
||||
TextureRegion region = Core.atlas.find(name + suf);
|
||||
|
||||
if(!region.found() && minfo.mod != null) region = Core.atlas.find(minfo.mod.name + "-factory" + suf + "-" + size + regionSuffix);
|
||||
if(!region.found()) region = Core.atlas.find("factory" + suf + "-" + size + regionSuffix);
|
||||
|
||||
return region;
|
||||
}
|
||||
|
||||
public static boolean blends(Building build, int direction){
|
||||
|
|
|
|||
|
|
@ -123,8 +123,8 @@ public class PayloadMassDriver extends PayloadBlock{
|
|||
}
|
||||
|
||||
@Override
|
||||
public TextureRegion[] makeIconRegions(){
|
||||
return new TextureRegion[]{leftRegion, rightRegion, capRegion};
|
||||
public void getRegionsToOutline(Seq<TextureRegion> out){
|
||||
out.add(leftRegion, rightRegion, capRegion);
|
||||
}
|
||||
|
||||
public class PayloadDriverBuild extends PayloadBlockBuild<Payload> implements RotBlock{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue