Fixing UI for 2.1 data changes

This commit is contained in:
Thaum Rystra
2024-03-23 16:02:28 +02:00
parent 293deaa592
commit 359d645f6b
40 changed files with 2142 additions and 510 deletions

View File

@@ -52,7 +52,7 @@ export function getSingleProperty(creatureId: string, propertyId: string) {
return prop;
}
export function getProperties(creatureId) {
export function getProperties(creatureId: string): CreatureProperty[] {
const creature = loadedCreatures.get(creatureId);
if (creature) {
const props = Array.from(creature.properties.values());
@@ -94,7 +94,7 @@ export function getPropertiesOfType(creatureId, propType) {
return props;
}
export function getCreature(creatureId) {
export function getCreature(creatureId: string) {
const loadedCreature = loadedCreatures.get(creatureId);
const loadedCreatureDoc = loadedCreature?.creature;
if (loadedCreatureDoc) {
@@ -106,7 +106,7 @@ export function getCreature(creatureId) {
return creature;
}
export function getVariables(creatureId) {
export function getVariables(creatureId: string) {
const loadedCreature = loadedCreatures.get(creatureId);
const loadedVariables = loadedCreature?.variables;
if (loadedVariables) {