mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-19 16:57:15 +07:00
Shock mine team region
This commit is contained in:
parent
8fc61215a5
commit
fcf1bdd701
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()){
|
||||
Fi contentRoot = mod.root.child("content");
|
||||
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()){
|
||||
for(Fi file : folder.findAll(f -> f.extension().equals("json") || f.extension().equals("hjson"))){
|
||||
runs.add(new LoadRun(type, file, mod));
|
||||
|
@ -3,6 +3,7 @@ package mindustry.world.blocks.defense;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
@ -17,6 +18,8 @@ public class ShockMine extends Block{
|
||||
public int length = 10;
|
||||
public int tendrils = 6;
|
||||
public Color lightningColor = Pal.lancerLaser;
|
||||
public float teamAlpha = 0.3f;
|
||||
public @Load("@-team-top") TextureRegion teamRegion;
|
||||
|
||||
public ShockMine(String name){
|
||||
super(name);
|
||||
@ -24,7 +27,6 @@ public class ShockMine extends Block{
|
||||
destructible = true;
|
||||
solid = false;
|
||||
targetable = false;
|
||||
rebuildable = false;
|
||||
}
|
||||
|
||||
public class ShockMineBuild extends Building{
|
||||
@ -37,12 +39,16 @@ public class ShockMine extends Block{
|
||||
@Override
|
||||
public void draw(){
|
||||
super.draw();
|
||||
Draw.color(team.color);
|
||||
Draw.alpha(0.22f);
|
||||
Fill.rect(x, y, 2f, 2f);
|
||||
Draw.color(team.color, teamAlpha);
|
||||
Draw.rect(teamRegion, x, y);
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawCracks(){
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unitOn(Unit unit){
|
||||
if(enabled && unit.team != team && timer(timerDamage, cooldown)){
|
||||
|
Loading…
Reference in New Issue
Block a user