From e43aad570461805fc02c32c8ebed56d43f89a04f Mon Sep 17 00:00:00 2001
From: unknown <john.schihada@hotmail.com>
Date: Mon, 19 Oct 2020 17:46:10 +0200
Subject: [PATCH] Distances/Angles can be published now too: Adjusted
 corresponding json bodies

---
 Assets/Scripts/InteractionEngine/Fact.cs | 8 ++++----
 Assets/Scripts/JSONManager.cs            | 8 +++++---
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/Assets/Scripts/InteractionEngine/Fact.cs b/Assets/Scripts/InteractionEngine/Fact.cs
index 097bd482..568b33ee 100644
--- a/Assets/Scripts/InteractionEngine/Fact.cs
+++ b/Assets/Scripts/InteractionEngine/Fact.cs
@@ -142,10 +142,10 @@ public LineFact(int i, int pid1, int pid2)
                 }
             );
 
-        MMTTerm rhs = new OMF(v);
+        MMTTerm valueTp = new OMF(v);
 
         //see point label
-        MMTValueDeclaration mmtDecl = new MMTValueDeclaration(this.Label, lhs, rhs);
+        MMTValueDeclaration mmtDecl = new MMTValueDeclaration(this.Label, lhs, valueTp, null);
         string body = MMTDeclaration.ToJson(mmtDecl);
         AddFactResponse res = AddFactResponse.sendAdd(CommunicationEvents.ServerAdress + "/fact/add", body);
         this.backendURI = res.uri;
@@ -257,10 +257,10 @@ public AngleFact(int i, int pid1, int pid2, int pid3)
                 }
             );
 
-        MMTTerm rhs = new OMF(v);
+        MMTTerm valueTp = new OMF(v);
 
         //see point label
-        MMTValueDeclaration mmtDecl = new MMTValueDeclaration(this.Label, lhs, rhs);
+        MMTValueDeclaration mmtDecl = new MMTValueDeclaration(this.Label, lhs, valueTp, null);
         string body = MMTDeclaration.ToJson(mmtDecl);
 
         Debug.Log(body);
diff --git a/Assets/Scripts/JSONManager.cs b/Assets/Scripts/JSONManager.cs
index 8ae53b1f..eda92fa6 100644
--- a/Assets/Scripts/JSONManager.cs
+++ b/Assets/Scripts/JSONManager.cs
@@ -118,13 +118,15 @@ public class MMTValueDeclaration : MMTDeclaration
         public string kind = "veq";
         public string label;
         public MMTTerm lhs;
-        public MMTTerm rhs;
+        public MMTTerm valueTp;
+        public MMTTerm value;
 
-        public MMTValueDeclaration(string label, MMTTerm lhs, MMTTerm rhs)
+        public MMTValueDeclaration(string label, MMTTerm lhs, MMTTerm valueTp, MMTTerm value)
         {
             this.label = label;
             this.lhs = lhs;
-            this.rhs = rhs;
+            this.valueTp = valueTp;
+            this.value = value;
         }
     }
 
-- 
GitLab