diff --git a/vmf/scripts/mods/vmf/modules/core/misc.lua b/vmf/scripts/mods/vmf/modules/core/misc.lua index a6107c7..2c099f5 100644 --- a/vmf/scripts/mods/vmf/modules/core/misc.lua +++ b/vmf/scripts/mods/vmf/modules/core/misc.lua @@ -19,6 +19,15 @@ function vmf.check_wrong_argument_type(mod, vmf_function_name, argument_name, ar return true end +function vmf.check_old_vmf() + local old_vmf_table = rawget(_G, "Mods") + + if old_vmf_table and old_vmf_table.exec then + error("Unfortunately, workshop mods and old-fashioned mods (VMF-pack or QoL) are incompatible. " .. + "Either remove old mods or disable workshop mods.") + end +end + function vmf.throw_error(error_message, ...) error(string.format(error_message, ...), 0) end \ No newline at end of file diff --git a/vmf/scripts/mods/vmf/vmf_loader.lua b/vmf/scripts/mods/vmf/vmf_loader.lua index aaf1a82..b600a94 100644 --- a/vmf/scripts/mods/vmf/vmf_loader.lua +++ b/vmf/scripts/mods/vmf/vmf_loader.lua @@ -99,6 +99,7 @@ end function vmf_mod_object:on_game_state_changed(status, state) print("VMF:ON_GAME_STATE_CHANGED(), status: " .. tostring(status) .. ", state: " .. tostring(state)) + if VT1 then vmf.check_old_vmf() end vmf.mods_game_state_changed_event(status, state) vmf.save_unsaved_settings_to_file() vmf.apply_delayed_hooks(status, state)