This commit is contained in:
2026-03-09 21:50:11 +04:00
parent ab723de95f
commit feceaab626
4 changed files with 55 additions and 11 deletions
+32 -6
View File
@@ -272,7 +272,7 @@ sync_module_dists() {
}
write_autobalance_conf() {
write_file "$MODULES_ETC_DIR/AutoBalance.conf" <<EOF
write_file "$MODULES_ETC_DIR/AutoBalance.conf.dist" <<EOF
[worldserver]
# Managed by ./setup-modules.sh
@@ -306,7 +306,7 @@ EOF
}
write_individual_progression_conf() {
write_file "$MODULES_ETC_DIR/individualProgression.conf" <<EOF
write_file "$MODULES_ETC_DIR/individualProgression.conf.dist" <<EOF
[worldserver]
# Managed by ./setup-modules.sh
@@ -333,7 +333,7 @@ EOF
}
write_aoe_loot_conf() {
write_file "$MODULES_ETC_DIR/mod_aoe_loot.conf" <<EOF
write_file "$MODULES_ETC_DIR/mod_aoe_loot.conf.dist" <<EOF
# Managed by ./setup-modules.sh
AOELoot.Enable = ${ACORE_AOE_LOOT_ENABLE}
AOELoot.Message = ${ACORE_AOE_LOOT_MESSAGE}
@@ -343,7 +343,7 @@ EOF
}
write_eluna_conf() {
write_file "$MODULES_ETC_DIR/mod_eluna.conf" <<EOF
write_file "$MODULES_ETC_DIR/mod_eluna.conf.dist" <<EOF
[worldserver]
# Managed by ./setup-modules.sh
@@ -357,7 +357,7 @@ EOF
}
write_learnspells_conf() {
write_file "$MODULES_ETC_DIR/mod_learnspells.conf" <<EOF
write_file "$MODULES_ETC_DIR/mod_learnspells.conf.dist" <<EOF
[worldserver]
# Managed by ./setup-modules.sh
@@ -397,7 +397,7 @@ write_playerbots_conf() {
return
fi
write_file "$MODULES_ETC_DIR/playerbots.conf" <<EOF
write_file "$MODULES_ETC_DIR/playerbots.conf.dist" <<EOF
# Managed by ./setup-modules.sh
AiPlayerbot.Enabled = ${ACORE_PLAYERBOTS_ENABLED}
AiPlayerbot.RandomBotAutologin = ${ACORE_PLAYERBOTS_RANDOM_BOT_AUTOLOGIN}
@@ -465,6 +465,31 @@ ensure_runtime_dirs() {
mkdir -p "$ROOT_DIR/lua_scripts"
}
cleanup_legacy_module_overrides() {
local legacy_files=(
"$MODULES_ETC_DIR/AutoBalance.conf"
"$MODULES_ETC_DIR/individualProgression.conf"
"$MODULES_ETC_DIR/mod_aoe_loot.conf"
"$MODULES_ETC_DIR/mod_eluna.conf"
"$MODULES_ETC_DIR/mod_learnspells.conf"
"$MODULES_ETC_DIR/playerbots.conf"
)
local path
for path in "${legacy_files[@]}"; do
if [[ ! -e "$path" ]]; then
continue
fi
if (( DRY_RUN )); then
log "would remove legacy override ${path#$ROOT_DIR/}"
continue
fi
rm -f "$path"
done
}
main() {
while (($#)); do
case "$1" in
@@ -492,6 +517,7 @@ main() {
ensure_runtime_dirs
sync_module_dists
cleanup_legacy_module_overrides
configure_worldserver
write_autobalance_conf
write_individual_progression_conf