Sector item system cleanup
This commit is contained in:
@@ -152,10 +152,6 @@ public class Sector{
|
|||||||
return res % 2 == 0 ? res : res + 1;
|
return res % 2 == 0 ? res : res + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addItem(Item item, int amount){
|
|
||||||
removeItem(item, -amount);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void removeItems(ItemSeq items){
|
public void removeItems(ItemSeq items){
|
||||||
ItemSeq copy = items.copy();
|
ItemSeq copy = items.copy();
|
||||||
copy.each((i, a) -> copy.set(i, -a));
|
copy.each((i, a) -> copy.set(i, -a));
|
||||||
@@ -169,7 +165,6 @@ public class Sector{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addItems(ItemSeq items){
|
public void addItems(ItemSeq items){
|
||||||
if(net.client()) return;
|
|
||||||
|
|
||||||
if(isBeingPlayed()){
|
if(isBeingPlayed()){
|
||||||
if(state.rules.defaultTeam.core() != null){
|
if(state.rules.defaultTeam.core() != null){
|
||||||
|
|||||||
@@ -795,6 +795,8 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
}
|
}
|
||||||
|
|
||||||
void playSelected(){
|
void playSelected(){
|
||||||
|
if(selected == null) return;
|
||||||
|
|
||||||
Sector sector = selected;
|
Sector sector = selected;
|
||||||
|
|
||||||
if(sector.isBeingPlayed()){
|
if(sector.isBeingPlayed()){
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
[This is a truncated changelog, see Github for full notes]
|
||||||
|
- Fixed a common crash related to planet selection
|
||||||
Reference in New Issue
Block a user