Enhance NPC creation functionality and validation in Admin module
- Updated AdminController to validate the count parameter, ensuring it is between 1 and 500. - Refactored NPC creation logic in AdminService to create NPCs for each city-title combination, improving efficiency. - Enhanced frontend localization files to reflect changes in count descriptions and validation messages. - Updated CreateNPCView to provide user guidance on count input and display detailed creation results.
This commit is contained in:
@@ -122,18 +122,20 @@
|
||||
"to": "bis",
|
||||
"years": "Jahre",
|
||||
"titleRange": "Titel-Bereich",
|
||||
"count": "Anzahl",
|
||||
"count": "Anzahl pro Stadt-Titel-Kombination",
|
||||
"countHelp": "Diese Anzahl wird für jede Kombination aus gewählter Stadt und Titel erstellt.",
|
||||
"create": "NPCs erstellen",
|
||||
"creating": "Erstelle...",
|
||||
"result": "Ergebnis",
|
||||
"createdCount": "{count} NPCs wurden erstellt.",
|
||||
"combinationInfo": "{perCombination} NPCs pro Kombination × {combinations} Kombinationen = {count} NPCs insgesamt",
|
||||
"age": "Alter",
|
||||
"errorLoadingRegions": "Fehler beim Laden der Städte.",
|
||||
"errorLoadingTitles": "Fehler beim Laden der Titel.",
|
||||
"errorCreating": "Fehler beim Erstellen der NPCs.",
|
||||
"invalidAgeRange": "Ungültiger Altersbereich.",
|
||||
"invalidTitleRange": "Ungültiger Titel-Bereich.",
|
||||
"invalidCount": "Ungültige Anzahl (1-100)."
|
||||
"invalidCount": "Ungültige Anzahl (1-500)."
|
||||
}
|
||||
},
|
||||
"chatrooms": {
|
||||
|
||||
@@ -149,18 +149,20 @@
|
||||
"to": "to",
|
||||
"years": "years",
|
||||
"titleRange": "Title Range",
|
||||
"count": "Count",
|
||||
"count": "Count per City-Title Combination",
|
||||
"countHelp": "This count will be created for each combination of selected city and title.",
|
||||
"create": "Create NPCs",
|
||||
"creating": "Creating...",
|
||||
"result": "Result",
|
||||
"createdCount": "{count} NPCs have been created.",
|
||||
"combinationInfo": "{perCombination} NPCs per combination × {combinations} combinations = {count} NPCs total",
|
||||
"age": "Age",
|
||||
"errorLoadingRegions": "Error loading cities.",
|
||||
"errorLoadingTitles": "Error loading titles.",
|
||||
"errorCreating": "Error creating NPCs.",
|
||||
"invalidAgeRange": "Invalid age range.",
|
||||
"invalidTitleRange": "Invalid title range.",
|
||||
"invalidCount": "Invalid count (1-100)."
|
||||
"invalidCount": "Invalid count (1-500)."
|
||||
}
|
||||
},
|
||||
"chatrooms": {
|
||||
|
||||
Reference in New Issue
Block a user