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

@@ -15,6 +15,7 @@
#include "../../rail_type.h"
#include "../../string_func.h"
#include "../../command_func.h"
#include "../../core/random_func.hpp"
#include "script_types.hpp"
#include "../script_suspend.hpp"
@@ -73,6 +74,11 @@ public:
*/
static class ScriptInstance *GetActiveInstance();
/**
* Get a reference of the randomizer that brings this script random values.
*/
static Randomizer &GetRandomizer();
protected:
template<Commands TCmd, typename T> struct ScriptDoCommandHelper;