mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-03 08:44:58 +00:00
Applies tech modifications to template data returned by GuiInterface. Extends engine to load arbitrary global scripts, separates this from RNG replacement. Refs #1193. Loads global scripts for most script contexts for consistency. Adds simulation tests for global scripts. This was SVN commit r12056.
This commit is contained in:
@@ -98,7 +98,16 @@ public:
|
||||
JSContext* GetContext() const;
|
||||
JSRuntime* GetRuntime() const;
|
||||
|
||||
void ReplaceNondeterministicFunctions(boost::rand48& rng);
|
||||
/**
|
||||
* Load global scripts that most script contexts need,
|
||||
* located in the /globalscripts directory. VFS must be initialized.
|
||||
*/
|
||||
bool LoadGlobalScripts();
|
||||
|
||||
/**
|
||||
* Replace the default JS random number geenrator with a seeded, network-sync'd one.
|
||||
*/
|
||||
bool ReplaceNondeterministicRNG(boost::rand48& rng);
|
||||
|
||||
/**
|
||||
* Call a constructor function, equivalent to JS "new ctor(arg)".
|
||||
|
||||
Reference in New Issue
Block a user