Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UFrameIT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FrameIT
UFrameIT
Commits
5a783cf4
Commit
5a783cf4
authored
4 years ago
by
John Schihada
Browse files
Options
Downloads
Patches
Plain Diff
Fetching Scrolls works again
parent
d13292b8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Assets/Scripts/InventoryStuff/Scroll.cs
+18
-10
18 additions, 10 deletions
Assets/Scripts/InventoryStuff/Scroll.cs
Assets/Scripts/InventoryStuff/ScrollDetails.cs
+2
-2
2 additions, 2 deletions
Assets/Scripts/InventoryStuff/ScrollDetails.cs
with
20 additions
and
12 deletions
Assets/Scripts/InventoryStuff/Scroll.cs
+
18
−
10
View file @
5a783cf4
...
...
@@ -4,6 +4,7 @@
using
System
;
using
UnityEngine
;
using
static
JSONManager
;
using
JsonSubTypes
;
using
Newtonsoft.Json
;
...
...
@@ -43,21 +44,16 @@ public class Scroll : LightScroll
public
string
label
;
public
string
description
;
public
List
<
ScrollFact
>
requiredFacts
;
public
List
<
ScrollFact
>
acquiredFacts
;
public
static
List
<
Scroll
>
FromJSON
(
string
json
)
{
List
<
Scroll
>
scrolls
=
JsonConvert
.
DeserializeObject
<
List
<
Scroll
>>(
json
,
new
JsonSerializerSettings
{
TypeNameHandling
=
TypeNameHandling
.
Auto
});
List
<
Scroll
>
scrolls
=
JsonConvert
.
DeserializeObject
<
List
<
Scroll
>>(
json
);
return
scrolls
;
}
public
static
string
ToJSON
(
FilledScroll
scroll
)
{
string
json
=
Newtonsoft
.
Json
.
JsonConvert
.
SerializeObject
(
scroll
,
new
JsonSerializerSettings
{
TypeNameHandling
=
TypeNameHandling
.
Auto
});
string
json
=
Newtonsoft
.
Json
.
JsonConvert
.
SerializeObject
(
scroll
);
return
json
;
}
...
...
@@ -133,14 +129,21 @@ public FilledScroll(LightScroll scroll, List<ScrollAssignment> assignments)
}
[
JsonConverter
(
typeof
(
JsonSubtypes
),
"kind"
)]
[
JsonSubtypes
.
KnownSubType
(
typeof
(
ScrollSymbolFact
),
"general"
)]
[
JsonSubtypes
.
KnownSubType
(
typeof
(
ScrollValueFact
),
"veq"
)]
public
class
ScrollFact
{
public
string
uri
;
public
string
kind
;
public
UriReference
@ref
;
public
string
label
;
}
public
class
UriReference
{
public
string
uri
;
}
/**
* Class used for deserializing incoming symbol-declarations from mmt
*/
...
...
@@ -164,6 +167,11 @@ public class ScrollValueFact : ScrollFact
}
public
class
LightScroll
{
public
ScrollTheoryReference
@ref
;
}
public
class
ScrollTheoryReference
{
public
string
problemTheory
;
public
string
solutionTheory
;
...
...
This diff is collapsed.
Click to expand it.
Assets/Scripts/InventoryStuff/ScrollDetails.cs
+
2
−
2
View file @
5a783cf4
...
...
@@ -316,8 +316,8 @@ public bool isAngle()
private
string
pushout
(
string
view
)
{
string
path
=
"localhost:8081/pushout?"
;
path
=
path
+
"problem="
+
this
.
scroll
.
problemTheory
+
"&"
;
path
=
path
+
"solution="
+
this
.
scroll
.
solutionTheory
+
"&"
;
path
=
path
+
"problem="
+
this
.
scroll
.
@ref
.
problemTheory
+
"&"
;
path
=
path
+
"solution="
+
this
.
scroll
.
@ref
.
solutionTheory
+
"&"
;
path
=
path
+
"view="
+
view
;
UnityWebRequest
www
=
UnityWebRequest
.
Get
(
path
);
var
async
=
www
.
Send
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment