添加
This commit is contained in:
@@ -25,23 +25,33 @@ class ConsoleCommandsAPI:
|
||||
"""
|
||||
self.server = server
|
||||
self.commands = {
|
||||
#添加命令
|
||||
"addmoney": self.cmd_add_money, # 给玩家添加金币
|
||||
"addxp": self.cmd_add_experience, # 给玩家添加经验值
|
||||
"addlevel": self.cmd_add_level, # 给玩家添加等级
|
||||
"addseed": self.cmd_add_seed, # 给玩家添加种子
|
||||
#杂项命令
|
||||
"lsplayer": self.cmd_list_players, # 列出所有玩家
|
||||
"playerinfo": self.cmd_player_info, # 查看玩家信息
|
||||
"ban": self.cmd_ban_player, # 踢出玩家
|
||||
"weather": self.cmd_weather, # 设置天气
|
||||
"help": self.cmd_help, # 显示帮助信息
|
||||
#重置命令
|
||||
"resetland": self.cmd_reset_land, # 重置玩家土地
|
||||
"repasswd": self.cmd_reset_password, # 重置玩家密码
|
||||
"rename": self.cmd_rename_player, # 重命名玩家昵称
|
||||
"refarmname": self.cmd_rename_farm, # 重命名农场名称
|
||||
"ban": self.cmd_ban_player, # 踢出玩家
|
||||
"weather": self.cmd_weather, # 设置天气
|
||||
"help": self.cmd_help, # 显示帮助信息
|
||||
|
||||
#服务器管理命令
|
||||
"stop": self.cmd_stop, # 停止服务器
|
||||
#重启服务器
|
||||
#查看服务器状态
|
||||
|
||||
#玩家配置数据库命令(未测试)
|
||||
"save": self.cmd_save_all, # 保存所有玩家数据
|
||||
"reload": self.cmd_reload_config, # 重新加载配置文件
|
||||
# MongoDB管理命令
|
||||
|
||||
# MongoDB管理命令(未测试)
|
||||
"dbtest": self.cmd_db_test, # 测试MongoDB连接
|
||||
"dbconfig": self.cmd_db_config, # 配置MongoDB连接
|
||||
"dbchat": self.cmd_db_chat, # 管理聊天数据
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 22 KiB |
BIN
assets/作物/咖啡豆/未成熟.webp
Normal file
BIN
assets/作物/咖啡豆/未成熟.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
34
assets/作物/检测是否缺少图片.py
Normal file
34
assets/作物/检测是否缺少图片.py
Normal file
@@ -0,0 +1,34 @@
|
||||
import os
|
||||
|
||||
def check_folders():
|
||||
# 获取当前脚本所在目录
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
# 需要检查的文件名
|
||||
required_files = {
|
||||
"未成熟.webp",
|
||||
"成熟.webp",
|
||||
"幼苗.webp",
|
||||
"收获物.webp"
|
||||
}
|
||||
|
||||
# 遍历当前目录下的所有项
|
||||
for item in os.listdir(script_dir):
|
||||
item_path = os.path.join(script_dir, item)
|
||||
|
||||
# 只处理文件夹
|
||||
if os.path.isdir(item_path):
|
||||
# 获取文件夹中的所有文件
|
||||
folder_files = set(os.listdir(item_path))
|
||||
|
||||
# 检查是否缺少必要文件
|
||||
missing_files = required_files - folder_files
|
||||
|
||||
# 如果有缺少的文件,输出文件夹名称
|
||||
if missing_files:
|
||||
print(f"文件夹 '{item}' 缺少以下文件: {', '.join(missing_files)}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
check_folders()
|
||||
print("检查完成")
|
||||
|
||||
Reference in New Issue
Block a user