Per-unit cap (still broken)

This commit is contained in:
Anuken
2020-07-21 15:43:02 -04:00
parent 4ef0143928
commit 5c9e005397
20 changed files with 3758 additions and 1996 deletions

View File

@@ -381,7 +381,12 @@ public class Generators{
wrecks[i].save(type.name + "-wreck" + i);
}
//TODO GENERATE WRECKS
for(Cicon icon : Cicon.scaled){
Image scaled = new Image(icon.size, icon.size);
scaled.drawScaled(image);
scaled.save("../ui/unit-" + type.name + "-" + icon.name());
}
}catch(IllegalArgumentException e){
Log.err("WARNING: Skipping unit @: @", type.name, e.getMessage());
}

View File

@@ -12,6 +12,7 @@ import mindustry.*;
import mindustry.content.*;
import mindustry.core.*;
import mindustry.ctype.*;
import mindustry.type.*;
import mindustry.world.*;
import mindustry.world.blocks.*;
@@ -121,7 +122,7 @@ public class ImagePacker{
ObjectMap<String, String> content2id = new ObjectMap<>();
map.each((key, val) -> content2id.put(val.split("\\|")[0], key));
Seq<UnlockableContent> cont = Seq.withArrays(Vars.content.blocks(), Vars.content.items(), Vars.content.liquids());
Seq<UnlockableContent> cont = Seq.withArrays(Vars.content.blocks(), Vars.content.items(), Vars.content.liquids(), Vars.content.units());
cont.removeAll(u -> u instanceof BuildBlock || u == Blocks.air);
int minid = 0xF8FF;
@@ -146,6 +147,7 @@ public class ImagePacker{
static String texname(UnlockableContent c){
if(c instanceof Block) return "block-" + c.name + "-medium";
if(c instanceof UnitType) return "unit-" + c.name + "-medium";
return c.getContentType() + "-" + c.name + "-icon";
}