mirror of
https://github.com/IvarK/AntimatterDimensionsSourceCode.git
synced 2025-02-18 00:20:13 +00:00
Fix automator running invalid editor scripts when forceRestart is on (Fixes #3334)
This commit is contained in:
parent
c9fc3e8246
commit
7f8846ed47
@ -147,7 +147,7 @@ export default {
|
||||
@click="repeat"
|
||||
/>
|
||||
<AutomatorButton
|
||||
v-tooltip="'Automatically start this script when finishing or restarting a Reality'"
|
||||
v-tooltip="'Automatically restart the active script when finishing or restarting a Reality'"
|
||||
class="fa-reply"
|
||||
:class="{ 'c-automator__button--active' : forceRestartOn }"
|
||||
@click="restart"
|
||||
|
@ -585,7 +585,9 @@ export function finishProcessReality(realityProps) {
|
||||
}
|
||||
}
|
||||
if (Player.automatorUnlocked && AutomatorBackend.state.forceRestart) {
|
||||
AutomatorBackend.start(player.reality.automator.state.editorScript);
|
||||
// Make sure to restart the current script instead of using the editor script - the editor script might
|
||||
// not be a valid script to run; this at best stops it from running and at worst causes a crash
|
||||
AutomatorBackend.start(AutomatorBackend.state.topLevelScript);
|
||||
}
|
||||
if (player.options.automatorEvents.clearOnReality) AutomatorData.clearEventLog();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user