mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-11 03:08:38 +07:00
Bugfixes / Team access
This commit is contained in:
parent
c2f71e5788
commit
1d95980066
@ -1171,6 +1171,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
public double sense(LAccess sensor){
|
||||
if(sensor == LAccess.x) return x;
|
||||
if(sensor == LAccess.y) return y;
|
||||
if(sensor == LAccess.team) return team.id;
|
||||
if(sensor == LAccess.health) return health;
|
||||
if(sensor == LAccess.efficiency) return efficiency();
|
||||
if(sensor == LAccess.rotation) return rotation;
|
||||
|
@ -76,6 +76,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
if(sensor == LAccess.health) return health;
|
||||
if(sensor == LAccess.x) return x;
|
||||
if(sensor == LAccess.y) return y;
|
||||
if(sensor == LAccess.team) return team.id;
|
||||
if(sensor == LAccess.shooting) return isShooting() ? 1 : 0;
|
||||
if(sensor == LAccess.shootX) return aimX();
|
||||
if(sensor == LAccess.shootY) return aimY();
|
||||
|
@ -23,10 +23,11 @@ public enum LAccess{
|
||||
shootX,
|
||||
shootY,
|
||||
shooting,
|
||||
team,
|
||||
|
||||
//values with parameters are considered controllable
|
||||
enabled("to"), //"to" is standard for single parameter access
|
||||
shoot("x", "y", "shoot");
|
||||
shoot("x", "y", "shoot"),;
|
||||
|
||||
public final String[] parameters;
|
||||
|
||||
|
@ -125,7 +125,7 @@ public class LogicBlock extends Block{
|
||||
|
||||
int bytelen = stream.readInt();
|
||||
byte[] bytes = new byte[bytelen];
|
||||
stream.read(bytes);
|
||||
stream.readFully(bytes);
|
||||
|
||||
int total = stream.readInt();
|
||||
|
||||
@ -181,7 +181,7 @@ public class LogicBlock extends Block{
|
||||
|
||||
int bytelen = stream.readInt();
|
||||
byte[] bytes = new byte[bytelen];
|
||||
stream.read(bytes);
|
||||
stream.readFully(bytes);
|
||||
|
||||
links.clear();
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||
archash=425860b7f549e36a17bc6fa5b26798af5b291480
|
||||
archash=a5c0934b3894e9f2fe793800a2adb39606f32cee
|
||||
|
Loading…
Reference in New Issue
Block a user