mirror of
https://github.com/Melledy/Nebula.git
synced 2026-11-04 21:36:51 +01:00
Implement monolith settle
This commit is contained in:
1 parent
f478105e58
commit
466eab9401
4 files changed
+56
-20
No files matched your search
@@ -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