public void Save() { GroundSceneCallbacks.AddUpdateLoopCall(() => { WorldSnapshotReaderWriter.Get().SaveFile(""); }); }
public void Reload() { GroundSceneCallbacks.AddUpdateLoopCall(() => { WorldSnapshot.Reload(); }); }
public void SaveAs(string snapshotName) { GroundSceneCallbacks.AddUpdateLoopCall(() => { WorldSnapshotReaderWriter.Get().SaveFile(snapshotName); }); }
public void Load(string filename) { GroundSceneCallbacks.AddUpdateLoopCall(() => { WorldSnapshot.Load(filename); }); }
public void CreateAppearance(string filename) { GroundSceneCallbacks.AddUpdateLoopCall(() => { GroundScene.Get().CreateAppearanceAtPlayer(filename); }); }
public void SetWeatherIndex(int value) { GroundSceneCallbacks.AddUpdateLoopCall(() => { Terrain.Get().WeatherIndex = value; }); }
public void SetOperationModeToRotation() { GroundSceneCallbacks.AddUpdateLoopCall(() => { imgui_impl.SetOperationModeToRotate(); }); }
public void CreateObject(string filename) { GroundSceneCallbacks.AddUpdateLoopCall(() => { GroundScene.Get().CreateObjectAtPlayer(filename); }); }
public void Teleport(float x, float y, float z) { GroundSceneCallbacks.AddUpdateLoopCall(() => { Game.Camera.Transform.SetPosition(x, y, z); }); }
public void ToggleModel() { GroundSceneCallbacks.AddUpdateLoopCall(() => { UtinniCore.Utinni.PlayerObject.player_object.TogglePlayerAppearance(); }); }
public void EnableDragPlayer(bool value) { GroundSceneCallbacks.AddUpdateLoopCall(() => { UtinniCore.Utinni.DebugCamera.debug_camera.EnableDragPlayer(value); }); }
public void SetSelectedNodePosition(float x, float y, float z) { GroundSceneCallbacks.AddUpdateLoopCall(() => { var obj = Game.PlayerLookAtTargetObject; if (obj != null) { var node = WorldSnapshotReaderWriter.Get().GetNodeById((int)obj.NetworkId, obj.ParentObject); if (node != null) { if (node.ParentId != 0) { Vector oldO2w = obj.ObjectToWorld.Position; Vector oldO2p = obj.ObjectToParent.Position; Vector deltaPos = new Vector(oldO2p.X - x, oldO2p.Y - y, oldO2p.Z - z); obj.ObjectToWorld.Position = new Vector(oldO2w + deltaPos); obj.ObjectToParent.SetPosition(x, y, z); } else { obj.Transform.SetPosition(x, y, z); } obj.PositionAndRotationChanged(false, node.Transform.Position); editorPlugin.AddUndoCommand(this, new AddUndoCommandEventArgs(new WorldSnapshotNodePositionChangedCommand(node, node.Transform, obj.Transform))); node.Transform.SetPosition(x, y, z); } } }); }
public void ToggleFreeCam() { GroundSceneCallbacks.AddUpdateLoopCall(() => { GroundScene.Get().ToggleFreeCamera(); }); }
public void Execute() { GroundSceneCallbacks.AddUpdateLoopCall(() => { WorldSnapshot.AddNode(nodeCopy); }); }
public void AllowTargetEverything(bool value) { GroundSceneCallbacks.AddUpdateLoopCall(() => { cui_hud.PatchAllowTargetEverything(value); }); }
public void SetTimeOfDay(float value) { GroundSceneCallbacks.AddUpdateLoopCall(() => { Terrain.Get().TimeOfDay = value / 1000f; // divide by 1000f to get the correct decimal value }); }
public void SetSnapScale(float value) { GroundSceneCallbacks.AddUpdateLoopCall(() => { imgui_impl.SetSnapSize(value); }); }
public void SetGizmoSnap(bool value) { GroundSceneCallbacks.AddUpdateLoopCall(() => { imgui_impl.EnableSnap(value); }); }
public void SetSpeed(float value) { GroundSceneCallbacks.AddUpdateLoopCall(() => { //modifiedSpeed = value; UtinniCore.Utinni.PlayerObject.player_object.SetSpeed(value); }); }
public void SetSpeed(float value) { GroundSceneCallbacks.AddUpdateLoopCall(() => { //modifiedSpeed = value; UtinniCore.Utinni.DebugCamera.debug_camera.SetSpeed(value); }); }
public void TeleportToCamera() { GroundSceneCallbacks.AddUpdateLoopCall(() => { var pos = Game.Camera.Transform.Position; UtinniCore.Utinni.PlayerObject.player_object.Teleport(pos.X, 0, pos.Y); }); }
public void SetGizmoToWorld() { GroundSceneCallbacks.AddUpdateLoopCall(() => { imgui_impl.SetGizmoModeToWorld(); }); //snapshotPanel.UpdateGizmoModeControls(false); }
public void TeleportToPlayer() { GroundSceneCallbacks.AddUpdateLoopCall(() => { var pos = Game.Player.Transform.Position; Game.Camera.Transform.SetPosition(pos.X, pos.Y + 10, pos.Z); }); }
public void ResetSpeed() // ToDo { GroundSceneCallbacks.AddUpdateLoopCall(() => { UtinniCore.Utinni.DebugCamera.debug_camera.SetSpeed(defaultSpeed); }); freeCamPanel.UpdateSpeed(defaultSpeed); }
public void ResetSpeed() { GroundSceneCallbacks.AddUpdateLoopCall(() => { UtinniCore.Utinni.PlayerObject.player_object.SetSpeed(defaultSpeed); }); playerPanel.UpdateSpeed(defaultSpeed); }
public void ToggleGizmoSnapHotkey() { bool hasSnapOn = !imgui_impl.IsSnapOn(); GroundSceneCallbacks.AddUpdateLoopCall(() => { imgui_impl.EnableSnap(hasSnapOn); }); snapshotPanel.UpdateGizmoSnapControl(hasSnapOn); }
public void AddNode(string objectFilename) { GroundSceneCallbacks.AddUpdateLoopCall(() => { var node = WorldSnapshot.CreateAddNode(objectFilename, Game.Player.ObjectToParent); if (node != null) { editorPlugin.AddUndoCommand(this, new AddUndoCommandEventArgs(new AddWorldSnapshotNodeCommand(node))); } }); }
public void Teleport(float x, float y, float z) { GroundSceneCallbacks.AddUpdateLoopCall(() => { if (GroundScene.Get().IsFreeCameraActive) { GroundScene.Get().ToggleFreeCamera(); } UtinniCore.Utinni.PlayerObject.player_object.Teleport(x, y, z); }); }
private void CreateSnapshotNodeAtPlayer() { GroundSceneCallbacks.AddUpdateLoopCall(() => { WorldSnapshotReaderWriter.Node node = WorldSnapshot.CreateAddNode((string)lbFiles.SelectedItem, Game.Player.Transform); if (node != null) { editorPlugin.AddUndoCommand(this, new AddUndoCommandEventArgs(new AddWorldSnapshotNodeCommand(node))); } }); }
private void btnAddWsNode_Click(object sender, EventArgs e) { GroundSceneCallbacks.AddUpdateLoopCall(() => { WorldSnapshotReaderWriter.Node node = WorldSnapshot.CreateAddNode("object/tangible/furniture/elegant/shared_chair_s01.iff", Game.Player.ObjectToParent); if (node != null) { editorPlugin.AddUndoCommand(this, new AddUndoCommandEventArgs(new AddWorldSnapshotNodeCommand(node))); } }); }