Download CommonLua/Editor/XEditor/XEditorCallbacks.lua from sirnii/myspace: direct link, hf CLI and curl.
- Browser
- Download file 600 Bytes
-
https://huggingface.co/spaces/sirnii/myspace/resolve/main/CommonLua/Editor/XEditor/XEditorCallbacks.lua
- Command line
-
hf download hf://spaces/sirnii/myspace/CommonLua/Editor/XEditor/XEditorCallbacks.lua
-
curl -L -o XEditorCallbacks.lua https://huggingface.co/spaces/sirnii/myspace/resolve/main/CommonLua/Editor/XEditor/XEditorCallbacks.lua
600 Bytes
| ----- Height editing - terrain & grid invalidation logic | |
| if FirstLoad then | |
| EditorHeightDirtyBox = false | |
| end | |
| function OnMsg.EditorHeightChanged(final, bbox) | |
| if bbox then | |
| EditorHeightDirtyBox = AddRects(EditorHeightDirtyBox or bbox, bbox) | |
| end | |
| terrain.InvalidateHeight(bbox) | |
| editor.UpdateObjectsZ(bbox) | |
| if final then | |
| ApplyAllWaterObjects(bbox) | |
| if EditorHeightDirtyBox then | |
| DelayedCall(1250, XEditorRebuildGrids) | |
| end | |
| Msg("EditorHeightChangedFinal", EditorHeightDirtyBox) | |
| end | |
| end | |
| function XEditorRebuildGrids() | |
| RebuildGrids(EditorHeightDirtyBox) | |
| EditorHeightDirtyBox = false | |
| end |