Component interface cleanup
This commit is contained in:
@@ -59,7 +59,7 @@ public class Fires{
|
|||||||
if(tile != null){
|
if(tile != null){
|
||||||
Fire fire = get(tile);
|
Fire fire = get(tile);
|
||||||
if(fire != null){
|
if(fire != null){
|
||||||
fire.time(fire.time + intensity * Time.delta);
|
fire.time += intensity * Time.delta;
|
||||||
Fx.steam.at(fire);
|
Fx.steam.at(fire);
|
||||||
if(fire.time >= fire.lifetime){
|
if(fire.time >= fire.lifetime){
|
||||||
Events.fire(Trigger.fireExtinguish);
|
Events.fire(Trigger.fireExtinguish);
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ public class Puddles{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void register(Puddle puddle){
|
public static void register(Puddle puddle){
|
||||||
world.tiles.setPuddle(puddle.tile().array(), puddle);
|
world.tiles.setPuddle(puddle.tile.array(), puddle);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Reacts two liquids together at a location. */
|
/** Reacts two liquids together at a location. */
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import mindustry.world.meta.*;
|
|||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
@EntityDef(value = {Firec.class}, pooled = true)
|
@EntityDef(value = {Firec.class}, pooled = true)
|
||||||
@Component(base = true)
|
@Component(base = true, genInterface = false)
|
||||||
abstract class FireComp implements Timedc, Posc, Syncc, Drawc{
|
abstract class FireComp implements Timedc, Posc, Syncc, Drawc{
|
||||||
public static final int frames = 40, duration = 90;
|
public static final int frames = 40, duration = 90;
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ abstract class FireComp implements Timedc, Posc, Syncc, Drawc{
|
|||||||
//apply damage to nearby units & building
|
//apply damage to nearby units & building
|
||||||
if((damageTimer += Time.delta) >= damageDelay){
|
if((damageTimer += Time.delta) >= damageDelay){
|
||||||
damageTimer = 0f;
|
damageTimer = 0f;
|
||||||
Puddlec p = Puddles.get(tile);
|
Puddle p = Puddles.get(tile);
|
||||||
puddleFlammability = p != null ? p.getFlammability() / 3f : 0;
|
puddleFlammability = p != null ? p.getFlammability() / 3f : 0;
|
||||||
|
|
||||||
if(damage){
|
if(damage){
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import static mindustry.Vars.*;
|
|||||||
import static mindustry.entities.Puddles.*;
|
import static mindustry.entities.Puddles.*;
|
||||||
|
|
||||||
@EntityDef(value = {Puddlec.class}, pooled = true)
|
@EntityDef(value = {Puddlec.class}, pooled = true)
|
||||||
@Component(base = true)
|
@Component(base = true, genInterface = false)
|
||||||
abstract class PuddleComp implements Posc, Puddlec, Drawc, Syncc{
|
abstract class PuddleComp implements Posc, Puddlec, Drawc, Syncc{
|
||||||
private static final Rect rect = new Rect(), rect2 = new Rect();
|
private static final Rect rect = new Rect(), rect2 = new Rect();
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import mindustry.ui.*;
|
|||||||
|
|
||||||
/** Component/entity for labels in world space. Useful for servers. Does not save in files - create only on world load. */
|
/** Component/entity for labels in world space. Useful for servers. Does not save in files - create only on world load. */
|
||||||
@EntityDef(value = {WorldLabelc.class}, serialize = false)
|
@EntityDef(value = {WorldLabelc.class}, serialize = false)
|
||||||
@Component(base = true)
|
@Component(base = true, genInterface = false)
|
||||||
public abstract class WorldLabelComp implements Posc, Drawc, Syncc{
|
public abstract class WorldLabelComp implements Posc, Drawc, Syncc{
|
||||||
@Import int id;
|
@Import int id;
|
||||||
@Import float x, y;
|
@Import float x, y;
|
||||||
|
|||||||
Reference in New Issue
Block a user