Five character slots (AVA2 ENABLE_PLAYER_PER_ACCOUNT5)
PLAYER_PER_ACCOUNT 5: player_index.pid5 in the login/empire/monarch queries, char_change_empire sized by PLAYER_PER_ACCOUNT, slot check relaxed; client gate mt20261029. tools/player-slots5 adds pid5. tools/player-deleted-sync: PLAYER_DELETE copies with SELECT *, so player_deleted must match player column for column; the conqueror schema now adds its columns to player_deleted too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
31ebae050b
commit
96f8486306
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
# Five character slots: player_index.pid5. Idempotent.
|
||||
# sh install.sh <player db> e.g. sh install.sh player_sb
|
||||
# Install before starting a db/game built with ENABLE_PLAYER_PER_ACCOUNT5 (its login queries select pid5).
|
||||
set -e
|
||||
DB=${1:?player db}
|
||||
HERE=$(cd "$(dirname "$0")" && pwd)
|
||||
HAS=$(mysql -uroot -N "$DB" -e "SELECT COUNT(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='$DB' AND TABLE_NAME='player_index' AND COLUMN_NAME='pid5'")
|
||||
[ "$HAS" = 0 ] && mysql -uroot "$DB" < "$HERE/schema.sql"
|
||||
mysql -uroot "$DB" -e "SHOW COLUMNS FROM player_index LIKE 'pid%'"
|
||||
@@ -0,0 +1,2 @@
|
||||
-- Five character slots (ENABLE_PLAYER_PER_ACCOUNT5): player_index gets a fifth pid column.
|
||||
ALTER TABLE player_index ADD pid5 int(11) NOT NULL DEFAULT 0 AFTER pid4, ADD KEY pid5_key (pid5);
|
||||
Reference in New Issue
Block a user