Merge pull request 'Load Initial Value of Simple State' (#19) from issue-18 into issue-15
All checks were successful
E2E Testing / test (push) Successful in 1m35s
All checks were successful
E2E Testing / test (push) Successful in 1m35s
Reviewed-on: #19
This commit is contained in:
commit
5948960a68
@ -25,6 +25,8 @@ export class SimpleGamesystemParser {
|
|||||||
for(let i=0; i<jsonObject.states.length; i++) {
|
for(let i=0; i<jsonObject.states.length; i++) {
|
||||||
const state = new SimpleState(jsonObject.states[i].stateLabel, jsonObject.states[i].stateDescription);
|
const state = new SimpleState(jsonObject.states[i].stateLabel, jsonObject.states[i].stateDescription);
|
||||||
const conditions = jsonObject.states[i].conditions
|
const conditions = jsonObject.states[i].conditions
|
||||||
|
state.initial = jsonObject.states[i].initial
|
||||||
|
|
||||||
for(let j=0; j<conditions.length; j++) {
|
for(let j=0; j<conditions.length; j++) {
|
||||||
const searchedScriptAccount = scriptAccounts.find(scriptAccount => scriptAccount.componentName === conditions[j].scriptAccount)
|
const searchedScriptAccount = scriptAccounts.find(scriptAccount => scriptAccount.componentName === conditions[j].scriptAccount)
|
||||||
if(searchedScriptAccount != undefined) {
|
if(searchedScriptAccount != undefined) {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"componentDescription": "Ein simples Gamesystem zur Modellierung verschiedener Jahreszeiten und deren Übergänge",
|
"componentDescription": "Ein simples Gamesystem zur Modellierung verschiedener Jahreszeiten und deren Übergänge",
|
||||||
"states": [
|
"states": [
|
||||||
{
|
{
|
||||||
"initial": false,
|
"initial": true,
|
||||||
"conditions": [
|
"conditions": [
|
||||||
{
|
{
|
||||||
"scriptAccount": "Temperature",
|
"scriptAccount": "Temperature",
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"componentDescription": "A small Gamesystem about local weather events",
|
"componentDescription": "A small Gamesystem about local weather events",
|
||||||
"states": [
|
"states": [
|
||||||
{
|
{
|
||||||
"initial": false,
|
"initial": true,
|
||||||
"conditions": [],
|
"conditions": [],
|
||||||
"stateLabel": "Sonne",
|
"stateLabel": "Sonne",
|
||||||
"stateDescription": ""
|
"stateDescription": ""
|
||||||
|
Loading…
Reference in New Issue
Block a user