Load Initial Value of Simple State
All checks were successful
E2E Testing / test (push) Successful in 1m31s

This commit is contained in:
Sebastian Böckelmann 2024-03-19 16:33:17 +01:00
parent 03bc18e679
commit 620e591c0b
3 changed files with 4 additions and 2 deletions

View File

@ -25,6 +25,8 @@ export class SimpleGamesystemParser {
for(let i=0; i<jsonObject.states.length; i++) {
const state = new SimpleState(jsonObject.states[i].stateLabel, jsonObject.states[i].stateDescription);
const conditions = jsonObject.states[i].conditions
state.initial = jsonObject.states[i].initial
for(let j=0; j<conditions.length; j++) {
const searchedScriptAccount = scriptAccounts.find(scriptAccount => scriptAccount.componentName === conditions[j].scriptAccount)
if(searchedScriptAccount != undefined) {

View File

@ -3,7 +3,7 @@
"componentDescription": "Ein simples Gamesystem zur Modellierung verschiedener Jahreszeiten und deren Übergänge",
"states": [
{
"initial": false,
"initial": true,
"conditions": [
{
"scriptAccount": "Temperature",

View File

@ -3,7 +3,7 @@
"componentDescription": "A small Gamesystem about local weather events",
"states": [
{
"initial": false,
"initial": true,
"conditions": [],
"stateLabel": "Sonne",
"stateDescription": ""