Read-only component fields / Removed get/set prefix

This commit is contained in:
Anuken
2020-02-04 12:14:09 -05:00
parent 1d0cfd4435
commit 36b9451e01
93 changed files with 637 additions and 587 deletions

View File

@@ -7,7 +7,6 @@ import arc.util.*;
import arc.util.pooling.*;
import mindustry.annotations.Annotations.*;
import mindustry.entities.*;
import mindustry.entities.type.*;
import mindustry.gen.*;
import mindustry.graphics.*;
import mindustry.type.*;
@@ -42,11 +41,11 @@ public class ItemTransfer extends TimedEntity implements DrawTrait{
@Remote(called = Loc.server, unreliable = true)
public static void transferItemTo(Item item, int amount, float x, float y, Tile tile){
if(tile == null || tile.entity == null || tile.entity.getItems() == null) return;
if(tile == null || tile.entity == null || tile.entity.items() == null) return;
for(int i = 0; i < Mathf.clamp(amount / 3, 1, 8); i++){
Time.run(i * 3, () -> create(item, x, y, tile, () -> {}));
}
tile.entity.getItems().add(item, amount);
tile.entity.items().add(item, amount);
}
public static void create(Item item, float fromx, float fromy, Position to, Runnable done){