From d61da8f8e1fe8adf150dd569b4b7df70c4d62cf8 Mon Sep 17 00:00:00 2001 From: unknown <john.schihada@hotmail.com> Date: Mon, 19 Oct 2020 17:15:22 +0200 Subject: [PATCH] Fixed add points: Removed scientific notation from floats --- .../InteractionEngine/CommunicationEvents.cs | 2 +- Assets/Scripts/JSONManager.cs | 13 ++++++++----- Assets/Scripts/StartServer.cs | 1 + 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/InteractionEngine/CommunicationEvents.cs b/Assets/Scripts/InteractionEngine/CommunicationEvents.cs index 60800e8a..53ff4ad5 100644 --- a/Assets/Scripts/InteractionEngine/CommunicationEvents.cs +++ b/Assets/Scripts/InteractionEngine/CommunicationEvents.cs @@ -75,6 +75,6 @@ public class SignalEvent : UnityEvent { public static List<Fact> Facts = new List<Fact>(); - public static bool ServerRunning = false; + public static bool ServerRunning = true; public static string ServerAdress = "localhost:8085"; } diff --git a/Assets/Scripts/JSONManager.cs b/Assets/Scripts/JSONManager.cs index a9040bc3..8ae53b1f 100644 --- a/Assets/Scripts/JSONManager.cs +++ b/Assets/Scripts/JSONManager.cs @@ -1,4 +1,5 @@ -using JsonSubTypes; +using System; +using JsonSubTypes; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -13,8 +14,8 @@ public class MMTURICollection public string LineOf = "http://mathhub.info/MitM/core/geometry?Geometry?Common?lineOf"; public string Ded = "http://mathhub.info/MitM/Foundation?Logic?ded"; public string Eq = "http://mathhub.info/MitM/Foundation?Logic?eq"; - public string Metric = "http://mathhub.info/MitM/core/geometry?Geometry?Common?metric"; - public string Angle = "http://mathhub.info/MitM/core/geometry?Geometry?Common?angle_between"; + public string Metric = "http://mathhub.info/MitM/core/geometry?Geometry/Common?metric"; + public string Angle = "http://mathhub.info/MitM/core/geometry?Geometry/Common?angle_between"; public string Sketch = "http://mathhub.info/MitM/Foundation?InformalProofs?proofsketch"; } @@ -68,12 +69,12 @@ public OMSTR(string s) public class OMF : MMTTerm { [JsonProperty("float")] - public float f; + public decimal f; public string kind = "OMF"; public OMF(float f) { - this.f = f; + this.f = Convert.ToDecimal(f); } } @@ -96,6 +97,7 @@ public static string ToJson(MMTDeclaration mmtDecl) **/ public class MMTSymbolDeclaration : MMTDeclaration { + public string kind = "general"; public string label; public MMTTerm tp; public MMTTerm df; @@ -113,6 +115,7 @@ public MMTSymbolDeclaration(string label, MMTTerm tp, MMTTerm df) **/ public class MMTValueDeclaration : MMTDeclaration { + public string kind = "veq"; public string label; public MMTTerm lhs; public MMTTerm rhs; diff --git a/Assets/Scripts/StartServer.cs b/Assets/Scripts/StartServer.cs index 21ef057d..5d0b2ac6 100644 --- a/Assets/Scripts/StartServer.cs +++ b/Assets/Scripts/StartServer.cs @@ -15,6 +15,7 @@ public class StartServer : MonoBehaviour // Start is called before the first frame update void Start() { + CommunicationEvents.ServerRunning = false; StartCoroutine(ServerRoutine()); } void PrepareGame() -- GitLab