Added enemy lights setting

This commit is contained in:
Anuken
2020-09-30 17:44:13 -04:00
parent 326640d32a
commit 7eb0da82de
5 changed files with 8 additions and 6 deletions

View File

@ -77,10 +77,10 @@ public class EntityProcess extends BaseProcessor{
if(elem.is(Modifier.ABSTRACT) || elem.is(Modifier.NATIVE)) continue; if(elem.is(Modifier.ABSTRACT) || elem.is(Modifier.NATIVE)) continue;
//get all statements in the method, store them //get all statements in the method, store them
methodBlocks.put(elem.descString(), elem.tree().getBody().toString() methodBlocks.put(elem.descString(), elem.tree().getBody().toString()
//replace all self() invocations with this .replaceAll("this\\.<(.*)>self\\(\\)", "this") //fix parameterized self() calls
.replaceAll("this\\.<(.*)>self\\(\\)", "this") .replaceAll("self\\(\\)", "this") //fix self() calls
.replaceAll("self\\(\\)", "this") .replaceAll(" yield ", "") //fix enchanced switch
.replaceAll(" yield ", "") .replaceAll("\\/\\*missing\\*\\/", "var") //fix vars
); );
} }
} }

View File

@ -851,6 +851,7 @@ rules.title.unit = Units
rules.title.experimental = Experimental rules.title.experimental = Experimental
rules.title.environment = Environment rules.title.environment = Environment
rules.lighting = Lighting rules.lighting = Lighting
rules.enemyLights = Enemy Lights
rules.fire = Fire rules.fire = Fire
rules.explosions = Block/Unit Explosion Damage rules.explosions = Block/Unit Explosion Damage
rules.ambientlight = Ambient Light rules.ambientlight = Ambient Light

View File

@ -45,7 +45,7 @@ public class AmmoTypes implements ContentList{
Tile closest = Vars.indexer.findClosestFlag(unit.x, unit.y, unit.team, BlockFlag.powerResupply); Tile closest = Vars.indexer.findClosestFlag(unit.x, unit.y, unit.team, BlockFlag.powerResupply);
if(closest != null && closest.build != null && unit.within(closest.build, range) && closest.build.power != null){ if(closest != null && closest.build != null && unit.within(closest.build, range) && closest.build.power != null){
Building build = closest.build; var build = closest.build;
if(build.block.consumes.hasPower() && build.block.consumes.getPower().buffered){ if(build.block.consumes.hasPower() && build.block.consumes.getPower().buffered){
float amount = closest.build.power.status * build.block.consumes.getPower().capacity; float amount = closest.build.power.status * build.block.consumes.getPower().capacity;

View File

@ -17,7 +17,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 = 8f * Time.toMinutes; public float duration = 9f * Time.toMinutes;
public float opacityMultiplier = 1f; public float opacityMultiplier = 1f;
public Attributes attrs = new Attributes(); public Attributes attrs = new Attributes();

View File

@ -173,6 +173,7 @@ public class CustomRulesDialog extends BaseDialog{
check("@rules.explosions", b -> rules.damageExplosions = b, () -> rules.damageExplosions); check("@rules.explosions", b -> rules.damageExplosions = b, () -> rules.damageExplosions);
check("@rules.fire", b -> rules.fire = b, () -> rules.fire); check("@rules.fire", b -> rules.fire = b, () -> rules.fire);
check("@rules.lighting", b -> rules.lighting = b, () -> rules.lighting); check("@rules.lighting", b -> rules.lighting = b, () -> rules.lighting);
check("@rules.enemyLights", b -> rules.enemyLights = b, () -> rules.enemyLights);
main.button(b -> { main.button(b -> {
b.left(); b.left();