* CGameLoader created a new JS::Value when assigning to m_Metadata.
This means it didn't actually update metadata in SavedGames::Load. The
new approach solves this problem and should work well if
CScriptValRooted gets replaced in the future.
* The cloning in ScriptFunctions.cpp was required. Removing it caused
compartment mismatches.
* Now CGameLoader loads the metadata unconditinally because we didn't
actually use the option to not load load it.
Ref #2415
This was SVN commit r15589.
Changes GetProperty, SetProperty and HasProperty and a few other
functions to take handles. The conversions to CScriptVal or
CScriptValRooted at some places should be removed in the future. I've
done that to avoid an even larger patch.
Refs #2415
Refs #2462
This was SVN commit r15568.
* Adds additional overloads/specializations which are required when
passing JS::Handle<T>/JS::MutableHandle<T> types to different functions.
* Replaces GetPropertyJS with a GetProperty specialization.
* Allows us to avoid the implementation of ToJSVal specializations for
JS::Value and JS::HandleValue. Such conversions should only happen if
there's no way around it and if you are aware of it.
* Adds test to make sure that all potentially required specializations
with custom implementations are instantiated. This should help prevent
introducing bugs in temporarily unused code.
Refs #2415
This was SVN commit r15567.
I still experience troubles with serialization tests but I played a few
games without OOS. At least these changes will help us to debug more
efficiently the remaining problems.
Fixes initialization of visibility data and update order for LoS-related
systems (territory borders, etc).
Also removes a C-like array and fixes a player ID shifting.
Refs #599
This was SVN commit r15563.
Rooting works different now and the CScriptVal types are going to be
removed. We will need rooting tests again, but they will have to work
completely different than this test implementation.
Refs #2415
This was SVN commit r15562.
Also includes one little "demo-usecase", but additional code will be
changed to use that in future commits.
Refs #2415
Refs #2462
This was SVN commit r15542.
Changes the CallFunction implementation to use macros because otherwise
we'd have to write twice as many functions manually.
Adapts GetSavedGameData to use the new function template. Additional
callers will be changed in future commits.
Refs #2415
Refs #2462
This was SVN commit r15541.