|
2 | 2 | {
|
3 | 3 | "id": "test_bp_status_indicator_template",
|
4 | 4 | "type": "widget",
|
5 |
| - "style": "phrase", |
6 |
| - "phrases": [ |
7 |
| - { "id": "bitten", "text": "bitten", "sym": "B", "color": "yellow" }, |
8 |
| - { "id": "infected", "text": "infected", "sym": "I", "color": "pink" }, |
9 |
| - { "id": "broken", "text": "broken", "sym": "%", "color": "magenta" }, |
10 |
| - { "id": "splinted", "text": "splinted", "sym": "=", "color": "light_gray" }, |
11 |
| - { "id": "bandaged", "text": "bandaged", "sym": "+", "color": "white" }, |
12 |
| - { "id": "disinfected", "text": "disinfected", "sym": "$", "color": "light_green" }, |
13 |
| - { "id": "bleeding", "text": "bleeding", "value": 0, "sym": "b", "color": "light_red" }, |
14 |
| - { "id": "bleeding", "text": "bleeding", "value": 11, "sym": "b", "color": "red" }, |
15 |
| - { "id": "bleeding", "text": "bleeding", "value": 21, "sym": "b", "color": "red_red" } |
| 5 | + "style": "clause", |
| 6 | + "clauses": [ |
| 7 | + { "id": "bitten", "text": "bitten", "sym": "B", "color": "yellow", "condition": { "u_has_effect": "bite" } }, |
| 8 | + { |
| 9 | + "id": "infected", |
| 10 | + "text": "infected", |
| 11 | + "sym": "I", |
| 12 | + "color": "pink", |
| 13 | + "condition": { "u_has_effect": "infected" } |
| 14 | + }, |
| 15 | + { |
| 16 | + "id": "broken", |
| 17 | + "text": "broken", |
| 18 | + "sym": "%", |
| 19 | + "color": "magenta", |
| 20 | + "condition": { "compare_int": [ { "u_val": "hp" }, "==", { "const": 0 } ] } |
| 21 | + }, |
| 22 | + { |
| 23 | + "id": "splinted", |
| 24 | + "text": "splinted", |
| 25 | + "sym": "=", |
| 26 | + "color": "light_gray", |
| 27 | + "condition": { "u_has_worn_with_flag": "SPLINT" } |
| 28 | + }, |
| 29 | + { |
| 30 | + "id": "bandaged", |
| 31 | + "text": "bandaged", |
| 32 | + "sym": "+", |
| 33 | + "color": "white", |
| 34 | + "condition": { "u_has_effect": "bandaged" } |
| 35 | + }, |
| 36 | + { |
| 37 | + "id": "disinfected", |
| 38 | + "text": "disinfected", |
| 39 | + "sym": "$", |
| 40 | + "color": "light_green", |
| 41 | + "condition": { "u_has_effect": "disinfected" } |
| 42 | + }, |
| 43 | + { |
| 44 | + "id": "bleeding", |
| 45 | + "text": "bleeding", |
| 46 | + "sym": "b", |
| 47 | + "color": "light_red", |
| 48 | + "condition": { |
| 49 | + "and": [ |
| 50 | + { "u_has_effect": "bleed", "intensity": 1 }, |
| 51 | + { "compare_int": [ { "u_val": "effect_intensity", "effect": "bleed" }, "<", { "const": 11 } ] } |
| 52 | + ] |
| 53 | + } |
| 54 | + }, |
| 55 | + { |
| 56 | + "id": "bleeding", |
| 57 | + "text": "bleeding", |
| 58 | + "sym": "b", |
| 59 | + "color": "red", |
| 60 | + "condition": { |
| 61 | + "and": [ |
| 62 | + { "u_has_effect": "bleed", "intensity": 11 }, |
| 63 | + { "compare_int": [ { "u_val": "effect_intensity", "effect": "bleed" }, "<", { "const": 21 } ] } |
| 64 | + ] |
| 65 | + } |
| 66 | + }, |
| 67 | + { |
| 68 | + "id": "bleeding", |
| 69 | + "text": "bleeding", |
| 70 | + "sym": "b", |
| 71 | + "color": "red_red", |
| 72 | + "condition": { "u_has_effect": "bleed", "intensity": 21 } |
| 73 | + } |
16 | 74 | ]
|
17 | 75 | },
|
18 | 76 | {
|
|
122 | 180 | "type": "widget",
|
123 | 181 | "style": "text",
|
124 | 182 | "var": "compass_legend_text",
|
| 183 | + "width": 0, |
125 | 184 | "text_align": "left",
|
126 | 185 | "flags": [ "W_DYNAMIC_HEIGHT" ]
|
127 | 186 | },
|
|
131 | 190 | "style": "text",
|
132 | 191 | "var": "compass_legend_text",
|
133 | 192 | "height": 3,
|
| 193 | + "width": 0, |
134 | 194 | "text_align": "left",
|
135 | 195 | "flags": [ "W_DYNAMIC_HEIGHT" ]
|
136 | 196 | },
|
|
140 | 200 | "style": "text",
|
141 | 201 | "var": "compass_legend_text",
|
142 | 202 | "height": 5,
|
| 203 | + "width": 0, |
143 | 204 | "text_align": "left",
|
144 | 205 | "flags": [ "W_DYNAMIC_HEIGHT" ]
|
145 | 206 | },
|
|
347 | 408 | "id": "test_status_torso_text",
|
348 | 409 | "type": "widget",
|
349 | 410 | "label": "TORSO STATUS",
|
350 |
| - "var": "bp_status_text", |
351 | 411 | "bodypart": "torso",
|
352 | 412 | "style": "text",
|
| 413 | + "default_clause": { "text": "--" }, |
353 | 414 | "copy-from": "test_bp_status_indicator_template"
|
354 | 415 | },
|
355 | 416 | {
|
356 | 417 | "id": "test_status_left_arm_text",
|
357 | 418 | "type": "widget",
|
358 | 419 | "label": "LEFT ARM STATUS",
|
359 |
| - "var": "bp_status_text", |
360 | 420 | "bodypart": "arm_l",
|
361 | 421 | "style": "text",
|
| 422 | + "default_clause": { "text": "--" }, |
362 | 423 | "copy-from": "test_bp_status_indicator_template"
|
363 | 424 | },
|
364 | 425 | {
|
365 | 426 | "id": "test_status_sym_torso_text",
|
366 | 427 | "type": "widget",
|
367 |
| - "style": "text", |
368 |
| - "var": "bp_status_sym_text", |
| 428 | + "style": "symbol", |
369 | 429 | "label": "TORSO",
|
370 | 430 | "bodypart": "torso",
|
371 | 431 | "copy-from": "test_bp_status_indicator_template"
|
372 | 432 | },
|
373 | 433 | {
|
374 | 434 | "id": "test_status_sym_left_arm_text",
|
375 | 435 | "type": "widget",
|
376 |
| - "style": "text", |
377 |
| - "var": "bp_status_sym_text", |
| 436 | + "style": "symbol", |
378 | 437 | "label": "L ARM",
|
379 | 438 | "bodypart": "arm_l",
|
380 | 439 | "copy-from": "test_bp_status_indicator_template"
|
|
383 | 442 | "id": "test_status_legend_text",
|
384 | 443 | "type": "widget",
|
385 | 444 | "label": "Status Legend",
|
386 |
| - "style": "text", |
387 |
| - "var": "bp_status_legend_text", |
| 445 | + "style": "legend", |
| 446 | + "bodyparts": [ "head", "torso", "arm_l", "arm_r", "leg_l", "leg_r" ], |
388 | 447 | "copy-from": "test_bp_status_indicator_template",
|
389 | 448 | "width": 0,
|
390 | 449 | "height": 3,
|
|
407 | 466 | "width": 3,
|
408 | 467 | "height": 3
|
409 | 468 | },
|
| 469 | + { |
| 470 | + "id": "test_clause_number", |
| 471 | + "type": "widget", |
| 472 | + "style": "number", |
| 473 | + "label": "Num Values", |
| 474 | + "default_clause": { "value": 1, "color": "dark_gray" }, |
| 475 | + "clauses": [ |
| 476 | + { "value": -20, "color": "red_red", "condition": { "not": "u_can_see" } }, |
| 477 | + { "value": -10, "color": "i_yellow", "condition": "u_is_deaf" }, |
| 478 | + { "value": 0, "color": "yellow", "condition": "is_day" }, |
| 479 | + { "value": 10, "color": "white_green", "condition": { "u_has_trait": "GOODHEARING" } }, |
| 480 | + { "value": 20, "color": "light_green", "condition": { "u_has_trait": "NIGHTVISION" } } |
| 481 | + ] |
| 482 | + }, |
| 483 | + { |
| 484 | + "id": "test_clause_text", |
| 485 | + "type": "widget", |
| 486 | + "style": "text", |
| 487 | + "label": "Text Values", |
| 488 | + "default_clause": { "text": "None", "color": "dark_gray" }, |
| 489 | + "clauses": [ |
| 490 | + { "text": "blind", "color": "red_red", "condition": { "not": "u_can_see" } }, |
| 491 | + { "text": "deaf", "color": "i_yellow", "condition": "u_is_deaf" }, |
| 492 | + { "text": "daylight", "color": "yellow", "condition": "is_day" }, |
| 493 | + { "text": "good hearing", "color": "white_green", "condition": { "u_has_trait": "GOODHEARING" } }, |
| 494 | + { "text": "good vision", "color": "light_green", "condition": { "u_has_trait": "NIGHTVISION" } } |
| 495 | + ] |
| 496 | + }, |
| 497 | + { |
| 498 | + "id": "test_clause_sym", |
| 499 | + "type": "widget", |
| 500 | + "style": "symbol", |
| 501 | + "label": "Symbol Values", |
| 502 | + "default_clause": { "sym": ".", "color": "dark_gray" }, |
| 503 | + "clauses": [ |
| 504 | + { "sym": "<", "color": "red_red", "condition": { "not": "u_can_see" } }, |
| 505 | + { "sym": "-", "color": "i_yellow", "condition": "u_is_deaf" }, |
| 506 | + { "sym": "=", "color": "yellow", "condition": "is_day" }, |
| 507 | + { "sym": "+", "color": "white_green", "condition": { "u_has_trait": "GOODHEARING" } }, |
| 508 | + { "sym": ">", "color": "light_green", "condition": { "u_has_trait": "NIGHTVISION" } } |
| 509 | + ] |
| 510 | + }, |
| 511 | + { |
| 512 | + "id": "test_clause_legend", |
| 513 | + "type": "widget", |
| 514 | + "style": "legend", |
| 515 | + "label": "Legend Values", |
| 516 | + "height": 5, |
| 517 | + "width": 0, |
| 518 | + "default_clause": { "text": "None", "sym": ".", "color": "dark_gray" }, |
| 519 | + "clauses": [ |
| 520 | + { "text": "blind", "sym": "<", "color": "red_red", "condition": { "not": "u_can_see" } }, |
| 521 | + { "text": "deaf", "sym": "-", "color": "i_yellow", "condition": "u_is_deaf" }, |
| 522 | + { "text": "daylight", "sym": "=", "color": "yellow", "condition": "is_day" }, |
| 523 | + { "text": "good hearing", "sym": "+", "color": "white_green", "condition": { "u_has_trait": "GOODHEARING" } }, |
| 524 | + { "text": "good vision", "sym": ">", "color": "light_green", "condition": { "u_has_trait": "NIGHTVISION" } } |
| 525 | + ], |
| 526 | + "flags": [ "W_LABEL_NONE", "W_DYNAMIC_HEIGHT" ] |
| 527 | + }, |
410 | 528 | {
|
411 | 529 | "id": "test_stat_panel",
|
412 | 530 | "type": "widget",
|
|
438 | 556 | {
|
439 | 557 | "id": "test_text_widget",
|
440 | 558 | "type": "widget",
|
441 |
| - "label": "PHRASE", |
| 559 | + "label": "CLAUSE", |
442 | 560 | "style": "text",
|
443 | 561 | "strings": [ "Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten" ]
|
444 | 562 | },
|
|
0 commit comments