Logic tweaks

This commit is contained in:
Anuken
2020-10-05 19:59:15 -04:00
parent 5cc6ac0216
commit c87f0c27b3
8 changed files with 46 additions and 6 deletions

View File

@@ -99,7 +99,8 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
public Object senseObject(LAccess sensor){
return switch(sensor){
case type -> type;
case name -> controller instanceof Player p ? p.name : null;
case name -> controller instanceof Player p ? p.name : type.name;
case firstItem -> stack().amount == 0 ? null : item();
default -> noSensed;
};