Skip to content

Commit

Permalink
Softbush re-sprite; luminium ore glows now
Browse files Browse the repository at this point in the history
  • Loading branch information
Slotterleet committed Jan 7, 2024
1 parent 35a1ecf commit eeb37f7
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 13 deletions.
Binary file modified core/res/sprites/blocks/environment/softbush1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified core/res/sprites/blocks/environment/softbush2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified core/res/sprites/blocks/environment/softbush3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion core/src/fos/content/FOSBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ protected boolean canPump(Tile tile) {
variants = 3;
emitLight = true;
lightColor = FOSPal.luminium1.cpy().a(0.6f);
lightRadius = 6f;
lightRadius = 9f;
}};
hiveFloor = new Floor("hive"){{
variants = 5;
Expand Down
34 changes: 25 additions & 9 deletions core/src/fos/type/blocks/environment/AnimatedOreBlock.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
package fos.type.blocks.environment;

import arc.*;
import arc.graphics.*;
import arc.Events;
import arc.graphics.Blending;
import arc.graphics.g2d.*;
import arc.graphics.gl.Shader;
import arc.math.Mathf;
import arc.struct.Seq;
import arc.util.Strings;
import fos.core.FOSVars;
import fos.graphics.*;
import fos.graphics.cachelayers.AnimatedOreCacheLayer;
import mindustry.Vars;
import mindustry.content.Blocks;
import mindustry.game.EventType;
import mindustry.graphics.*;
import mindustry.graphics.Drawf;
import mindustry.world.Tile;
import mindustry.world.blocks.environment.OreBlock;

Expand All @@ -27,4 +21,26 @@ public AnimatedOreBlock(String name, Shader shader) {
super(name);
cacheLayer = new AnimatedOreCacheLayer(shader);
}

@Override
public void drawBase(Tile tile) {
super.drawBase(tile);

Events.run(EventType.Trigger.draw, () -> {
if (tile != null && tile.overlay() == this && Vars.renderer.lights.enabled()) {
drawEnvironmentLight(tile);
}
});
}

@Override
public void drawEnvironmentLight(Tile tile) {
// stolen from WTTF, thanks sh1p
Draw.blend(Blending.additive);

Drawf.light(tile.worldx(), tile.worldy(), lightRadius, lightColor, lightColor.a);
Drawf.light(tile.worldx(), tile.worldy(), region, lightColor, lightColor.a);

Draw.blend();
}
}
3 changes: 0 additions & 3 deletions core/src/fos/type/units/comp/LumoniPlayerUnitComp.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
import fos.FOSTypeIO;
import fos.type.content.WeaponSet;
import mindustry.annotations.Annotations;
import mindustry.entities.abilities.Ability;
import mindustry.entities.units.WeaponMount;
import mindustry.gen.*;
import mindustry.io.TypeIO;
import mindustry.type.UnitType;

// FIXME mounts
Expand All @@ -16,7 +14,6 @@ public abstract class LumoniPlayerUnitComp implements Weaponsc, Entityc, Syncc,
transient boolean isEditedWeapons = false;
transient WeaponSet weaponSet = null;
@Annotations.Import WeaponMount[] mounts;
@Annotations.Import Ability[] abilities;

@Annotations.Replace
@Override
Expand Down

0 comments on commit eeb37f7

Please sign in to comment.