mirror of
https://github.com/Melledy/Nebula.git
synced 2026-09-19 17:19:58 +02:00
Implement monolith settle
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package emu.nebula.data.resources;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import emu.nebula.data.BaseDef;
|
||||
import emu.nebula.data.ResourceType;
|
||||
import lombok.Getter;
|
||||
@@ -10,6 +12,8 @@ public class StarTowerDef extends BaseDef {
|
||||
private int Id;
|
||||
private int[] FloorNum;
|
||||
|
||||
private transient int maxFloors;
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return Id;
|
||||
@@ -24,4 +28,9 @@ public class StarTowerDef extends BaseDef {
|
||||
|
||||
return this.FloorNum[index];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
this.maxFloors = Arrays.stream(this.FloorNum).reduce(0, Integer::sum);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user