Clear Static Vars Map on Mod Switch (#740)
* Update MainState.hx * using clear() --------- Co-authored-by: ⍚~Nex <87421482+NexIsDumb@users.noreply.github.com>
This commit is contained in:
co-authored by
⍚~Nex
parent
f9402fe826
commit
356607f53a
@@ -66,12 +66,12 @@ class MainState extends FlxState {
|
|||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
|
||||||
for(path in addonPaths) {
|
for (path in addonPaths) {
|
||||||
if (path == null) continue;
|
if (path == null) continue;
|
||||||
if (!isDirectory(path)) continue;
|
if (!isDirectory(path)) continue;
|
||||||
|
|
||||||
for(addon in FileSystem.readDirectory(path)) {
|
for (addon in FileSystem.readDirectory(path)) {
|
||||||
if(!FileSystem.isDirectory(path + addon)) {
|
if (!FileSystem.isDirectory(path + addon)) {
|
||||||
switch(Path.extension(addon).toLowerCase()) {
|
switch(Path.extension(addon).toLowerCase()) {
|
||||||
case 'zip':
|
case 'zip':
|
||||||
addon = Path.withoutExtension(addon);
|
addon = Path.withoutExtension(addon);
|
||||||
@@ -90,7 +90,11 @@ class MainState extends FlxState {
|
|||||||
else _noPriorityAddons.insert(0, data);
|
else _noPriorityAddons.insert(0, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#end
|
||||||
|
|
||||||
|
funkin.backend.scripting.Script.staticVariables.clear();
|
||||||
|
|
||||||
|
#if MOD_SUPPORT
|
||||||
for (addon in _lowPriorityAddons)
|
for (addon in _lowPriorityAddons)
|
||||||
loadLib(addon.path, ltrim(addon.name, "[LOW]"));
|
loadLib(addon.path, ltrim(addon.name, "[LOW]"));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user