Skip to content

Commit

Permalink
自定义商店界面以及物品
Browse files Browse the repository at this point in the history
  • Loading branch information
Sobadfish committed Jan 15, 2024
1 parent 02f99b5 commit 96902ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ public static GameRoomConfig createGameRoom(String name, int size, int maxSize){
BedWarMain.sendMessageToConsole("创建文件夹 shop 失败");
}

BedWarMain.getBedWarMain().saveResource("shop/shop_classify.yml","/rooms/"+name+"/shop/shop_classify.yml",false);
BedWarMain.getBedWarMain().saveResource("shop/shopClassify.yml","/rooms/"+name+"/shop/shopClassify.yml",false);
BedWarMain.getBedWarMain().saveResource("shop/defaultShop.yml","/rooms/"+name+"/shop/defaultShop.yml",false);
BedWarMain.getBedWarMain().saveResource("shop/teamShop.yml","/rooms/"+name+"/shop/teamShop.yml",false);
BedWarMain.getBedWarMain().saveResource("item.yml","/rooms/"+name+"/item.yml",false);
Expand Down Expand Up @@ -608,8 +608,8 @@ public static GameRoomConfig getGameRoomConfigByFile(String name, File file){
if(!new File(file+"/shop/teamShop.yml").exists()) {
BedWarMain.getBedWarMain().saveResource("shop/teamShop.yml", "/rooms/" + name + "/shop/teamShop.yml", false);
}
if(!new File(file+"/shop/shop_classify.yml").exists()) {
BedWarMain.getBedWarMain().saveResource("shop/shop_classify.yml", "/rooms/" + name + "/shop/shop_classify.yml", false);
if(!new File(file+"/shop/shopClassify.yml").exists()) {
BedWarMain.getBedWarMain().saveResource("shop/shopClassify.yml", "/rooms/" + name + "/shop/shopClassify.yml", false);
}
}
if(!new File(file+"/event.yml").exists()){
Expand All @@ -620,7 +620,7 @@ public static GameRoomConfig getGameRoomConfigByFile(String name, File file){
}
//TODO 实现商店
//先加载配置项
Config classShop = new Config(shopDir+"/shop_classify.yml",Config.YAML);
Config classShop = new Config(shopDir+"/shopClassify.yml",Config.YAML);
List<ShopInfoConfig.ShopItemClassify> shopItemClassifies = new ArrayList<>();
for(Map.Entry<String,Object> entry: classShop.getAll().entrySet()){
Object obj = entry.getValue();
Expand Down
File renamed without changes.

0 comments on commit 96902ae

Please sign in to comment.