From 3c9d1bb800991b788b042f68ee135c71eeb1e305 Mon Sep 17 00:00:00 2001 From: Mahtra <93822896+MahtraDR@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:53:16 +1300 Subject: [PATCH] rejig startup sequence --- dependency.lic | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/dependency.lic b/dependency.lic index 146aea6de..170ef1c64 100644 --- a/dependency.lic +++ b/dependency.lic @@ -18,11 +18,24 @@ DRINFOMON_CORE_LICH_DEFINES ||= Array.new no_pause_all no_kill_all +unless XMLData.game =~ /^DR/ + echo("This script is not intended for usage with games other than Dragonrealms. Exiting now") + exit +end + while Script.running?('repository') echo("Repository is running, pausing for 10 seconds.") pause 10 end +unless Settings['dependency_version'] == $DEPENDENCY_VERSION + echo("New dependency version detected. Resetting repository auto-update settings.") + Script.start("repository", "reset-update-settings") + Script.start("repository", "unset-mapdb-updatable") unless XMLData.game == "DR" + Settings['dependency_version'] = $DEPENDENCY_VERSION + Settings.save +end + class Object # IMPORT FUTURE LAWLZ def itself @@ -189,10 +202,6 @@ class ScriptManager attr_reader :autostarts def initialize(debug) - unless XMLData.game =~ /^DR/ - echo("This script is not intended for usage with games other than Dragonrealms. Exiting now") - exit - end unless LICH_VERSION.match?(/^5/) _respond("*****************************************************************************") _respond("* Unsupported Lich versions detected. *")