Skip to content

Commit

Permalink
fix dirty dish pile remaining between session issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Quarri6343 committed May 22, 2023
1 parent a91538a commit b7021c6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public interface IDishPile {
* 皿置場を設置
*/
public void place();

public void reset();

/**
* 設置されている皿置場を消去
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ public void place() {
dishPileEntity = itemFrame;
}

public void reset(){
dishNumber = 0;
}

public void destroy() {
if (location == null) {
Overcrafted.getInstance().getLogger().severe("存在しない座標の皿置場は消せません!");
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/quarri6343/overcrafted/core/object/OCTeams.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ public int countAllPlayers() {
public void clearDishPile(int stageID) {
for (int i = 0; i < getTeamsLength(); i++) {
getTeam(i).getCleanDishPiles().get(stageID).destroy();
getTeam(i).getCleanDishPiles().get(stageID).reset();
getTeam(i).getDirtyDishPiles().get(stageID).destroy();
getTeam(i).getDirtyDishPiles().get(stageID).reset();
}
}

Expand Down

0 comments on commit b7021c6

Please sign in to comment.