Bugfixes / Team access

This commit is contained in:
Anuken 2020-08-13 19:57:45 -04:00
parent c2f71e5788
commit 1d95980066
5 changed files with 7 additions and 4 deletions

View File

@ -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;

View File

@ -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();

View File

@ -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;

View File

@ -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();

View File

@ -1,3 +1,3 @@
org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=425860b7f549e36a17bc6fa5b26798af5b291480
archash=a5c0934b3894e9f2fe793800a2adb39606f32cee