mergeObject
mergeObject
is a beast of a function which lets you smash two objects together and that options argument lets you control how exactly you want to merge things.
Argument 1: Source Object --> What we are merging into (this is going to be mutated by default)
Argument 2: Mod Object --> What we are applying to the Source
insertKeys [true]
-> If the Mod Object has keys in it which the Source does not have, add those keys to the Source object.
insertValues [true]
-> If the Source Object's values are objects themselves, this controls whether to merge those values as part of this operation (kind of discount recursive
)
So for your case:
Where defaultValues
is the setting's default, and the clientSettingsValues
is the current setting value.
This would take the baseline default value and overwrite any existing key/value, but not merge value objects (instead, it would replace them). It'll overwrite because the overwrite
option is true by default.C
Calego•994d ago
@mouse0270 what are you up to that isn't workin?
UU
Unknown User•994d ago
C
Calego•994d ago
aye
First one is
defaultValues
Second one is clientSettingsValues
?UU
Unknown User•994d ago
C
Calego•994d ago
so far this is my understanding as well
UU
Unknown User•994d ago
C
Calego•994d ago
let me guess, you're seeing
square-corners
in theme
balls
try adding: recursive: false
UU
Unknown User•994d ago
C
Calego•994d ago
ok, we're going off the rails here, can you remove the
--
from the start of each key?UU
Unknown User•994d ago
C
Calego•994d ago
ok good (bad but not super bad)
UU
Unknown User•994d ago
C
Calego•994d ago
wuuuut
You've just hit "escalate to #dev-support on the mothership" territory
UU
Unknown User•994d ago
C
Calego•994d ago
One more thing to try, clone the object first, then don't do
inplace: false
UU
Unknown User•994d ago
C
Calego•994d ago
(hollering about that, which module did you release under your name again?)
UU
Unknown User•994d ago
C
Calego•994d ago
đź‘Ť
UU
Unknown User•994d ago
C
Calego•994d ago
something's real off
because if this doesn't work, that's got some big implications
UU
Unknown User•994d ago
C
Calego•994d ago
norc hooked you up with the right role
you should be able to post now
@mouse0270 I'd suggest using a minimal reproduction case to keep that channel clean 🙂
UU
Unknown User•994d ago
C
Calego•994d ago
awesome
thanks @mouse0270
Sorry I couldn't get you sorted. I'm hoping this is something stupid we're both missing.
LTL
Leo The League Lion•994d ago
@calego gave LeaguePoints™ to @mouse0270 (#40 • 43)
UU
Unknown User•994d ago
C
Calego•994d ago
that only activates if
recursive: true
though
(or should)UU
Unknown User•994d ago
C
Calego•994d ago
what in tarnation
UU
Unknown User•994d ago
C
Calego•994d ago
you could try putting a breakpoint on it and step through to see where it's going wrong
in a meeting but I'll see if I can after
UU
Unknown User•994d ago
C
Calego•994d ago
I understand you now, ugh
where's that
UU
Unknown User•994d ago
C
Calego•994d ago
Don't libwrap mergeObject, better to DIY it or work around.
There's the off chance that something is relying on this behavior and mergeObject is so prolific in the foundry core that patching it is likely to cause gods knows what issues
if this is a bug, that sucks
But, right now is the perfect time to find it, as it can get fixed in V9 prototype phase
UU
Unknown User•994d ago
Want results from more Discord servers?
More Postsselect in sheetAlso, is the data actually saved on the actor? You can inspect the data in the console opened with FIC 5e DocsI'm not looking to ping about this but for anyone who sees this: I'm interested to know if anyone hecustom hud elementMaybe I'm missing something simple here. I'm making my own custom hud element (NOT based on a FoundrCover@badgerwerks how does the cover application for 5e helpers work?
I know you do black magic to calculGitpod WorkflowHas anyone figured out a codespaces workflow?Dynamically get Object property from user inputAnyone know how I can do this?
I have an Actor (`myactor`) and I'd like to have an input box which autopublishI'm trying to use @varriount's AutoPublish, but I keep getting this error. Any ideas?https://github.symlinking foundry.js and vscodeIs this something you were able to do with vscode? I'm trying right now with both WSL2 symlinks and Releases to ChangelogI just automatically made a Changelog by going to https://github.com/arcanistzed/scs/releases and rucodespacesGo to any github repository and press `.`
You'll get kicked over to a `github.dev` version of the reequipmentType bonus⚠️ Breaking Changes ⚠️
The `DND5E.equipmentTypes` type of `bonus` has been removed. Any in-world `Scroll Into View troublesAnyone know why `Element.scrollIntoViewIfNeeded()` is working, but `Element.scrollIntoView()` isn't?DevMode Settings Explorer feedbackSo, I'm working on the styling for a little potential addition to Calego's 'Developer Mode' module aOverlay hiding starsHey y'all! I've run into a general CSS/design problem that I'm kinda stumped on solving. In the imagToDontThingswe should have threaded a long time ago I think, whoopsLayer Manipulationpresumably a module doing this would execute on canvasReady or something for every client right?Document TimestampsIs there a way to find the timestamp of the last edit made to a Document?License Property@ghost @flamewave000 @corporat @kakaroto
But if we do want to talk Manifest+, we should do that oveTemporary DocumentsIs there a built-in way to create temporary entities? Like entities wich are not stored in the databLogin Via POSTlook at your network tab when you click the join button, you'll see the POST with the data it sends,