stolsky / the-smoking-mirror

GNU General Public License v3.0
0 stars 0 forks source link

improve scene scripts #22

Closed stolsky closed 2 years ago

stolsky commented 2 years ago
stolsky commented 2 years ago

replace SHOW/HIDE by states:

OLD

example:

{
                    "id": "eBlo",
                    "name": "par1Blo01",
                    "states": [
                        {
                            "id": 1,
                            "type": "Use",
                            "visible": false,
                            "back": "93,48,26",
                            "left": [
                                {"text": "par1Blo03", "stmt": ["SELF 0", "eMet SHOW", "eBoo 2", "eSpi 2"]}
                            ],
                            "right": [
                                {"text": "par1Blo02"}
                            ]
                        }
                    ]
                },

statement: "stmt": ["eBlo SHOW"]

NEW

{
                    "id": "eBlo",
                    "name": "par1Blo01",
                    "type": "Use",
                    "back": "93,48,26",
                    "states": [
                        {
                            "id": 1,
                            "visible": false
                        },
                        {
                            "id": 2,
                            "visible": true,
                            "left": [
                                {"text": "par1Blo03", "stmt": ["SELF 0", "eMet 2", "eBoo 2", "eSpi 2"]}
                            ],
                            "right": [
                                {"text": "par1Blo02"}
                            ]
                        }
                    ]
                },

statement: "stmt": ["eBlo 2"]

stolsky commented 2 years ago

for better readability of the code: