Sensors, SetProp, and SetRule (#9943)
* some fun things for world proc only * fix the format artifact * SetProp and reformating * Wildcard imports * Wildcard imports * velocity conversion * compacting description Co-authored-by: Anuken <arnukren@gmail.com> * Update core/src/mindustry/world/blocks/defense/turrets/Turret.java --------- Co-authored-by: Anuken <arnukren@gmail.com>
This commit is contained in:
@@ -17,6 +17,7 @@ public enum LAccess{
|
||||
powerNetOut,
|
||||
ammo,
|
||||
ammoCapacity,
|
||||
currentAmmoType,
|
||||
health,
|
||||
maxHealth,
|
||||
heat,
|
||||
@@ -28,6 +29,8 @@ public enum LAccess{
|
||||
rotation,
|
||||
x,
|
||||
y,
|
||||
velocityX,
|
||||
velocityY,
|
||||
shootX,
|
||||
shootY,
|
||||
cameraX,
|
||||
@@ -68,7 +71,7 @@ public enum LAccess{
|
||||
all = values(),
|
||||
senseable = Seq.select(all, t -> t.params.length <= 1).toArray(LAccess.class),
|
||||
controls = Seq.select(all, t -> t.params.length > 0).toArray(LAccess.class),
|
||||
settable = {x, y, rotation, speed, armor, health, shield, team, flag, totalPower, payloadType};
|
||||
settable = {x, y, velocityX, velocityY, rotation, speed, armor, health, shield, team, flag, totalPower, payloadType};
|
||||
|
||||
LAccess(String... params){
|
||||
this.params = params;
|
||||
@@ -79,5 +82,4 @@ public enum LAccess{
|
||||
this.params = params;
|
||||
isObj = obj;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1497,6 +1497,7 @@ public class LExecutor{
|
||||
}
|
||||
case ambientLight -> state.rules.ambientLight.fromDouble(value.num());
|
||||
case solarMultiplier -> state.rules.solarMultiplier = Math.max(value.numf(), 0f);
|
||||
case dragMultiplier -> state.rules.dragMultiplier = Math.max(value.numf(), 0f);
|
||||
case ban -> {
|
||||
Object cont = value.obj();
|
||||
if(cont instanceof Block b){
|
||||
|
||||
@@ -15,6 +15,7 @@ public enum LogicRule{
|
||||
lighting,
|
||||
ambientLight,
|
||||
solarMultiplier,
|
||||
dragMultiplier,
|
||||
ban,
|
||||
unban,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user