Implicit non-nullability for fields
This commit is contained in:
@@ -8,7 +8,7 @@ import mindustry.gen.*;
|
||||
import mindustry.type.*;
|
||||
|
||||
public class StatusFieldAbility extends Ability{
|
||||
public @NonNull StatusEffect effect;
|
||||
public StatusEffect effect;
|
||||
public float duration = 60, reload = 100, range = 20;
|
||||
public Effect applyEffect = Fx.heal;
|
||||
public Effect activeEffect = Fx.overdriveWave;
|
||||
@@ -17,7 +17,7 @@ public class StatusFieldAbility extends Ability{
|
||||
|
||||
StatusFieldAbility(){}
|
||||
|
||||
public StatusFieldAbility(@NonNull StatusEffect effect, float duration, float reload, float range){
|
||||
public StatusFieldAbility(StatusEffect effect, float duration, float reload, float range){
|
||||
this.duration = duration;
|
||||
this.reload = reload;
|
||||
this.range = range;
|
||||
|
||||
@@ -2,7 +2,6 @@ package mindustry.entities.abilities;
|
||||
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
import arc.util.ArcAnnotate.*;
|
||||
import arc.util.*;
|
||||
import mindustry.*;
|
||||
import mindustry.content.*;
|
||||
@@ -13,13 +12,13 @@ import mindustry.type.*;
|
||||
import mindustry.ui.*;
|
||||
|
||||
public class UnitSpawnAbility extends Ability{
|
||||
public @NonNull UnitType type;
|
||||
public UnitType type;
|
||||
public float spawnTime = 60f, spawnX, spawnY;
|
||||
public Effect spawnEffect = Fx.spawn;
|
||||
|
||||
protected float timer;
|
||||
|
||||
public UnitSpawnAbility(@NonNull UnitType type, float spawnTime, float spawnX, float spawnY){
|
||||
public UnitSpawnAbility(UnitType type, float spawnTime, float spawnX, float spawnY){
|
||||
this.type = type;
|
||||
this.spawnTime = spawnTime;
|
||||
this.spawnX = spawnX;
|
||||
|
||||
@@ -13,7 +13,7 @@ import mindustry.world.*;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class LiquidBulletType extends BulletType{
|
||||
public @NonNull Liquid liquid;
|
||||
public Liquid liquid;
|
||||
public float puddleSize = 6f;
|
||||
|
||||
public LiquidBulletType(@Nullable Liquid liquid){
|
||||
|
||||
@@ -421,7 +421,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
* @param todump payload to dump.
|
||||
* @return whether the payload was moved successfully
|
||||
*/
|
||||
public boolean movePayload(@NonNull Payload todump){
|
||||
public boolean movePayload(Payload todump){
|
||||
int trns = block.size/2 + 1;
|
||||
Tile next = tile.getNearby(Geometry.d4(rotation).x * trns, Geometry.d4(rotation).y * trns);
|
||||
|
||||
@@ -438,7 +438,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
* @param todump payload to dump.
|
||||
* @return whether the payload was moved successfully
|
||||
*/
|
||||
public boolean dumpPayload(@NonNull Payload todump){
|
||||
public boolean dumpPayload(Payload todump){
|
||||
if(proximity.size == 0) return false;
|
||||
|
||||
int dump = this.dump;
|
||||
|
||||
@@ -33,7 +33,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
|
||||
|
||||
@Import float x, y;
|
||||
|
||||
@NonNull @ReadOnly Unit unit = Nulls.unit;
|
||||
@ReadOnly Unit unit = Nulls.unit;
|
||||
transient private Unit lastReadUnit = Nulls.unit;
|
||||
transient @Nullable NetConnection con;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user