Sector item system cleanup

This commit is contained in:
Anuken 2020-12-09 16:26:50 -05:00
parent 999cc9c651
commit 42d66d1136
3 changed files with 4 additions and 5 deletions

View File

@ -152,10 +152,6 @@ public class Sector{
return res % 2 == 0 ? res : res + 1;
}
public void addItem(Item item, int amount){
removeItem(item, -amount);
}
public void removeItems(ItemSeq items){
ItemSeq copy = items.copy();
copy.each((i, a) -> copy.set(i, -a));
@ -169,7 +165,6 @@ public class Sector{
}
public void addItems(ItemSeq items){
if(net.client()) return;
if(isBeingPlayed()){
if(state.rules.defaultTeam.core() != null){

View File

@ -795,6 +795,8 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
}
void playSelected(){
if(selected == null) return;
Sector sector = selected;
if(sector.isBeingPlayed()){

View File

@ -0,0 +1,2 @@
[This is a truncated changelog, see Github for full notes]
- Fixed a common crash related to planet selection