Improvements of status effects in database
This commit is contained in:
@@ -376,8 +376,24 @@ public class Generators{
|
||||
});
|
||||
|
||||
ImagePacker.generate("item-icons", () -> {
|
||||
for(UnlockableContent item : Seq.<UnlockableContent>withArrays(content.items(), content.liquids())){
|
||||
for(UnlockableContent item : Seq.<UnlockableContent>withArrays(content.items(), content.liquids(), content.statusEffects())){
|
||||
if(item instanceof StatusEffect && !ImagePacker.has(item.getContentType().name() + "-" + item.name)){
|
||||
continue;
|
||||
}
|
||||
|
||||
Image base = ImagePacker.get(item.getContentType().name() + "-" + item.name);
|
||||
//tint status effect icon color
|
||||
if(item instanceof StatusEffect){
|
||||
StatusEffect stat = (StatusEffect)item;
|
||||
Image tint = base;
|
||||
base.each((x, y) -> tint.draw(x, y, tint.getColor(x, y).mul(stat.color)));
|
||||
|
||||
//outline the image
|
||||
Image container = new Image(38, 38);
|
||||
container.draw(base, 3, 3);
|
||||
base = container.outline(3, Pal.gray);
|
||||
}
|
||||
|
||||
for(Cicon icon : Cicon.scaled){
|
||||
//if(icon.size == base.width) continue;
|
||||
Image image = new Image(icon.size, icon.size);
|
||||
|
||||
@@ -106,7 +106,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(), Vars.content.units());
|
||||
Seq<UnlockableContent> cont = Seq.withArrays(Vars.content.blocks(), Vars.content.items(), Vars.content.liquids(), Vars.content.units(), Vars.content.statusEffects());
|
||||
cont.removeAll(u -> u instanceof ConstructBlock || u == Blocks.air);
|
||||
|
||||
int minid = 0xF8FF;
|
||||
|
||||
Reference in New Issue
Block a user