Files
chrani-bot-tng-mod/build.sh
Claude c4b8e4395c Add local storage for muted players and serveradmin.xml integration
**MuteStorage (JSON Persistence)**:
- Added persistent storage in CHRANIBotTNG/Data/muted_players.json
- Auto-loads muted players on mod init
- Auto-saves on mute/unmute operations
- Thread-safe file operations
- Simple JSON serialization without external dependencies

**AdminManager (serveradmin.xml Integration)**:
- Reads serveradmin.xml to load admin SteamIDs (permission_level < 1000)
- Auto-discovers serveradmin.xml location in common paths
- Caches admin list in memory for fast permission checks
- Supports /bot reload command to refresh admin list

**Updated Commands (Admin-only)**:
- /bot mute <player> - Now requires admin permission and persists
- /bot unmute <player> - Now requires admin permission and persists
- /bot mutelist - List all muted players (admin-only)
- /bot reload - Reload serveradmin.xml (admin-only)

**Build System**:
- Added System.Xml.dll and System.Xml.Linq.dll references

All features integrate seamlessly with existing codebase structure.
2025-11-24 07:04:40 +00:00

20 lines
885 B
Bash
Executable File

#!/bin/bash
# Set your 7DTD installation path
GAME_DIR="${GAME_DIR:-$HOME/Software/SteamLibrary/steamapps/common/7 Days To Die}"
# Use csc (Roslyn compiler) instead of mcs
csc -target:library \
-out:CHRANIBotTNG/CHRANIBotTNG.dll \
-nostdlib \
-r:"$GAME_DIR/7DaysToDie_Data/Managed/mscorlib.dll" \
-r:"$GAME_DIR/7DaysToDie_Data/Managed/netstandard.dll" \
-r:"$GAME_DIR/7DaysToDie_Data/Managed/System.dll" \
-r:"$GAME_DIR/7DaysToDie_Data/Managed/System.Core.dll" \
-r:"$GAME_DIR/7DaysToDie_Data/Managed/System.Xml.dll" \
-r:"$GAME_DIR/7DaysToDie_Data/Managed/System.Xml.Linq.dll" \
-r:"$GAME_DIR/7DaysToDie_Data/Managed/Assembly-CSharp.dll" \
-r:"$GAME_DIR/7DaysToDie_Data/Managed/UnityEngine.CoreModule.dll" \
-r:"/home/ecv/Software/SteamLibrary/steamapps/common/7 Days To Die/Mods/0_TFP_Harmony/0Harmony.dll" \
Harmony/CHRANIBotTNG.cs