mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-23 12:14:11 +01:00
Codechange: use ReferenceThroughBaseContainer for containers that are index by CompanyID
This commit is contained in:
@@ -347,7 +347,7 @@ bool ScriptObject::DoCommandProcessResult(const CommandCost &res, Script_Suspend
|
||||
}
|
||||
|
||||
|
||||
/* static */ Randomizer ScriptObject::random_states[OWNER_END];
|
||||
/* static */ ScriptObject::RandomizerArray ScriptObject::random_states;
|
||||
|
||||
Randomizer &ScriptObject::GetRandomizer(Owner owner)
|
||||
{
|
||||
|
||||
@@ -330,7 +330,8 @@ private:
|
||||
static std::tuple<bool, bool, bool, bool> DoCommandPrep();
|
||||
static bool DoCommandProcessResult(const CommandCost &res, Script_SuspendCallbackProc *callback, bool estimate_only, bool asynchronous);
|
||||
static CommandCallbackData *GetDoCommandCallback();
|
||||
static Randomizer random_states[OWNER_END]; ///< Random states for each of the scripts (game script uses OWNER_DEITY)
|
||||
using RandomizerArray = ReferenceThroughBaseContainer<std::array<Randomizer, OWNER_END>>;
|
||||
static RandomizerArray random_states; ///< Random states for each of the scripts (game script uses OWNER_DEITY)
|
||||
};
|
||||
|
||||
namespace ScriptObjectInternal {
|
||||
|
||||
Reference in New Issue
Block a user