@reldens/cms 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/admin/reldens-admin-client.css +29 -30
  2. package/admin/templates/dashboard.html +1 -1
  3. package/bin/reldens-cms.js +1 -1
  4. package/install/index.html +23 -9
  5. package/install/success.html +36 -0
  6. package/lib/admin-manager.js +41 -4
  7. package/lib/admin-templates-loader.js +37 -0
  8. package/lib/admin-translations.js +4 -218
  9. package/lib/allowed-extensions.js +11 -0
  10. package/lib/entities-loader.js +2 -6
  11. package/lib/frontend.js +25 -17
  12. package/lib/installer.js +144 -116
  13. package/lib/loaded-entities-processor.js +30 -0
  14. package/lib/manager.js +223 -56
  15. package/lib/mime-types.js +35 -0
  16. package/lib/templates-list.js +0 -9
  17. package/lib/templates-to-path-mapper.js +28 -0
  18. package/migrations/default-homepage.sql +10 -0
  19. package/migrations/install.sql +1 -23
  20. package/migrations/users-authentication.sql +16 -0
  21. package/package.json +2 -2
  22. package/templates/.env.dist +11 -11
  23. package/templates/assets/favicons/android-icon-144x144.png +0 -0
  24. package/templates/assets/favicons/android-icon-192x192.png +0 -0
  25. package/templates/assets/favicons/android-icon-512x512.png +0 -0
  26. package/templates/assets/favicons/apple-touch-icon.png +0 -0
  27. package/templates/assets/favicons/favicon-16x16.png +0 -0
  28. package/templates/assets/favicons/favicon-32x32.png +0 -0
  29. package/templates/assets/favicons/mstile-150x150.png +0 -0
  30. package/templates/assets/favicons/safari-pinned-tab.svg +121 -0
  31. package/templates/assets/web/loading.gif +0 -0
  32. package/templates/assets/web/reldens-your-logo-mage.png +0 -0
  33. package/templates/browserconfig.xml +9 -0
  34. package/templates/favicon.ico +0 -0
  35. package/templates/index.js.dist +2 -2
  36. package/templates/site.webmanifest +27 -0
  37. package/admin/templates/maps-wizard-maps-selection.html +0 -85
  38. package/admin/templates/maps-wizard.html +0 -341
  39. package/admin/templates/objects-import.html +0 -143
  40. package/admin/templates/skills-import.html +0 -201
@@ -1,143 +0,0 @@
1
- <h2>Objects Import</h2>
2
- <div class="sub-content objects-import">
3
- <div class="sub-content-box">
4
- <form class="sub-content-form objects-import-form confirmation-required"
5
- name="objects-import-form"
6
- id="objects-import-form"
7
- action="{{&actionPath}}"
8
- method="post"
9
- enctype="multipart/form-data">
10
- <div class="main-action-container">
11
- <p>What would you like to do?</p>
12
- <hr/>
13
- <button type="button" class="button button-primary set-sample-data">
14
- Set Sample Data in "Generator Data"
15
- </button>
16
- <p>NOTE: if you already uploaded all your files and never manually removed them from the "generate-data" folder, you don't need to upload the same files again.</p>
17
- <div class="input-box">
18
- <label for="generatorJsonFiles">JSON Files</label>
19
- <input type="file" name="generatorJsonFiles" id="generatorJsonFiles" multiple="multiple"/>
20
- </div>
21
- <hr/>
22
- <label for="generatorData">Generator data (if not empty this data field will be used instead of the files):</label>
23
- <textarea name="generatorData" id="generatorData" class="generatorData" cols="30" rows="10" placeholder="JSON data for objects import process"></textarea>
24
- </div>
25
- <div class="submit-container">
26
- <input type="submit" class="button button-primary button-objects-import" value="Import"/>
27
- <img class="hidden loading" src="/assets/web/loading.gif"/>
28
- </div>
29
- </form>
30
- </div>
31
- </div>
32
- <script type="text/javascript">
33
- let sampleDataElement = document.querySelector('.set-sample-data');
34
- let generatorDataElement = document.querySelector('.generatorData');
35
- if(sampleDataElement && generatorDataElement){
36
- sampleDataElement.addEventListener('click', () => {
37
- generatorDataElement.value = JSON.stringify({
38
- "objects": [
39
- {
40
- "clientKey": "enemy_forest_1",
41
- "title": "Tree",
42
- "privateParams": "{\"shouldRespawn\":true,\"childObjectType\":4,\"isAggressive\":true,\"interactionRadio\":120}",
43
- "assets": [
44
- {
45
- "assetType": "spritesheet",
46
- "assetKey": "enemy_forest_1",
47
- "assetFile": "monster-treant.png",
48
- "extraParams": "{\"frameWidth\":47,\"frameHeight\":50}"
49
- }
50
- ]
51
- },
52
- {
53
- "clientKey": "enemy_forest_2",
54
- "title": "Tree Punch",
55
- "privateParams": "{\"shouldRespawn\":true,\"childObjectType\":4,\"isAggressive\":true,\"interactionRadio\":70}",
56
- "assets": [
57
- {
58
- "assetType": "spritesheet",
59
- "assetKey": "enemy_forest_2",
60
- "assetFile": "monster-golem2.png",
61
- "extraParams": "{\"frameWidth\":47,\"frameHeight\":50}"
62
- }
63
- ]
64
- }
65
- ],
66
- "defaults": {
67
- "classType": 7,
68
- "layer": "ground-respawn-area",
69
- "clientParams": "{\"autoStart\":true}",
70
- "enabled": 1,
71
- "respawn": {
72
- "respawnTime": 2000,
73
- "instancesLimit": 200
74
- },
75
- "stats": {
76
- "hp": 50,
77
- "mp": 50,
78
- "atk": 50,
79
- "def": 50,
80
- "dodge": 50,
81
- "speed": 50,
82
- "aim": 50,
83
- "stamina": 50,
84
- "mgk-atk": 50,
85
- "mgk-def": 50
86
- },
87
- "roomsNames": [
88
- "bots-001",
89
- "bots-002",
90
- "bots-003",
91
- "bots-004",
92
- "bots-005",
93
- "bots-006",
94
- "bots-007",
95
- "bots-008",
96
- "bots-009",
97
- "bots-010",
98
- "bots-011",
99
- "bots-012",
100
- "bots-013",
101
- "bots-014",
102
- "bots-015",
103
- "bots-016",
104
- "bots-017",
105
- "bots-018",
106
- "bots-019",
107
- "bots-020",
108
- "bots-021",
109
- "bots-022",
110
- "bots-023",
111
- "bots-024",
112
- "bots-025",
113
- "bots-026",
114
- "bots-027",
115
- "bots-028",
116
- "bots-029",
117
- "bots-030",
118
- "bots-031",
119
- "bots-032",
120
- "bots-033",
121
- "bots-034",
122
- "bots-035",
123
- "bots-036",
124
- "bots-037",
125
- "bots-038",
126
- "bots-039",
127
- "bots-040",
128
- "bots-041",
129
- "bots-042",
130
- "bots-043",
131
- "bots-044",
132
- "bots-045",
133
- "bots-046",
134
- "bots-047",
135
- "bots-048",
136
- "bots-049",
137
- "bots-050"
138
- ]
139
- }
140
- });
141
- });
142
- }
143
- </script>
@@ -1,201 +0,0 @@
1
- <h2>Skills Import</h2>
2
- <div class="sub-content objects-import">
3
- <div class="sub-content-box">
4
- <form class="sub-content-form objects-import-form confirmation-required"
5
- name="objects-import-form"
6
- id="objects-import-form"
7
- action="{{&actionPath}}"
8
- method="post"
9
- enctype="multipart/form-data">
10
- <div class="main-action-container">
11
- <p>What would you like to do?</p>
12
- <hr/>
13
- <button type="button" class="button button-primary set-sample-data">
14
- Set Sample Data in "Generator Data"
15
- </button>
16
- <p>NOTE: if you already uploaded all your files and never manually removed them from the "generate-data" folder, you don't need to upload the same files again.</p>
17
- <div class="input-box">
18
- <label for="generatorJsonFiles">JSON Files</label>
19
- <input type="file" name="generatorJsonFiles" id="generatorJsonFiles" multiple="multiple"/>
20
- </div>
21
- <hr/>
22
- <label for="generatorData">Generator data (if not empty this data field will be used instead of the files):</label>
23
- <textarea name="generatorData" id="generatorData" class="generatorData" cols="30" rows="10" placeholder="JSON data for skills import process"></textarea>
24
- </div>
25
- <div class="submit-container">
26
- <input type="submit" class="button button-primary button-objects-import" value="Import"/>
27
- <img class="hidden loading" src="/assets/web/loading.gif"/>
28
- </div>
29
- </form>
30
- </div>
31
- </div>
32
- <script type="text/javascript">
33
- let sampleDataElement = document.querySelector('.set-sample-data');
34
- let generatorDataElement = document.querySelector('.generatorData');
35
- if(sampleDataElement && generatorDataElement){
36
- sampleDataElement.addEventListener('click', () => {
37
- generatorDataElement.value = JSON.stringify({
38
- "options": {
39
- "removeAll": false,
40
- "override": false,
41
- "update": true
42
- },
43
- "defaults": {
44
- "properties": {
45
- "autoValidation": 0,
46
- "skillDelay": 1500,
47
- "castTime": 0,
48
- "usesLimit": 0,
49
- "range": 0,
50
- "rangeAutomaticValidation": 1,
51
- "rangePropertyX": "state/x",
52
- "rangePropertyY": "state/y",
53
- "rangeTargetPropertyX": null,
54
- "rangeTargetPropertyY": null,
55
- "allowSelfTarget": 0,
56
- "criticalChance": 0,
57
- "criticalMultiplier": 1,
58
- "criticalFixedValue": 0,
59
- "customData": null
60
- },
61
- "animations": {
62
- "appendSkillKeyOnAnimationImage": true,
63
- "defaults": {
64
- "enabled": true,
65
- "type": "spritesheet",
66
- "frameWidth": 64,
67
- "frameHeight": 70,
68
- "start": 0
69
- },
70
- "bullet": {
71
- "img": "_bullet",
72
- "end": 3,
73
- "repeat": -1,
74
- "frameRate": 1,
75
- "dir": 3
76
- },
77
- "cast": {
78
- "img": "_cast",
79
- "end": 3,
80
- "repeat": -1,
81
- "destroyTime": 2000,
82
- "depthByPlayer": "above"
83
-
84
- },
85
- "hit": {
86
- "img": "_hit",
87
- "end": 4,
88
- "repeat": 0,
89
- "depthByPlayer": "above"
90
- }
91
- },
92
- "attack": {
93
- "affectedProperty": "stats/hp",
94
- "allowEffectBelowZero": 0,
95
- "applyDirectDamage": 0,
96
- "attackProperties": "stats/atk,stats/stamina,stats/speed",
97
- "defenseProperties": "stats/def,stats/stamina,stats/speed",
98
- "aimProperties": "stats/aim",
99
- "dodgeProperties": "stats/dodge",
100
- "dodgeFullEnabled": 0,
101
- "dodgeOverAimSuccess": 1,
102
- "damageAffected": 0,
103
- "criticalAffected": 0
104
- },
105
- "physicalData": {
106
- "magnitude": 0,
107
- "objectWidth": 0,
108
- "objectHeight": 0,
109
- "validateTargetOnHit": 0
110
- },
111
- "targetEffects": {
112
- "minValue": 0,
113
- "maxValue": 0,
114
- "minProperty": null,
115
- "maxProperty": null
116
- },
117
- "ownerEffects": {
118
- "minValue": 0,
119
- "maxValue": 0,
120
- "minProperty": null,
121
- "maxProperty": null
122
- }
123
- },
124
- "skills": {
125
- "punch": {
126
- "classPathLevelRelations": {"all": "1"},
127
- "objectsRelations": {"enemy_1": "player", "enemy_2": "player"},
128
- "properties": {
129
- "skillDelay": 1000,
130
- "range": 50,
131
- "criticalChance": 10,
132
- "criticalMultiplier": 2
133
- },
134
- "typeData": {
135
- "key": "attack",
136
- "properties": {
137
- "hitDamage": 3
138
- }
139
- }
140
- },
141
- "throwRock": {
142
- "classPathLevelRelations": {"all": "2"},
143
- "objectsRelations": {"enemy_1": "player", "enemy_2": "player"},
144
- "properties": {
145
- "skillDelay": 2000,
146
- "range": 250,
147
- "criticalChance": 10,
148
- "criticalMultiplier": 2
149
- },
150
- "typeData": {
151
- "key": "physical_attack",
152
- "properties": {
153
- "hitDamage": 5
154
- }
155
- },
156
- "physicalData": {
157
- "magnitude": 350,
158
- "objectWidth": 5,
159
- "objectHeight": 5
160
- }
161
- },
162
- "heal": {
163
- "classPathLevelRelations": {"sorcerer": "3"},
164
- "properties": {
165
- "skillDelay": 1500,
166
- "allowSelfTarget": 1,
167
- "castTime": 2000
168
- },
169
- "typeData": {
170
- "key": "effect"
171
- },
172
- "animations": {
173
- "cast": {},
174
- "hit": {}
175
- },
176
- "clearPrevious": ["targetEffects", "ownerEffects", "ownerConditions"],
177
- "ownerConditions": [{
178
- "key": "available_mp",
179
- "propertyKey": "stats/mp",
180
- "conditional": "ge",
181
- "value": 2
182
- }],
183
- "ownerEffects": [{
184
- "key": "dec_mp",
185
- "propertyKey": "stats/mp",
186
- "operationKey": "2",
187
- "value": 2
188
- }],
189
- "targetEffects": [{
190
- "key": "heal",
191
- "propertyKey": "stats/mp",
192
- "operationKey": "1",
193
- "value": 5,
194
- "maxProperty": "statsBase/hp"
195
- }]
196
- }
197
- }
198
- });
199
- });
200
- }
201
- </script>