Compare commits
24 Commits
@@ -16,7 +16,8 @@ jobs:
|
|||||||
|
|
||||||
- uses: xmake-io/github-action-setup-xmake@v1
|
- uses: xmake-io/github-action-setup-xmake@v1
|
||||||
with:
|
with:
|
||||||
xmake-version: latest
|
xmake-version: 3.0.0
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
xmake repo -u
|
xmake repo -u
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ jobs:
|
|||||||
|
|
||||||
- uses: xmake-io/github-action-setup-xmake@v1
|
- uses: xmake-io/github-action-setup-xmake@v1
|
||||||
with:
|
with:
|
||||||
xmake-version: latest
|
xmake-version: 3.0.0
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
xmake repo -u
|
xmake repo -u
|
||||||
|
|
||||||
|
|||||||
@@ -101,6 +101,13 @@
|
|||||||
"Cooldown": 120, // 投票冷却时间 单位:秒
|
"Cooldown": 120, // 投票冷却时间 单位:秒
|
||||||
"CheckDelay": 30, // 投票时长 单位:秒
|
"CheckDelay": 30, // 投票时长 单位:秒
|
||||||
"Percentage": 50 // 投票百分比(大于此值则清理)
|
"Percentage": 50 // 投票百分比(大于此值则清理)
|
||||||
|
},
|
||||||
|
"UnloadActorClean": { // 离线实体清理
|
||||||
|
"Enabled": false, // 是否启用
|
||||||
|
"CleanList": [ // 清理实体列表
|
||||||
|
"minecraft:iron_golem", // 铁傀儡
|
||||||
|
"minecraft:zombie_pigman" // 僵尸猪灵
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
+9
-1
@@ -2,12 +2,20 @@
|
|||||||
"name": "${modName}",
|
"name": "${modName}",
|
||||||
"entry": "${modFile}",
|
"entry": "${modFile}",
|
||||||
"type": "native",
|
"type": "native",
|
||||||
"version": "0.13.4",
|
"version": "0.16.1",
|
||||||
"author": "GroupMountain",
|
"author": "GroupMountain",
|
||||||
"description": "Clean Entities",
|
"description": "Clean Entities",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
{
|
{
|
||||||
"name": "GMLIB"
|
"name": "GMLIB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "iListenAttentively"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"optionalDependencies": [
|
||||||
|
{
|
||||||
|
"name": "ModAPI"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -91,5 +91,10 @@ struct Config {
|
|||||||
int CheckDelay = 30;
|
int CheckDelay = 30;
|
||||||
int Percentage = 50;
|
int Percentage = 50;
|
||||||
} VoteClean;
|
} VoteClean;
|
||||||
|
|
||||||
|
struct Unload_Actor_Clean {
|
||||||
|
bool Enabled = false;
|
||||||
|
std::vector<std::string> CleanList = {"minecraft:iron_golem", "minecraft:zombie_pigman"};
|
||||||
|
} UnloadActorClean;
|
||||||
};
|
};
|
||||||
} // namespace Cleaner
|
} // namespace Cleaner
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "Cleaner.h"
|
#include "Cleaner.h"
|
||||||
#include "mc/world/actor/provider/SynchedActorDataAccess.h"
|
#include "mc/world/actor/provider/SynchedActorDataAccess.h"
|
||||||
|
#include "gmlib/mc/world/actor/Actor.h"
|
||||||
namespace Cleaner {
|
namespace Cleaner {
|
||||||
|
|
||||||
bool isMatch(std::string& A, std::string& B) {
|
bool isMatch(std::string& A, std::string& B) {
|
||||||
@@ -18,7 +18,7 @@ bool isMatch(std::string& A, std::string& B) {
|
|||||||
|
|
||||||
bool isTrust(Actor* ac) { return SynchedActorDataAccess::getActorFlag(ac->getEntityContext(), ::ActorFlags::Trusting); }
|
bool isTrust(Actor* ac) { return SynchedActorDataAccess::getActorFlag(ac->getEntityContext(), ::ActorFlags::Trusting); }
|
||||||
|
|
||||||
bool shouldIgnore(gmlib::world::actor::GMActor* ac) {
|
bool shouldIgnore(gmlib::GMActor* ac) {
|
||||||
if (ac->hasCategory(::ActorCategory::Mob) || ac->hasCategory(::ActorCategory::Item)) {
|
if (ac->hasCategory(::ActorCategory::Mob) || ac->hasCategory(::ActorCategory::Item)) {
|
||||||
if (ac->isTame() || isTrust(ac) || ac->getNameTag() != "" || ac->hasTag("cleaner:ignore")) {
|
if (ac->isTame() || isTrust(ac) || ac->getNameTag() != "" || ac->hasTag("cleaner:ignore")) {
|
||||||
return true;
|
return true;
|
||||||
@@ -30,7 +30,7 @@ bool shouldIgnore(gmlib::world::actor::GMActor* ac) {
|
|||||||
bool ShouldClean(Actor* actor) {
|
bool ShouldClean(Actor* actor) {
|
||||||
// Players
|
// Players
|
||||||
auto& config = Cleaner::Entry::getInstance().getConfig();
|
auto& config = Cleaner::Entry::getInstance().getConfig();
|
||||||
auto en = (gmlib::world::actor::GMActor*)actor;
|
auto en = (gmlib::GMActor*)actor;
|
||||||
if (en->isPlayer() || shouldIgnore(en)) {
|
if (en->isPlayer() || shouldIgnore(en)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "Cleaner.h"
|
#include "Cleaner.h"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include "gmlib/mc/world/Level.h"
|
||||||
|
#include "gmlib/gm/data/TpsStatus.h"
|
||||||
namespace Cleaner {
|
namespace Cleaner {
|
||||||
|
|
||||||
static std::shared_ptr<bool> mAutoCleanTask = std::make_shared<bool>(false);
|
static std::shared_ptr<bool> mAutoCleanTask = std::make_shared<bool>(false);
|
||||||
@@ -109,9 +110,9 @@ void CleanTaskTPS(float min_tps) {
|
|||||||
co_await 10s;
|
co_await 10s;
|
||||||
if (*mCleanTaskTPS == false) co_return;
|
if (*mCleanTaskTPS == false) co_return;
|
||||||
if (auto_clean_triggerred == false) {
|
if (auto_clean_triggerred == false) {
|
||||||
if (gmlib::world::GMLevel::getInstance()->getServerAverageTps() <= min_tps) {
|
if (gmlib::TpsStatus::getInstance().getLevelAverageTps() <= min_tps) {
|
||||||
auto_clean_triggerred = true;
|
auto_clean_triggerred = true;
|
||||||
auto mspt = S(gmlib::world::GMLevel::getInstance()->getServerAverageTps());
|
auto mspt = S(gmlib::TpsStatus::getInstance().getLevelAverageTps());
|
||||||
if (config.Basic.ConsoleLog) {
|
if (config.Basic.ConsoleLog) {
|
||||||
ll::io::LoggerRegistry::getInstance().getOrCreate("Cleaner")->warn(
|
ll::io::LoggerRegistry::getInstance().getOrCreate("Cleaner")->warn(
|
||||||
tr("cleaner.output.triggerAutoCleanTps", {mspt})
|
tr("cleaner.output.triggerAutoCleanTps", {mspt})
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ namespace Cleaner {
|
|||||||
|
|
||||||
void loadCleaner() {
|
void loadCleaner() {
|
||||||
auto& config = Cleaner::Entry::getInstance().getConfig();
|
auto& config = Cleaner::Entry::getInstance().getConfig();
|
||||||
|
if(config.UnloadActorClean.Enabled){
|
||||||
|
UnloadActorClean::cleanUnloadActor();
|
||||||
|
}
|
||||||
if (config.ScheduleClean.Enabled) {
|
if (config.ScheduleClean.Enabled) {
|
||||||
Cleaner::AutoCleanTask(config.ScheduleClean.CleanInterval);
|
Cleaner::AutoCleanTask(config.ScheduleClean.CleanInterval);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,3 +27,9 @@ namespace VoteClean {
|
|||||||
extern void voteCommandExecute(Player* pl);
|
extern void voteCommandExecute(Player* pl);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace UnloadActorClean {
|
||||||
|
|
||||||
|
extern void cleanUnloadActor();
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
#include "Cleaner.h"
|
#include "Cleaner.h"
|
||||||
|
#include "gmlib/mc/world/Level.h"
|
||||||
|
#include "gmlib/mc/world/actor/Player.h"
|
||||||
namespace Cleaner {
|
namespace Cleaner {
|
||||||
void setShouldIgnore(gmlib::world::actor::GMActor* ac) { ac->addTag("cleaner:ignore"); }
|
void setShouldIgnore(gmlib::GMActor* ac) { ac->addTag("cleaner:ignore"); }
|
||||||
|
|
||||||
void ListenEvents() {
|
void ListenEvents() {
|
||||||
auto& eventBus = ll::event::EventBus::getInstance();
|
auto& eventBus = ll::event::EventBus::getInstance();
|
||||||
@@ -10,28 +11,28 @@ void ListenEvents() {
|
|||||||
eventBus.emplaceListener<ila::mc::SpawnItemActorAfterEvent>([&config](ila::mc::SpawnItemActorAfterEvent& event) {
|
eventBus.emplaceListener<ila::mc::SpawnItemActorAfterEvent>([&config](ila::mc::SpawnItemActorAfterEvent& event) {
|
||||||
auto& item = event.itemActor();
|
auto& item = event.itemActor();
|
||||||
if (event.spawner()) {
|
if (event.spawner()) {
|
||||||
auto pl = (gmlib::world::actor::GMPlayer*)event.spawner();
|
auto pl = (gmlib::GMPlayer*)event.spawner();
|
||||||
if (pl->isPlayer() && !pl->isAlive()) { // Death Drop
|
if (pl->isPlayer() && !pl->isAlive()) { // Death Drop
|
||||||
auto ac = (gmlib::world::actor::GMActor*)&item;
|
auto ac = (gmlib::GMActor*)&item;
|
||||||
setShouldIgnore(ac);
|
setShouldIgnore(ac);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (config.ItemDespawn.Enabled) {
|
if (config.ItemDespawn.Enabled) {
|
||||||
item->lifeTime() = config.ItemDespawn.DespawnTime;
|
// item.lifeTime() = config.ItemDespawn.DespawnTime;
|
||||||
auto list = config.ItemDespawn.WhiteList;
|
auto list = config.ItemDespawn.WhiteList;
|
||||||
auto type = item->item().getTypeName();
|
auto type = item.item().getTypeName();
|
||||||
for (auto& key : list) {
|
for (auto& key : list) {
|
||||||
if (isMatch(type, key)) {
|
if (isMatch(type, key)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
item->lifeTime() = config.ItemDespawn.DespawnTime;
|
item.lifeTime() = config.ItemDespawn.DespawnTime;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// MobTakeItemEvent
|
// MobTakeItemEvent
|
||||||
eventBus.emplaceListener<ila::mc::ActorPickupItemAfterEvent>([](ila::mc::ActorPickupItemAfterEvent& event) {
|
eventBus.emplaceListener<ila::mc::ActorPickupItemAfterEvent>([](ila::mc::ActorPickupItemAfterEvent& event) {
|
||||||
auto mob = (gmlib::world::actor::GMActor*)&event.self();
|
auto mob = (gmlib::GMActor*)&event.self();
|
||||||
setShouldIgnore(mob);
|
setShouldIgnore(mob);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
#include "Global.h"
|
#include "Global.h"
|
||||||
|
#include "gmlib/mc/world/Level.h"
|
||||||
namespace Helper {
|
namespace Helper {
|
||||||
|
|
||||||
void broadcastMessage(std::string_view msg) {
|
void broadcastMessage(std::string_view msg) {
|
||||||
gmlib::world::GMLevel::getInstance()->broadcast(tr("cleaner.info.prefix") + std::string(msg));
|
gmlib::GMLevel::getInstance()->broadcast(tr("cleaner.info.prefix") + std::string(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
void broadcastToast(std::string_view msg) {
|
void broadcastToast(std::string_view msg) {
|
||||||
gmlib::world::GMLevel::getInstance()->broadcastToast(tr("cleaner.info.prefix"), msg);
|
gmlib::GMLevel::getInstance()->broadcastToast(tr("cleaner.info.prefix"), msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Helper
|
} // namespace Helper
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
#include "Cleaner.h"
|
||||||
|
#include "Global.h"
|
||||||
|
#include "gmlib/mc/world/actor/UnloadedActor.h"
|
||||||
|
|
||||||
|
namespace UnloadActorClean {
|
||||||
|
void cleanUnloadActor() {
|
||||||
|
auto& config = Cleaner::Entry::getInstance().getConfig();
|
||||||
|
gmlib::UnloadedActor::foreachUnloadedActor(
|
||||||
|
[config](gmlib::UnloadedActor& actor) -> bool {
|
||||||
|
for (auto& actorname : config.UnloadActorClean.CleanList) {
|
||||||
|
if (actor.getTypeName() == actorname) {
|
||||||
|
actor.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} // namespace UnloadActorClean
|
||||||
@@ -94,12 +94,12 @@ void voteClean(Player* pl) {
|
|||||||
}
|
}
|
||||||
sendVoteForm(pl);
|
sendVoteForm(pl);
|
||||||
ll::coro::keepThis([&config]() -> ll::coro::CoroTask<> {
|
ll::coro::keepThis([&config]() -> ll::coro::CoroTask<> {
|
||||||
co_await std::chrono::seconds::duration(config.VoteClean.Cooldown);
|
co_await std::chrono::seconds(config.VoteClean.Cooldown);
|
||||||
canVote = true;
|
canVote = true;
|
||||||
co_return;
|
co_return;
|
||||||
}).launch(ll::thread::ServerThreadExecutor::getDefault());
|
}).launch(ll::thread::ServerThreadExecutor::getDefault());
|
||||||
ll::coro::keepThis([&config]() -> ll::coro::CoroTask<> {
|
ll::coro::keepThis([&config]() -> ll::coro::CoroTask<> {
|
||||||
co_await std::chrono::seconds::duration(config.VoteClean.CheckDelay);
|
co_await std::chrono::seconds(config.VoteClean.CheckDelay);
|
||||||
checkVote();
|
checkVote();
|
||||||
co_return;
|
co_return;
|
||||||
}).launch(ll::thread::ServerThreadExecutor::getDefault());
|
}).launch(ll::thread::ServerThreadExecutor::getDefault());
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
// IWYU pragma: begin_exports
|
// IWYU pragma: begin_exports
|
||||||
#include "Mod.h"
|
#include "Mod.h"
|
||||||
#include "gmlib/include_lib.h"
|
|
||||||
#include "gmlib/include_ll.h"
|
#include "gmlib/include_ll.h"
|
||||||
#include "ila/include_all.h"
|
#include "ila/include_all.h"
|
||||||
#include <regex>
|
#include <regex>
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@ std::string zh_CN = R"(
|
|||||||
cleaner.command.error.noTarget=没有与选择器匹配的目标
|
cleaner.command.error.noTarget=没有与选择器匹配的目标
|
||||||
cleaner.command.error.playerOnly=该命令只能由玩家执行!
|
cleaner.command.error.playerOnly=该命令只能由玩家执行!
|
||||||
cleaner.command.tps.output=当前服务器实时TPS %1$s §r,平均TPS %2$s
|
cleaner.command.tps.output=当前服务器实时TPS %1$s §r,平均TPS %2$s
|
||||||
cleaner.command.mspt.output=当前服务器实MSPT %1$s
|
cleaner.command.mspt.output=当前服务器实时MSPT %1$s
|
||||||
cleaner.command.clean.output=已成功启动清理任务!
|
cleaner.command.clean.output=已成功启动清理任务!
|
||||||
cleaner.command.voteclean=发起实体清理投票。
|
cleaner.command.voteclean=发起实体清理投票。
|
||||||
cleaner.command.despawntime=已成功将物品消失时间设置为 %1$s 游戏刻
|
cleaner.command.despawntime=已成功将物品消失时间设置为 %1$s 游戏刻
|
||||||
|
|||||||
+12
-4
@@ -2,6 +2,9 @@
|
|||||||
#include "Features/Cleaner.h"
|
#include "Features/Cleaner.h"
|
||||||
#include "Global.h"
|
#include "Global.h"
|
||||||
#include "Language.h"
|
#include "Language.h"
|
||||||
|
#include "ll/api/utils/ErrorUtils.h"
|
||||||
|
#include "gmlib/mc/locale/I18nAPI.h"
|
||||||
|
#include "gmlib/gm/data/TpsStatus.h"
|
||||||
|
|
||||||
namespace Cleaner {
|
namespace Cleaner {
|
||||||
|
|
||||||
@@ -13,12 +16,17 @@ Entry& Entry::getInstance() {
|
|||||||
bool Entry::load() { return true; }
|
bool Entry::load() { return true; }
|
||||||
|
|
||||||
bool Entry::enable() {
|
bool Entry::enable() {
|
||||||
|
(void)gmlib::TpsStatus::getInstance();
|
||||||
mConfig.emplace();
|
mConfig.emplace();
|
||||||
|
try {
|
||||||
ll::config::loadConfig(*mConfig, getSelf().getConfigDir() / "config.json");
|
ll::config::loadConfig(*mConfig, getSelf().getConfigDir() / "config.json");
|
||||||
|
} catch (...) {
|
||||||
|
ll::error_utils::printCurrentException(getSelf().getLogger());
|
||||||
|
}
|
||||||
saveConfig();
|
saveConfig();
|
||||||
gmlib::locale::I18nAPI::updateOrCreateLanguageFile(getSelf().getLangDir(), "en_US", en_US);
|
gmlib::I18nAPI::updateOrCreateLanguageFile(getSelf().getLangDir(), "en_US", en_US);
|
||||||
gmlib::locale::I18nAPI::updateOrCreateLanguageFile(getSelf().getLangDir(), "zh_CN", zh_CN);
|
gmlib::I18nAPI::updateOrCreateLanguageFile(getSelf().getLangDir(), "zh_CN", zh_CN);
|
||||||
gmlib::locale::I18nAPI::loadLanguagesFromDirectory(getSelf().getLangDir());
|
gmlib::I18nAPI::loadLanguagesFromDirectory(getSelf().getLangDir());
|
||||||
Cleaner::ListenEvents();
|
Cleaner::ListenEvents();
|
||||||
RegisterCommands();
|
RegisterCommands();
|
||||||
Cleaner::loadCleaner();
|
Cleaner::loadCleaner();
|
||||||
@@ -43,5 +51,5 @@ void Entry::saveConfig() { ll::config::saveConfig(*mConfig, getSelf().getConfigD
|
|||||||
LL_REGISTER_MOD(Cleaner::Entry, Cleaner::Entry::getInstance());
|
LL_REGISTER_MOD(Cleaner::Entry, Cleaner::Entry::getInstance());
|
||||||
|
|
||||||
std::string tr(std::string const& key, std::vector<std::string> const& params) {
|
std::string tr(std::string const& key, std::vector<std::string> const& params) {
|
||||||
return gmlib::locale::I18nAPI::get(key, params);
|
return gmlib::I18nAPI::get(key, params);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#include "Features/Cleaner.h"
|
#include "Features/Cleaner.h"
|
||||||
|
#include "gmlib/mc/world/Level.h"
|
||||||
|
#include "gmlib/gm/data/TpsStatus.h"
|
||||||
|
#include "mc/server/commands/CommandOutput.h"
|
||||||
struct CleanerParam {
|
struct CleanerParam {
|
||||||
enum class Despawn { despawn } despawn;
|
enum class Despawn { despawn } despawn;
|
||||||
enum class Action { tps, clean, reload, mspt } action;
|
enum class Action { tps, clean, reload, mspt } action;
|
||||||
@@ -10,7 +12,7 @@ struct CleanerParam {
|
|||||||
|
|
||||||
void RegCleanerCommand() {
|
void RegCleanerCommand() {
|
||||||
auto& config = Cleaner::Entry::getInstance().getConfig();
|
auto& config = Cleaner::Entry::getInstance().getConfig();
|
||||||
auto& cmd = ll::command::CommandRegistrar::getInstance().getOrCreateCommand(
|
auto& cmd = ll::command::CommandRegistrar::getInstance(false).getOrCreateCommand(
|
||||||
config.Basic.Command,
|
config.Basic.Command,
|
||||||
tr("cleaner.command.cleaner"),
|
tr("cleaner.command.cleaner"),
|
||||||
CommandPermissionLevel::GameDirectors
|
CommandPermissionLevel::GameDirectors
|
||||||
@@ -46,13 +48,13 @@ void RegCleanerCommand() {
|
|||||||
case CleanerParam::Action::tps: {
|
case CleanerParam::Action::tps: {
|
||||||
return output.success(
|
return output.success(
|
||||||
tr("cleaner.command.tps.output",
|
tr("cleaner.command.tps.output",
|
||||||
{S(gmlib::world::GMLevel::getInstance()->getServerCurrentTps()),
|
{S(gmlib::GMLevel::getInstance()->getServerCurrentTps()),
|
||||||
S(gmlib::world::GMLevel::getInstance()->getServerAverageTps())})
|
S(gmlib::TpsStatus::getInstance().getLevelAverageTps())})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
case CleanerParam::Action::mspt: {
|
case CleanerParam::Action::mspt: {
|
||||||
return output.success(
|
return output.success(
|
||||||
tr("cleaner.command.mspt.output", {S(gmlib::world::GMLevel::getInstance()->getServerMspt())})
|
tr("cleaner.command.mspt.output", {S(gmlib::GMLevel::getInstance()->getServerMspt())})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
case CleanerParam::Action::reload: {
|
case CleanerParam::Action::reload: {
|
||||||
@@ -73,7 +75,7 @@ void RegCleanerCommand() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void RegVoteCommand() {
|
void RegVoteCommand() {
|
||||||
auto& cmd = ll::command::CommandRegistrar::getInstance().getOrCreateCommand(
|
auto& cmd = ll::command::CommandRegistrar::getInstance(false).getOrCreateCommand(
|
||||||
Cleaner::Entry::getInstance().getConfig().VoteClean.VoteCleanCommand,
|
Cleaner::Entry::getInstance().getConfig().VoteClean.VoteCleanCommand,
|
||||||
tr("cleaner.command.voteclean"),
|
tr("cleaner.command.voteclean"),
|
||||||
CommandPermissionLevel::Any
|
CommandPermissionLevel::Any
|
||||||
|
|||||||
+11
-5
@@ -2,11 +2,15 @@
|
|||||||
"format_version": 3,
|
"format_version": 3,
|
||||||
"format_uuid": "289f771f-2c9a-4d73-9f3f-8492495a924d",
|
"format_uuid": "289f771f-2c9a-4d73-9f3f-8492495a924d",
|
||||||
"tooth": "github.com/GroupMountain/Cleaner",
|
"tooth": "github.com/GroupMountain/Cleaner",
|
||||||
"version": "0.13.4",
|
"version": "0.16.1",
|
||||||
"info": {
|
"info": {
|
||||||
"name": "Cleaner",
|
"name": "Cleaner",
|
||||||
"description": "A Powerful Entities Cleaning up Mod for BDS",
|
"description": "A Powerful Entities Cleaning up Mod for BDS",
|
||||||
"tags": ["levilamina", "cleaner", "gmlib"],
|
"tags": [
|
||||||
|
"levilamina",
|
||||||
|
"cleaner",
|
||||||
|
"gmlib"
|
||||||
|
],
|
||||||
"avatar_url": ""
|
"avatar_url": ""
|
||||||
},
|
},
|
||||||
"variants": [
|
"variants": [
|
||||||
@@ -14,19 +18,21 @@
|
|||||||
"label": "",
|
"label": "",
|
||||||
"platform": "win-x64",
|
"platform": "win-x64",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"github.com/GroupMountain/GMLIB": ">= 1.0.0"
|
"github.com/GroupMountain/GMLIB-Release": ">=1.9.0",
|
||||||
|
"github.com/GroupMountain/ModAPI-Release": ">=0.4.0",
|
||||||
|
"github.com/MiracleForest/iListenAttentively-Release": ">=0.11.0"
|
||||||
},
|
},
|
||||||
"assets": [
|
"assets": [
|
||||||
{
|
{
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"urls": [
|
"urls": [
|
||||||
"https://github.com/GroupMountain/Cleaner/releases/download/v0.13.4/Cleaner-windows-x64.zip"
|
"https://github.com/GroupMountain/Cleaner/releases/download/v{{version}}/Cleaner-windows-x64.zip"
|
||||||
],
|
],
|
||||||
"placements": [
|
"placements": [
|
||||||
{
|
{
|
||||||
"type": "dir",
|
"type": "dir",
|
||||||
"src": "Cleaner/",
|
"src": "Cleaner/",
|
||||||
"dest": "mods/Cleaner"
|
"dest": "plugins/Cleaner"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ if not has_config("vs_runtime") then
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Option 1: Use the latest version of LeviLamina released on GitHub.
|
-- Option 1: Use the latest version of LeviLamina released on GitHub.
|
||||||
add_requires("levilamina")
|
add_requires("levilamina 1.9.5", {configs = {target_type = "server"}})
|
||||||
add_requires("levibuildscript")
|
add_requires("levibuildscript 0.6.0")
|
||||||
add_requires("gmlib")
|
add_requires("gmlib 1.9.1")
|
||||||
add_requires("ilistenattentively")
|
add_requires("ilistenattentively 0.11.0")
|
||||||
|
|
||||||
target("Cleaner") -- Change this to your mod name.
|
target("Cleaner") -- Change this to your mod name.
|
||||||
add_cxflags(
|
add_cxflags(
|
||||||
@@ -33,14 +33,14 @@ target("Cleaner") -- Change this to your mod name.
|
|||||||
add_defines(
|
add_defines(
|
||||||
"NOMINMAX",
|
"NOMINMAX",
|
||||||
"UNICODE",
|
"UNICODE",
|
||||||
"_HAS_CXX17",
|
"_HAS_CXX23=1"
|
||||||
"_HAS_CXX20",
|
|
||||||
"_HAS_CXX23"
|
|
||||||
)
|
)
|
||||||
|
add_defines("LL_PLAT_S") --TODO: check client compatibility
|
||||||
add_rules("@levibuildscript/linkrule")
|
add_rules("@levibuildscript/linkrule")
|
||||||
set_exceptions("none")
|
set_exceptions("none")
|
||||||
set_kind("shared")
|
set_kind("shared")
|
||||||
set_languages("cxx23")
|
set_languages("cxx20")
|
||||||
|
set_symbols("debug")
|
||||||
|
|
||||||
after_build(function (target)
|
after_build(function (target)
|
||||||
local mod_packer = import("scripts.after_build")
|
local mod_packer = import("scripts.after_build")
|
||||||
|
|||||||
Reference in New Issue
Block a user