Implement configuration-based mod management and fix navigation spacing
## Major Features Added
### Configuration-Based Mod Management
- Implement proper Luanti mod system using load_mod_* entries in world.mt
- Add mod enable/disable via configuration instead of file copying
- Support both global mods (config-enabled) and world mods (physically installed)
- Clear UI distinction with badges: "Global (Enabled)", "World Copy", "Missing"
- Automatic registry verification to sync database with filesystem state
### Game ID Alias System
- Fix minetest_game/minetest technical debt with proper alias mapping
- Map minetest_game → minetest for world.mt files (matches Luanti internal behavior)
- Reference: c9d4c33174/src/content/subgames.cpp (L21)
### Navigation Improvements
- Fix navigation menu spacing and text overflow issues
- Change "Configuration" to "Config" for better fit
- Implement responsive font sizing with clamp() for better scaling
- Even distribution of nav buttons across full width
### Package Registry Enhancements
- Add verifyAndCleanRegistry() to automatically remove stale package entries
- Periodic verification (every 5 minutes) to keep registry in sync with filesystem
- Fix "already installed" errors for manually deleted packages
- Integration across dashboard, ContentDB, and installation workflows
## Technical Improvements
### Mod System Architecture
- Enhanced ConfigParser to handle load_mod_* entries in world.mt files
- Support for both configuration-based and file-based mod installations
- Proper mod type detection and management workflows
- Updated world details to show comprehensive mod information
### UI/UX Enhancements
- Responsive navigation with proper text scaling
- Improved mod management interface with clear action buttons
- Better visual hierarchy and status indicators
- Enhanced error handling and user feedback
### Code Quality
- Clean up gitignore to properly exclude runtime files
- Add package-lock.json for consistent dependency management
- Remove excess runtime database and log files
- Add .claude/ directory to gitignore
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -184,13 +184,33 @@ class LuantiPaths {
|
||||
// Map directory names to the actual game IDs that Luanti recognizes
|
||||
// For most cases, the directory name IS the game ID
|
||||
const gameIdMap = {
|
||||
// Only add mappings here if you're certain they're needed
|
||||
// 'minetest_game': 'minetest', // This mapping was incorrect
|
||||
// Luanti internal alias mapping - see https://github.com/luanti-org/luanti/blob/c9d4c33174c87ede1f49c5fe5e8e49a784798eb6/src/content/subgames.cpp#L21
|
||||
'minetest_game': 'minetest',
|
||||
};
|
||||
|
||||
return gameIdMap[directoryName] || directoryName;
|
||||
}
|
||||
|
||||
mapGameIdForWorldCreation(gameId) {
|
||||
// When creating worlds, map game IDs that Luanti expects to use different IDs internally
|
||||
// This is the reverse of directory-based detection - we're setting what goes in world.mt
|
||||
const worldGameIdMap = {
|
||||
'minetest_game': 'minetest', // Luanti expects 'minetest' in world.mt even for minetest_game
|
||||
};
|
||||
|
||||
return worldGameIdMap[gameId] || gameId;
|
||||
}
|
||||
|
||||
mapInternalGameIdToDirectory(internalGameId) {
|
||||
// Reverse mapping: convert internal game ID back to directory name for display/reference
|
||||
// This helps when we read a world.mt with "minetest" but want to show "Minetest Game"
|
||||
const reverseGameIdMap = {
|
||||
'minetest': 'minetest_game', // world.mt has 'minetest' but directory is 'minetest_game'
|
||||
};
|
||||
|
||||
return reverseGameIdMap[internalGameId] || internalGameId;
|
||||
}
|
||||
|
||||
async getInstalledGames() {
|
||||
const games = [];
|
||||
// For Flatpak and other sandboxed installations, only look in the configured data directory
|
||||
|
Reference in New Issue
Block a user