Namespace vendored H3 nodes under Dumas
This commit is contained in:
+1
-1
@@ -29,6 +29,6 @@ export function installRefModApply(nodeType) {
|
||||
app.registerExtension({
|
||||
name: "MiniMaxH3.ApplyCanvasCompatibility",
|
||||
beforeRegisterNodeDef(nodeType, nodeData) {
|
||||
if (nodeData.name === "MiniMaxH3RefModApply") installRefModApply(nodeType);
|
||||
if (nodeData.name === "DumasMiniMaxH3RefMod_MiniMaxH3RefModApply") installRefModApply(nodeType);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -15,7 +15,7 @@ function updateLabels(node) {
|
||||
app.registerExtension({
|
||||
name: "MiniMaxH3.CreationLabels",
|
||||
beforeRegisterNodeDef(nodeType, nodeData) {
|
||||
if (!["MiniMaxH3RefModExtract", "MiniMaxH3RefModMasterExtract"].includes(nodeData.name)) return;
|
||||
if (!["DumasMiniMaxH3RefMod_MiniMaxH3RefModExtract", "DumasMiniMaxH3RefMod_MiniMaxH3RefModMasterExtract"].includes(nodeData.name)) return;
|
||||
for (const hook of ["onNodeCreated", "onConfigure"]) {
|
||||
const previous = nodeType.prototype[hook];
|
||||
nodeType.prototype[hook] = function(...args) {
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ export function updateRefModChoices(node, entries) {
|
||||
app.registerExtension({
|
||||
name: "MiniMaxH3.RefModLibrary",
|
||||
beforeRegisterNodeDef(nodeType, nodeData) {
|
||||
if (!["MiniMaxH3RefModsLoader", "MiniMaxH3RefModsAxis"].includes(nodeData.name)) return;
|
||||
if (!["DumasMiniMaxH3RefMod_MiniMaxH3RefModsLoader", "DumasMiniMaxH3RefMod_MiniMaxH3RefModsAxis"].includes(nodeData.name)) return;
|
||||
const removed = nodeType.prototype.onRemoved;
|
||||
nodeType.prototype.onRemoved = function(...args) {
|
||||
this._refmodRefresh?.abort();
|
||||
|
||||
+1
-1
@@ -151,7 +151,7 @@ function setupSlots(node) {
|
||||
app.registerExtension({
|
||||
name: "MiniMaxH3.AdditiveSlots",
|
||||
beforeRegisterNodeDef(nodeType, nodeData) {
|
||||
if (["MiniMaxH3RefModsLoader", "MiniMaxH3RefModsAxis"].includes(nodeData.name)) {
|
||||
if (["DumasMiniMaxH3RefMod_MiniMaxH3RefModsLoader", "DumasMiniMaxH3RefMod_MiniMaxH3RefModsAxis"].includes(nodeData.name)) {
|
||||
installRefModSlots(nodeType);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user