-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wasn't expecting a new major release so soon, but the legendary @PlanetTheCloud took the time to rewrite Element Changer in a much more efficient way. We decided the numerical system wasn't cutting it, and decided to make changing elements much easier. Thank you, @PlanetTheCloud! Co-Authored-By: Planet Cloud <[email protected]>
- Loading branch information
1 parent
7fc2af7
commit ac5752e
Showing
11 changed files
with
66 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,40 @@ | ||
/* @preserve | ||
* Created at 15 September 2022 by Anyx. | ||
* Created at 15 September 2022 by Anyx and modified by PlanetCloud. | ||
* DO NOT REMOVE CREDITS! | ||
* Created for: Wybe Network. | ||
*/ | ||
function updatePanelElements(group, item, attr, value) { | ||
PAGE.appGroups[group].items[item][attr] = value; | ||
} | ||
|
||
changeElements.forEach(function(index) { | ||
Object.entries(index).forEach(function(element) { | ||
element[1].forEach(function(key) { | ||
updatePanelElements((Object.keys(index)[0] - 1), (key.item - 1), key.attr, key.value) | ||
if (typeof changeElements !== "undefined") { | ||
((changeElements) => { | ||
if (changeElements.length == 0) { | ||
return console.log('ElementChanger: Nothing to modify.'); | ||
} | ||
var panelElementsIndex = [], | ||
groupIndex = 0; | ||
PAGE.appGroups.forEach(group => { | ||
var itemIndex = 0; | ||
group.items.forEach(item => { | ||
if (typeof panelElementsIndex[item.itemdesc] == 'undefined') { | ||
panelElementsIndex[item.itemdesc] = []; | ||
} | ||
panelElementsIndex[item.itemdesc].push({ | ||
group: groupIndex, | ||
item: itemIndex | ||
}); | ||
itemIndex++; | ||
}); | ||
}); | ||
}); | ||
groupIndex++; | ||
}); | ||
changeElements.forEach(element => { | ||
if (typeof panelElementsIndex[element.name] !== 'undefined') { | ||
panelElementsIndex[element.name].forEach(e => { | ||
PAGE.appGroups[e.group].items[e.item][element.attr] = element.value; | ||
}) | ||
} else { | ||
console.log(`ElementChanger: Trying to change element ${element.name} which does not exist.`); | ||
} | ||
}); | ||
console.log('ElementChanger: All modifications have been made.'); | ||
})(changeElements); | ||
} else { | ||
console.log("ElementChanger: changeElements variable is not defined. No elements changed."); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters