You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reduce duplication in TrackEncounter settings config
- Extract five option arrays as module-level constants (SHOW_HIDE, NPC_HEALTH,
NPC_AC, PLAYER_HEALTH, DEATH_SAVES) to eliminate repeated inline definitions
- Extract npcTypeSettings() factory to generate the identical allies/enemies
setting blocks from a single source, parameterised by entity and label
- Fix bug: player Conditions entry used 'condition' key instead of 'key',
breaking displaySetting lookup and setSetting calls
info:"Players can see the armor class of players.",
354
-
options: [
355
-
{
356
-
value:false,
357
-
name:"Hidden",
358
-
action:"Hide",
359
-
icon:"fas fa-eye-slash",
360
-
color:"red",
361
-
},
362
-
{
363
-
value:undefined,
364
-
name:"Shown",
365
-
action:"Show",
366
-
icon:"fas fa-eye",
367
-
color:"green",
368
-
},
369
-
],
370
-
},
371
-
{
372
-
condition:"conditions",
373
-
entity:"player",
374
-
name:"Conditions",
375
-
icon:"fas fa-flame",
376
-
info:"Players can see the conditions of players.",
377
-
options: [
378
-
{
379
-
value:false,
380
-
name:"Hidden",
381
-
action:"Hide",
382
-
icon:"fas fa-eye-slash",
383
-
color:"red",
384
-
},
385
-
{
386
-
value:undefined,
387
-
name:"Shown",
388
-
action:"Show",
389
-
icon:"fas fa-eye",
390
-
color:"green",
391
-
},
392
-
],
393
-
},
394
-
{
395
-
key:"hide_death_saves",
396
-
entity:"player",
397
-
name:"Death Saves",
398
-
icon:"fas fa-skull-crossbones",
399
-
info:"Players can see the death saves/fails of other players.",
400
-
options: [
401
-
{
402
-
value:true,
403
-
name:"Hidden",
404
-
action:"Hide",
405
-
icon:"fas fa-eye-slash",
406
-
color:"red",
407
-
},
408
-
{
409
-
value:undefined,
410
-
name:"Shown",
411
-
action:"Show",
412
-
icon:"fas fa-eye",
413
-
color:"green",
414
-
},
415
-
],
416
-
},
156
+
{ key:"health", entity:"player", name:"Health", icon:"fas fa-heart", info:"Players can see the health of players.", options:PLAYER_HEALTH },
157
+
{ key:"ac", entity:"player", name:"Armor Class", icon:"fas fa-shield", info:"Players can see the armor class of players.", options:SHOW_HIDE },
158
+
{ key:"conditions", entity:"player", name:"Conditions", icon:"fas fa-flame", info:"Players can see the conditions of players.", options:SHOW_HIDE },
159
+
{ key:"hide_death_saves", entity:"player", name:"Death Saves", icon:"fas fa-skull-crossbones", info:"Players can see the death saves/fails of other players.", options:DEATH_SAVES },
0 commit comments