Codechange: pass the randomizer directly to the town name generation

This commit is contained in:
Rubidium
2023-01-13 22:31:09 +01:00
committed by rubidium42
parent b3b8c3fd2d
commit 3373128233
6 changed files with 10 additions and 7 deletions

View File

@@ -301,7 +301,7 @@
EnforcePreconditionCustomError(false, ::Utf8StringLength(text) < MAX_LENGTH_TOWN_NAME_CHARS, ScriptError::ERR_PRECONDITION_STRING_TOO_LONG);
}
uint32 townnameparts;
if (!GenerateTownName(&townnameparts)) {
if (!GenerateTownName(_interactive_random, &townnameparts)) {
ScriptObject::SetLastError(ScriptError::ERR_NAME_IS_NOT_UNIQUE);
return false;
}