Spore storms / Weather attribute effects

This commit is contained in:
Anuken
2020-07-28 17:13:21 -04:00
parent 7cc94057a1
commit 3251dde4a8
15 changed files with 177 additions and 21 deletions
+13 -1
View File
@@ -1,5 +1,7 @@
package mindustry.world.meta;
import mindustry.*;
public enum Attribute{
/** Heat of this block. Used for calculating output of thermal generators. */
heat,
@@ -8,5 +10,15 @@ public enum Attribute{
/** Water content of this block. Used for increasing water extractor yield. */
water,
/** Oil content of this block. Used for increasing oil extractor yield. */
oil
oil,
/** Light coverage. Negative values decrease solar panel efficiency. */
light;
public static final Attribute[] all = values();
/** @return the envrionmental value for this attribute. */
public float env(){
if(Vars.state == null) return 0;
return Vars.state.envAttrs.get(this);
}
}