Genba_Kantoku_s Posted September 23 Share Posted September 23 I am making a config but it tweaks very small portion of lengthy .xc files from default config. What I tried was, (within @xvm.xc) "login": ${"../default/login.xc":"login"}, "login.pingServers": ${"hangar.xc":"hangar.pingServers"}, "login.onlineServers": ${"hangar.xc":"hangar.onlineServers"}, but it did not work and only "login" part was executed. What I wanted is, all the other parts of "login" object refers to the default folder, but only two objects are from my own config. Again I tried "login": { ${"../default/login.xc":"login"}, "pingServers": ${"hangar.xc":"hangar.pingServers"}, "onlineServers": ${"hangar.xc":"hangar.onlineServers"} }, but this resulted in error because "$" reference was illegal to be within anywhere but the value position. Then I tried "login": ${"../default/login.xc":"login"}, "login": { "pingServers": ${"hangar.xc":"hangar.pingServers"}, "onlineServers": ${"hangar.xc":"hangar.onlineServers"} }, but this caused only the last statement is executed, former ones are totally overwritten. How can I do? I want to do something similar to 'monkey patch' but within one .xc file. 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Solution Genba_Kantoku_s Posted September 27 Author Solution Share Posted September 27 Found the solution by my own. The correct code is "login": { "allOf": [${"../default/login.xc":"login"}], "pingServers": ${"hangar.xc":"hangar.pingServers"}, "onlineServers": ${"hangar.xc":"hangar.onlineServers"} }, This is because all reference ("$ref" or xvm's "${"file":"path"}) have a property to nullify any other sister objects. By putting it into "allOf": [(array)] we can detour this. 2 @ Quote Link to comment Short link Share on other sites More sharing options...
yepev Posted September 27 Share Posted September 27 @Genba_Kantoku_s, my respect for sharing the solution after finding it by yourself @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.