Misc cleanup
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -98,11 +98,11 @@ public class TechTree implements ContentList{
|
|||||||
node(platedConduit, () -> {
|
node(platedConduit, () -> {
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
node(rotaryPump, () -> {
|
node(rotaryPump, () -> {
|
||||||
node(thermalPump, () -> {
|
node(thermalPump, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -53,10 +53,11 @@ public class Weathers implements ContentList{
|
|||||||
baseSpeed = 5.4f;
|
baseSpeed = 5.4f;
|
||||||
attrs.set(Attribute.light, -0.1f);
|
attrs.set(Attribute.light, -0.1f);
|
||||||
attrs.set(Attribute.water, -0.1f);
|
attrs.set(Attribute.water, -0.1f);
|
||||||
opacityMultiplier = 0.5f;
|
opacityMultiplier = 0.4f;
|
||||||
force = 0.1f;
|
force = 0.1f;
|
||||||
sound = Sounds.wind;
|
sound = Sounds.wind;
|
||||||
soundVol = 0.3f;
|
soundVol = 0.8f;
|
||||||
|
duration = 7f * Time.toMinutes;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
sporestorm = new ParticleWeather("sporestorm"){{
|
sporestorm = new ParticleWeather("sporestorm"){{
|
||||||
@@ -77,7 +78,8 @@ public class Weathers implements ContentList{
|
|||||||
opacityMultiplier = 0.75f;
|
opacityMultiplier = 0.75f;
|
||||||
force = 0.1f;
|
force = 0.1f;
|
||||||
sound = Sounds.wind;
|
sound = Sounds.wind;
|
||||||
soundVol = 0.3f;
|
soundVol = 0.7f;
|
||||||
|
duration = 7f * Time.toMinutes;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
fog = new ParticleWeather("fog"){{
|
fog = new ParticleWeather("fog"){{
|
||||||
|
|||||||
@@ -109,6 +109,13 @@ public class Logic implements ApplicationListener{
|
|||||||
}
|
}
|
||||||
state.rules.waveTeam.rules().aiTier = state.getSector().threat * 0.8f;
|
state.rules.waveTeam.rules().aiTier = state.getSector().threat * 0.8f;
|
||||||
state.rules.waveTeam.rules().infiniteResources = true;
|
state.rules.waveTeam.rules().infiniteResources = true;
|
||||||
|
|
||||||
|
//fill enemy cores by default.
|
||||||
|
for(var core : state.rules.waveTeam.cores()){
|
||||||
|
for(Item item : content.items()){
|
||||||
|
core.items.set(item, core.block.itemCapacity);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//save settings
|
//save settings
|
||||||
|
|||||||
@@ -977,27 +977,6 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the flammability of the Used for fire calculations.
|
|
||||||
* Takes flammability of floor liquid into account.
|
|
||||||
*/
|
|
||||||
public float getFlammability(){
|
|
||||||
if(!block.hasItems){
|
|
||||||
if(floor().isLiquid && !block.solid){
|
|
||||||
return floor().liquidDrop.flammability;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}else{
|
|
||||||
float result = items.sum((item, amount) -> item.flammability * amount);
|
|
||||||
|
|
||||||
if(block.hasLiquids){
|
|
||||||
result += liquids.sum((liquid, amount) -> liquid.flammability * amount / 3f);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDisplayName(){
|
public String getDisplayName(){
|
||||||
return block.localizedName;
|
return block.localizedName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ abstract class FireComp implements Timedc, Posc, Firec, Syncc{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(){
|
public void update(){
|
||||||
if(Mathf.chance(0.1 * Time.delta)){
|
if(Mathf.chance(0.09 * Time.delta)){
|
||||||
Fx.fire.at(x + Mathf.range(4f), y + Mathf.range(4f));
|
Fx.fire.at(x + Mathf.range(4f), y + Mathf.range(4f));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ abstract class FireComp implements Timedc, Posc, Firec, Syncc{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(baseFlammability < 0 || block != tile.block()){
|
if(baseFlammability < 0 || block != tile.block()){
|
||||||
baseFlammability = tile.build == null ? 0 : tile.build.getFlammability();
|
baseFlammability = tile.build == null ? 0 : tile.getFlammability();
|
||||||
block = tile.block();
|
block = tile.block();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,12 +77,12 @@ abstract class FireComp implements Timedc, Posc, Firec, Syncc{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Mathf.chance(0.1 * Time.delta)){
|
if(Mathf.chance(0.05 * Time.delta)){
|
||||||
Puddlec p = Puddles.get(tile);
|
Puddlec p = Puddles.get(tile);
|
||||||
puddleFlammability = p != null ? p.getFlammability() / 3f : 0;
|
puddleFlammability = p != null ? p.getFlammability() / 3f : 0;
|
||||||
|
|
||||||
if(damage){
|
if(damage){
|
||||||
entity.damage(0.4f);
|
entity.damage(0.8f);
|
||||||
}
|
}
|
||||||
Damage.damageUnits(null, tile.worldx(), tile.worldy(), tilesize, 3f,
|
Damage.damageUnits(null, tile.worldx(), tile.worldy(), tilesize, 3f,
|
||||||
unit -> !unit.isFlying() && !unit.isImmune(StatusEffects.burning),
|
unit -> !unit.isFlying() && !unit.isImmune(StatusEffects.burning),
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ public class ContentParser{
|
|||||||
currentContent = block;
|
currentContent = block;
|
||||||
|
|
||||||
read(() -> {
|
read(() -> {
|
||||||
if(value.has("consumes")){
|
if(value.has("consumes") && value.get("consumes").isObject()){
|
||||||
for(JsonValue child : value.get("consumes")){
|
for(JsonValue child : value.get("consumes")){
|
||||||
if(child.name.equals("item")){
|
if(child.name.equals("item")){
|
||||||
block.consumes.item(find(ContentType.item, child.asString()));
|
block.consumes.item(find(ContentType.item, child.asString()));
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import static mindustry.Vars.*;
|
|||||||
|
|
||||||
public abstract class Weather extends UnlockableContent{
|
public abstract class Weather extends UnlockableContent{
|
||||||
/** Default duration of this weather event in ticks. */
|
/** Default duration of this weather event in ticks. */
|
||||||
public float duration = 9f * Time.toMinutes;
|
public float duration = 10f * Time.toMinutes;
|
||||||
public float opacityMultiplier = 1f;
|
public float opacityMultiplier = 1f;
|
||||||
public Attributes attrs = new Attributes();
|
public Attributes attrs = new Attributes();
|
||||||
public Sound sound = Sounds.none;
|
public Sound sound = Sounds.none;
|
||||||
|
|||||||
@@ -103,6 +103,28 @@ public class Tile implements Position, QuadTreeObject, Displayable{
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the flammability of the Used for fire calculations.
|
||||||
|
* Takes flammability of floor liquid into account.
|
||||||
|
*/
|
||||||
|
public float getFlammability(){
|
||||||
|
if(!block.hasItems){
|
||||||
|
if(floor.liquidDrop != null && !block.solid){
|
||||||
|
return floor.liquidDrop.flammability;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}else if(build != null){
|
||||||
|
float result = build.items.sum((item, amount) -> item.flammability * amount);
|
||||||
|
|
||||||
|
if(block.hasLiquids){
|
||||||
|
result += build.liquids.sum((liquid, amount) -> liquid.flammability * amount / 3f);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/** Convenience method that returns the building of this tile with a cast.
|
/** Convenience method that returns the building of this tile with a cast.
|
||||||
* Method name is shortened to prevent conflict. */
|
* Method name is shortened to prevent conflict. */
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
|||||||
Reference in New Issue
Block a user