Shock mine team region
This commit is contained in:
BIN
core/assets-raw/sprites/blocks/defense/shock-mine-team-top.png
Normal file
BIN
core/assets-raw/sprites/blocks/defense/shock-mine-team-top.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 152 B |
@@ -607,7 +607,8 @@ public class Mods implements Loadable{
|
|||||||
if(mod.root.child("content").exists()){
|
if(mod.root.child("content").exists()){
|
||||||
Fi contentRoot = mod.root.child("content");
|
Fi contentRoot = mod.root.child("content");
|
||||||
for(ContentType type : ContentType.all){
|
for(ContentType type : ContentType.all){
|
||||||
Fi folder = contentRoot.child(type.name().toLowerCase(Locale.ROOT) + "s");
|
String lower = type.name().toLowerCase(Locale.ROOT);
|
||||||
|
Fi folder = contentRoot.child(lower + (lower.endsWith("s") ? "" : "s"));
|
||||||
if(folder.exists()){
|
if(folder.exists()){
|
||||||
for(Fi file : folder.findAll(f -> f.extension().equals("json") || f.extension().equals("hjson"))){
|
for(Fi file : folder.findAll(f -> f.extension().equals("json") || f.extension().equals("hjson"))){
|
||||||
runs.add(new LoadRun(type, file, mod));
|
runs.add(new LoadRun(type, file, mod));
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package mindustry.world.blocks.defense;
|
|||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
|
import mindustry.annotations.Annotations.*;
|
||||||
import mindustry.entities.*;
|
import mindustry.entities.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
@@ -17,6 +18,8 @@ public class ShockMine extends Block{
|
|||||||
public int length = 10;
|
public int length = 10;
|
||||||
public int tendrils = 6;
|
public int tendrils = 6;
|
||||||
public Color lightningColor = Pal.lancerLaser;
|
public Color lightningColor = Pal.lancerLaser;
|
||||||
|
public float teamAlpha = 0.3f;
|
||||||
|
public @Load("@-team-top") TextureRegion teamRegion;
|
||||||
|
|
||||||
public ShockMine(String name){
|
public ShockMine(String name){
|
||||||
super(name);
|
super(name);
|
||||||
@@ -24,7 +27,6 @@ public class ShockMine extends Block{
|
|||||||
destructible = true;
|
destructible = true;
|
||||||
solid = false;
|
solid = false;
|
||||||
targetable = false;
|
targetable = false;
|
||||||
rebuildable = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ShockMineBuild extends Building{
|
public class ShockMineBuild extends Building{
|
||||||
@@ -37,12 +39,16 @@ public class ShockMine extends Block{
|
|||||||
@Override
|
@Override
|
||||||
public void draw(){
|
public void draw(){
|
||||||
super.draw();
|
super.draw();
|
||||||
Draw.color(team.color);
|
Draw.color(team.color, teamAlpha);
|
||||||
Draw.alpha(0.22f);
|
Draw.rect(teamRegion, x, y);
|
||||||
Fill.rect(x, y, 2f, 2f);
|
|
||||||
Draw.color();
|
Draw.color();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawCracks(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void unitOn(Unit unit){
|
public void unitOn(Unit unit){
|
||||||
if(enabled && unit.team != team && timer(timerDamage, cooldown)){
|
if(enabled && unit.team != team && timer(timerDamage, cooldown)){
|
||||||
|
|||||||
Reference in New Issue
Block a user