david aka claudekennilol
david aka claudekennilol
TTyphonJS
Created by TyphonJS (Michael) on 10/3/2024 in #typhonjs-runtime
Discussion: TRL 0.2.0-next.1 Pre-release
I'm assuming 0.2.0 is specific to v12? PF1 (the only system I write my mods for) is still finalizing the last v11 before updating for v12 so I'll probably be out of this for a bit
104 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
That's good. I'm not sure why Foundry has it split into two methods
99 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
In new mods (i.e. ones I work on regularly instead of just keep working), I use this instead so I can be more lazy 😅
const localize = (key, opts = {}) => {
const myKey = `${MODULE_NAME}.${key}`;
return isEmptyObject(opts)
? (game.i18n.localize(myKey) === myKey ? game.i18n.localize(key) : game.i18n.localize(myKey))
: (game.i18n.format(myKey, opts) === myKey ? game.i18n.format(key, opts) : game.i18n.format(myKey, opts));
}
const localize = (key, opts = {}) => {
const myKey = `${MODULE_NAME}.${key}`;
return isEmptyObject(opts)
? (game.i18n.localize(myKey) === myKey ? game.i18n.localize(key) : game.i18n.localize(myKey))
: (game.i18n.format(myKey, opts) === myKey ? game.i18n.format(key, opts) : game.i18n.format(myKey, opts));
}
99 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
I'm not sure what the one you provide does, but I use mine because I've also wrapped format with it
const localizeFull = (key, opts = {}) =>
isEmptyObject(opts)
? game.i18n.localize(key)
: game.i18n.format(key, opts);
const localizeFull = (key, opts = {}) =>
isEmptyObject(opts)
? game.i18n.localize(key)
: game.i18n.format(key, opts);
99 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
No description
99 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
Ah, that's a good idea. Should be pretty simple 👍
99 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
Something like
{#if updates.data.measureTemplate.color}
bind:value={updates.data.measureTemplate.color}
{/if}
{#if updates.data.measureTemplate.color}
bind:value={updates.data.measureTemplate.color}
{/if}
99 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
Can I wrap individual property assignments in {#if} blocsk?
99 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
It needs to remain enabled so the color can be changed, though
99 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
No description
99 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
Previously there was more in here so it made more sense to have all of the inputs swapped. But recent changes in the system negated all of that. I think I found what's going on and I'll try it with just a placeholder now. It looks like I was defaulting the color the player color when fetching my update options (because previously it made sense..but now it doesn't)
99 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
I don't want to save the player color, though. Because if the player color changes, then I'll have an invalid color saved. I only want a color value saved if it was specifically set
99 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
Yeah, the update value is flip-flopping. blank, when I erase it, but then immediately set to the player value instead of remaining empty
99 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
Right, I'm running into lack of knowledge with the framework, not basic js knowledge
99 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
Oh wait, that's showing the return value of the log function
99 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
Nowhere else is using that label so it should jump to the else
99 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
No description
99 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
Man, even without data-edit it's still the same behavior
99 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
Sorry "save" is the wrong word. It doesn't save the color
99 replies
TTyphonJS
Created by david aka claudekennilol on 7/5/2024 in #typhonjs-runtime
Correct way to have inputs show other data?
No description
99 replies