pointless casts begone
This commit is contained in:
@@ -4,6 +4,7 @@ import arc.*;
|
||||
import arc.graphics.*;
|
||||
import arc.math.*;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.graphics.*;
|
||||
@@ -163,7 +164,7 @@ public class StatusEffects implements ContentList{
|
||||
}};
|
||||
|
||||
boss = new StatusEffect("boss"){{
|
||||
color = Pal.health;
|
||||
color = Team.sharded.color;
|
||||
permanent = true;
|
||||
damageMultiplier = 1.3f;
|
||||
healthMultiplier = 1.5f;
|
||||
|
||||
@@ -105,8 +105,8 @@ public class Renderer implements ApplicationListener{
|
||||
for(int i = 0; i < splashes.length; i++) splashes[i] = atlas.find("splash-" + i);
|
||||
|
||||
assets.load("sprites/clouds.png", Texture.class).loaded = t -> {
|
||||
((Texture)t).setWrap(TextureWrap.repeat);
|
||||
((Texture)t).setFilter(TextureFilter.linear);
|
||||
t.setWrap(TextureWrap.repeat);
|
||||
t.setFilter(TextureFilter.linear);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ public class Shaders{
|
||||
super(frag);
|
||||
|
||||
Core.assets.load("sprites/space.png", Texture.class).loaded = t -> {
|
||||
texture = (Texture)t;
|
||||
texture = t;
|
||||
texture.setFilter(TextureFilter.linear);
|
||||
texture.setWrap(TextureWrap.mirroredRepeat);
|
||||
};
|
||||
@@ -273,8 +273,8 @@ public class Shaders{
|
||||
|
||||
public void loadNoise(){
|
||||
Core.assets.load("sprites/" + textureName() + ".png", Texture.class).loaded = t -> {
|
||||
((Texture)t).setFilter(TextureFilter.linear);
|
||||
((Texture)t).setWrap(TextureWrap.repeat);
|
||||
t.setFilter(TextureFilter.linear);
|
||||
t.setWrap(TextureWrap.repeat);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -381,7 +381,7 @@ public class Maps{
|
||||
//try to load preview
|
||||
if(map.previewFile().exists()){
|
||||
//this may fail, but calls queueNewPreview
|
||||
Core.assets.load(new AssetDescriptor<>(map.previewFile().path() + "." + mapExtension, Texture.class, new MapPreviewParameter(map))).loaded = t -> map.texture = (Texture)t;
|
||||
Core.assets.load(new AssetDescriptor<>(map.previewFile().path() + "." + mapExtension, Texture.class, new MapPreviewParameter(map))).loaded = t -> map.texture = t;
|
||||
|
||||
try{
|
||||
readCache(map);
|
||||
|
||||
@@ -74,19 +74,19 @@ public class Fonts{
|
||||
largeIcons.clear();
|
||||
FreeTypeFontParameter param = fontParameter();
|
||||
|
||||
Core.assets.load("default", Font.class, new FreeTypeFontLoaderParameter(mainFont, param)).loaded = f -> Fonts.def = (Font)f;
|
||||
Core.assets.load("default", Font.class, new FreeTypeFontLoaderParameter(mainFont, param)).loaded = f -> Fonts.def = f;
|
||||
Core.assets.load("icon", Font.class, new FreeTypeFontLoaderParameter("fonts/icon.ttf", new FreeTypeFontParameter(){{
|
||||
size = 30;
|
||||
incremental = true;
|
||||
characters = "\0";
|
||||
}})).loaded = f -> Fonts.icon = (Font)f;
|
||||
}})).loaded = f -> Fonts.icon = f;
|
||||
Core.assets.load("iconLarge", Font.class, new FreeTypeFontLoaderParameter("fonts/icon.ttf", new FreeTypeFontParameter(){{
|
||||
size = 48;
|
||||
incremental = false;
|
||||
characters = "\0" + Iconc.all;
|
||||
borderWidth = 5f;
|
||||
borderColor = Color.darkGray;
|
||||
}})).loaded = f -> Fonts.iconLarge = (Font)f;
|
||||
}})).loaded = f -> Fonts.iconLarge = f;
|
||||
}
|
||||
|
||||
public static TextureRegion getLargeIcon(String name){
|
||||
|
||||
@@ -41,7 +41,7 @@ public class SchematicsDialog extends BaseDialog{
|
||||
|
||||
public SchematicsDialog(){
|
||||
super("@schematics");
|
||||
Core.assets.load("sprites/schematic-background.png", Texture.class).loaded = t -> ((Texture)t).setWrap(TextureWrap.repeat);
|
||||
Core.assets.load("sprites/schematic-background.png", Texture.class).loaded = t -> t.setWrap(TextureWrap.repeat);
|
||||
|
||||
tags = Core.settings.getJson("schematic-tags", Seq.class, String.class, Seq::new);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user