mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-09 23:37:51 +07:00
Added enemy lights setting
This commit is contained in:
@ -77,10 +77,10 @@ public class EntityProcess extends BaseProcessor{
|
||||
if(elem.is(Modifier.ABSTRACT) || elem.is(Modifier.NATIVE)) continue;
|
||||
//get all statements in the method, store them
|
||||
methodBlocks.put(elem.descString(), elem.tree().getBody().toString()
|
||||
//replace all self() invocations with this
|
||||
.replaceAll("this\\.<(.*)>self\\(\\)", "this")
|
||||
.replaceAll("self\\(\\)", "this")
|
||||
.replaceAll(" yield ", "")
|
||||
.replaceAll("this\\.<(.*)>self\\(\\)", "this") //fix parameterized self() calls
|
||||
.replaceAll("self\\(\\)", "this") //fix self() calls
|
||||
.replaceAll(" yield ", "") //fix enchanced switch
|
||||
.replaceAll("\\/\\*missing\\*\\/", "var") //fix vars
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -851,6 +851,7 @@ rules.title.unit = Units
|
||||
rules.title.experimental = Experimental
|
||||
rules.title.environment = Environment
|
||||
rules.lighting = Lighting
|
||||
rules.enemyLights = Enemy Lights
|
||||
rules.fire = Fire
|
||||
rules.explosions = Block/Unit Explosion Damage
|
||||
rules.ambientlight = Ambient Light
|
||||
|
@ -45,7 +45,7 @@ public class AmmoTypes implements ContentList{
|
||||
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){
|
||||
Building build = closest.build;
|
||||
var build = closest.build;
|
||||
|
||||
if(build.block.consumes.hasPower() && build.block.consumes.getPower().buffered){
|
||||
float amount = closest.build.power.status * build.block.consumes.getPower().capacity;
|
||||
|
@ -17,7 +17,7 @@ import static mindustry.Vars.*;
|
||||
|
||||
public abstract class Weather extends UnlockableContent{
|
||||
/** 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 Attributes attrs = new Attributes();
|
||||
|
||||
|
@ -173,6 +173,7 @@ public class CustomRulesDialog extends BaseDialog{
|
||||
check("@rules.explosions", b -> rules.damageExplosions = b, () -> rules.damageExplosions);
|
||||
check("@rules.fire", b -> rules.fire = b, () -> rules.fire);
|
||||
check("@rules.lighting", b -> rules.lighting = b, () -> rules.lighting);
|
||||
check("@rules.enemyLights", b -> rules.enemyLights = b, () -> rules.enemyLights);
|
||||
|
||||
main.button(b -> {
|
||||
b.left();
|
||||
|
Reference in New Issue
Block a user