Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
At the moment, it doesn't do anything useful, but it will become a base for terrain editing capabilities very soon. I decided to create a separate PR for it, to promote it and enable early testing.
To test it, open in-game console (using tilde hotkey or from top menubar) and copy/paste any of these lines:
Documentation will appear at https://developer.rigsofrods.org/d4/d07/group___script2_game.html after this PR is merged.
I realize we already have a lot of terrain-related functions in the
GameScriptClass
(global objectgame
), see https://developer.rigsofrods.org/dc/d63/class_script2_game_1_1_game_script_class.html, but under the hood those are serviced byRoR::Terrain
anyway, see https://developer.rigsofrods.org/d4/d4d/group___terrain.html, and I want to keep things organized.Please mind the additional
getHandle()
function in the code snippets - that's a necessary evil to manage AngelScript reference counting simply and safely using /~https://github.com/only-a-ptr/RefCountingObject-AngelScript. Without it, adding new script feats is either laborous and bug-prone, or unsafe.