Codechange: move choice for randomizer of scripts to a single location

This commit is contained in:
Rubidium
2023-01-13 23:48:59 +01:00
committed by rubidium42
parent 3373128233
commit 6abad681bd
7 changed files with 23 additions and 19 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(_interactive_random, &townnameparts)) {
if (!GenerateTownName(ScriptObject::GetRandomizer(), &townnameparts)) {
ScriptObject::SetLastError(ScriptError::ERR_NAME_IS_NOT_UNIQUE);
return false;
}