diff --git a/vmf/gui/vmf/vmf_atlas.texture b/vmf/gui/vmf/vmf_atlas.texture index 05701d6..5051d37 100644 --- a/vmf/gui/vmf/vmf_atlas.texture +++ b/vmf/gui/vmf/vmf_atlas.texture @@ -1,18 +1,18 @@ common = { - input = { - filename = "gui/vmf/vmf_atlas" - } - output = { - apply_processing = true - correct_gamma = true - cut_alpha_threshold = 0.5 - enable_cut_alpha_threshold = false - format = "A8R8G8B8" - mipmap_filter = "kaiser" - mipmap_filter_wrap_mode = "mirror" - mipmap_keep_original = false - mipmap_num_largest_steps_to_discard = 0 - mipmap_num_smallest_steps_to_discard = 0 + input = { + filename = "gui/vmf/vmf_atlas" + } + output = { + apply_processing = true + correct_gamma = true + cut_alpha_threshold = 0.5 + enable_cut_alpha_threshold = false + format = "A8R8G8B8" + mipmap_filter = "kaiser" + mipmap_filter_wrap_mode = "mirror" + mipmap_keep_original = false + mipmap_num_largest_steps_to_discard = 0 + mipmap_num_smallest_steps_to_discard = 0 srgb = true - } -} \ No newline at end of file + } +} diff --git a/vmf/materials/vmf/vmf_atlas.lua b/vmf/materials/vmf/vmf_atlas.lua index f206505..1ce9904 100644 --- a/vmf/materials/vmf/vmf_atlas.lua +++ b/vmf/materials/vmf/vmf_atlas.lua @@ -1,38 +1,38 @@ --- Image Source: -return { - header_fav_arrow = { - size = { 48, 48, }, - uv00 = { 0.181641, 0.880859, }, - uv11 = { 0.228516, 0.974609, }, - }, - header_fav_icon = { - size = { 48, 48, }, - uv00 = { 0.130859, 0.880859, }, - uv11 = { 0.177734, 0.974609, }, - }, - header_fav_icon_lit = { - size = { 48, 48, }, - uv00 = { 0.052734, 0.880859, }, - uv11 = { 0.099609, 0.974609, }, - }, - search_bar_icon = { - size = { 48, 48, }, - uv00 = { 0.001953, 0.880859, }, - uv11 = { 0.048828, 0.974609, }, - }, - map_view_party_button = { - size = { 128, 128, }, - uv00 = { 0.130859, 0.623047, }, - uv11 = { 0.255859, 0.873047, }, - }, - map_view_party_button_lit = { - size = { 128, 128, }, - uv00 = { 0.001953, 0.623047, }, - uv11 = { 0.126953, 0.873047, }, - }, - map_view_mutators_area = { - size = { 547, 313, }, - uv00 = { 0.001953, 0.003906, }, - uv11 = { 0.536133, 0.615234, }, - }, +-- Image Source: +return { + header_fav_arrow = { + size = { 48, 48, }, + uv00 = { 0.181641, 0.880859, }, + uv11 = { 0.228516, 0.974609, }, + }, + header_fav_icon = { + size = { 48, 48, }, + uv00 = { 0.130859, 0.880859, }, + uv11 = { 0.177734, 0.974609, }, + }, + header_fav_icon_lit = { + size = { 48, 48, }, + uv00 = { 0.052734, 0.880859, }, + uv11 = { 0.099609, 0.974609, }, + }, + search_bar_icon = { + size = { 48, 48, }, + uv00 = { 0.001953, 0.880859, }, + uv11 = { 0.048828, 0.974609, }, + }, + map_view_party_button = { + size = { 128, 128, }, + uv00 = { 0.130859, 0.623047, }, + uv11 = { 0.255859, 0.873047, }, + }, + map_view_party_button_lit = { + size = { 128, 128, }, + uv00 = { 0.001953, 0.623047, }, + uv11 = { 0.126953, 0.873047, }, + }, + map_view_mutators_area = { + size = { 547, 313, }, + uv00 = { 0.001953, 0.003906, }, + uv11 = { 0.536133, 0.615234, }, + }, } diff --git a/vmf/materials/vmf/vmf_atlas.material b/vmf/materials/vmf/vmf_atlas.material index 1339923..8e4bf44 100644 --- a/vmf/materials/vmf/vmf_atlas.material +++ b/vmf/materials/vmf/vmf_atlas.material @@ -1,26 +1,26 @@ vmf_atlas = { - material_contexts = { - surface_material = "" - } + material_contexts = { + surface_material = "" + } - shader = "gui:DIFFUSE_MAP" + shader = "gui:DIFFUSE_MAP" - textures = { - diffuse_map = "gui/vmf/vmf_atlas" - } + textures = { + diffuse_map = "gui/vmf/vmf_atlas" + } - variables = { - } + variables = { + } } vmf_atlas_masked = { - material_contexts = { - surface_material = "" - } - shader = "gui_gradient:DIFFUSE_MAP:MASKED" - textures = { - diffuse_map = "gui/vmf/vmf_atlas" - } - variables = { - } + material_contexts = { + surface_material = "" + } + shader = "gui_gradient:DIFFUSE_MAP:MASKED" + textures = { + diffuse_map = "gui/vmf/vmf_atlas" + } + variables = { + } } diff --git a/vmf/resource_packages/vmf.package b/vmf/resource_packages/vmf.package index 573aa34..d94302b 100644 --- a/vmf/resource_packages/vmf.package +++ b/vmf/resource_packages/vmf.package @@ -1,13 +1,13 @@ mod = [ - "vmf" + "vmf" ] package = [ - "resource_packages/vmf" + "resource_packages/vmf" ] material = [ - "materials/vmf/*" + "materials/vmf/*" ] lua = [ @@ -25,4 +25,4 @@ lua = [ "scripts/mods/vmf/modules/ui/mutators/*" "materials/vmf/vmf_atlas" -] \ No newline at end of file +] diff --git a/vmf/scripts/mods/vmf/modules/core/chat.lua b/vmf/scripts/mods/vmf/modules/core/chat.lua index b7e31fc..6439b85 100644 --- a/vmf/scripts/mods/vmf/modules/core/chat.lua +++ b/vmf/scripts/mods/vmf/modules/core/chat.lua @@ -74,4 +74,4 @@ function VMFMod:chat_whisper(peer_id, message) if chat and chat:has_channel(1) and chat.is_server and peer_id ~= chat.host_peer_id then send_system_message(peer_id, message) end -end \ No newline at end of file +end diff --git a/vmf/scripts/mods/vmf/modules/core/commands.lua b/vmf/scripts/mods/vmf/modules/core/commands.lua index c3aa42d..0b8f670 100644 --- a/vmf/scripts/mods/vmf/modules/core/commands.lua +++ b/vmf/scripts/mods/vmf/modules/core/commands.lua @@ -158,4 +158,4 @@ function vmf.run_command(command_name, ...) else vmf:error("(commands): command '%s' wasn't found.", command_name) -- Should never see this end -end \ No newline at end of file +end diff --git a/vmf/scripts/mods/vmf/modules/core/events.lua b/vmf/scripts/mods/vmf/modules/core/events.lua index 329d864..7001e03 100644 --- a/vmf/scripts/mods/vmf/modules/core/events.lua +++ b/vmf/scripts/mods/vmf/modules/core/events.lua @@ -157,4 +157,4 @@ function vmf.all_mods_loaded_event() local mod = _mods[mod_name] run_event(mod, event_name) end -end \ No newline at end of file +end diff --git a/vmf/scripts/mods/vmf/modules/core/hooks.lua b/vmf/scripts/mods/vmf/modules/core/hooks.lua index 6233d96..9ff6c5a 100644 --- a/vmf/scripts/mods/vmf/modules/core/hooks.lua +++ b/vmf/scripts/mods/vmf/modules/core/hooks.lua @@ -426,8 +426,8 @@ end vmf.apply_delayed_hooks = function(status, state) if status == "enter" and state == "StateIngame" then - _delaying_enabled = false - end + _delaying_enabled = false + end if #_delayed > 0 then vmf:info("Attempt to hook %s delayed hooks", #_delayed) -- Go through the table in reverse so we don't get any issues removing entries inside the loop @@ -436,4 +436,4 @@ vmf.apply_delayed_hooks = function(status, state) table.remove(_delayed, i) end end -end \ No newline at end of file +end diff --git a/vmf/scripts/mods/vmf/modules/core/keybindings.lua b/vmf/scripts/mods/vmf/modules/core/keybindings.lua index 84d9157..b6fd7b6 100644 --- a/vmf/scripts/mods/vmf/modules/core/keybindings.lua +++ b/vmf/scripts/mods/vmf/modules/core/keybindings.lua @@ -379,4 +379,4 @@ end -- ##################################################################################################################### -- In case mods reloading was performed right at the moment of entering 'StateInGame'. -vmf.create_keybinds_input_service() \ No newline at end of file +vmf.create_keybinds_input_service() diff --git a/vmf/scripts/mods/vmf/modules/core/localization.lua b/vmf/scripts/mods/vmf/modules/core/localization.lua index 3c7fb08..d80083c 100644 --- a/vmf/scripts/mods/vmf/modules/core/localization.lua +++ b/vmf/scripts/mods/vmf/modules/core/localization.lua @@ -101,4 +101,4 @@ end -- #################################################################################################################### local localization_table = vmf:dofile("localization/vmf") -vmf.load_mod_localization(vmf, localization_table) \ No newline at end of file +vmf.load_mod_localization(vmf, localization_table) diff --git a/vmf/scripts/mods/vmf/modules/core/logging.lua b/vmf/scripts/mods/vmf/modules/core/logging.lua index 8d3f504..156b8be 100644 --- a/vmf/scripts/mods/vmf/modules/core/logging.lua +++ b/vmf/scripts/mods/vmf/modules/core/logging.lua @@ -10,13 +10,13 @@ local _logging_settings local function add_chat_message(message) local chat_manager = Managers.chat local new_message = { - channel_id = 1, - message_sender = "System", - message = message, + channel_id = 1, + message_sender = "System", + message = message, is_system_message = VT1 and true, type = not VT1 and Irc.SYSTEM_MSG, -- luacheck: ignore Irc - pop_chat = true, - is_dev = false + pop_chat = true, + is_dev = false } table.insert(chat_manager.chat_messages, new_message) @@ -155,4 +155,4 @@ end -- ##### Script ######################################################################################################## -- ##################################################################################################################### -vmf.load_logging_settings() \ No newline at end of file +vmf.load_logging_settings() diff --git a/vmf/scripts/mods/vmf/modules/core/misc.lua b/vmf/scripts/mods/vmf/modules/core/misc.lua index 7520d1f..e07e313 100644 --- a/vmf/scripts/mods/vmf/modules/core/misc.lua +++ b/vmf/scripts/mods/vmf/modules/core/misc.lua @@ -26,4 +26,4 @@ function vmf.check_old_vmf() error("Unfortunately, workshop mods and old-fashioned mods (VMF-pack or QoL) are incompatible. " .. "Either remove old mods or disable workshop mods.") end -end \ No newline at end of file +end diff --git a/vmf/scripts/mods/vmf/modules/core/mutators/mutators_info.lua b/vmf/scripts/mods/vmf/modules/core/mutators/mutators_info.lua index 1e8ba04..5f99948 100644 --- a/vmf/scripts/mods/vmf/modules/core/mutators/mutators_info.lua +++ b/vmf/scripts/mods/vmf/modules/core/mutators/mutators_info.lua @@ -104,4 +104,4 @@ end) -- ##### Return ######################################################################################################## -- ##################################################################################################################### -return set_lobby_data \ No newline at end of file +return set_lobby_data diff --git a/vmf/scripts/mods/vmf/modules/core/mutators/mutators_manager.lua b/vmf/scripts/mods/vmf/modules/core/mutators/mutators_manager.lua index d3aa78a..44b95aa 100644 --- a/vmf/scripts/mods/vmf/modules/core/mutators/mutators_manager.lua +++ b/vmf/scripts/mods/vmf/modules/core/mutators/mutators_manager.lua @@ -502,4 +502,4 @@ end) -- ##################################################################################################################### -- Testing ---vmf:dofile("scripts/mods/vmf/modules/core/mutators/test/mutators_test") \ No newline at end of file +--vmf:dofile("scripts/mods/vmf/modules/core/mutators/test/mutators_test") diff --git a/vmf/scripts/mods/vmf/modules/core/mutators/test/mutators_test.lua b/vmf/scripts/mods/vmf/modules/core/mutators/test/mutators_test.lua index d1707d4..53ebca8 100644 --- a/vmf/scripts/mods/vmf/modules/core/mutators/test/mutators_test.lua +++ b/vmf/scripts/mods/vmf/modules/core/mutators/test/mutators_test.lua @@ -12,10 +12,10 @@ mod_data.name = "Legendary" mod_data.description = "Legendary description" mod_data.is_mutator = true mod_data.mutator_settings = { - incompatible_with_all = true, - compatible_with = { - "test_something" - } + incompatible_with_all = true, + compatible_with = { + "test_something" + } } vmf.initialize_mod_data(mod, mod_data) mod.on_enabled = function(init_call) mod:echo("Legendary on_enabled(" .. (init_call and "init)" or ")")) end @@ -30,10 +30,10 @@ mod_data = {} mod_data.name = "Something" mod_data.is_mutator = true mod_data.mutator_settings = { - incompatible_with = { - "test_true_solo", - "test_slayer" - } + incompatible_with = { + "test_true_solo", + "test_slayer" + } } vmf.initialize_mod_data(mod, mod_data) mod.on_enabled = function(init_call) mod:echo("Something on_enabled(" .. (init_call and "init)" or ")")) end @@ -48,11 +48,11 @@ mod_data = {} mod_data.name = "?Deathwish" mod_data.is_mutator = true mod_data.mutator_settings = { - difficulty_levels = { - "hardest", - "survival_hardest" - }, - title_placement = "after" + difficulty_levels = { + "hardest", + "survival_hardest" + }, + title_placement = "after" } vmf.initialize_mod_data(mod, mod_data) mod.on_enabled = function(init_call) mod:echo("?Deathwish on_enabled(" .. (init_call and "init)" or ")")) end @@ -67,11 +67,11 @@ mod_data = {} mod_data.name = "Slayer's Oath" mod_data.is_mutator = true mod_data.mutator_settings = { - difficulty_levels = { - "survival_hard", - "survival_harder", - "survival_hardest" - } + difficulty_levels = { + "survival_hard", + "survival_harder", + "survival_hardest" + } } vmf.initialize_mod_data(mod, mod_data) mod.on_enabled = function(init_call) mod:echo("Slayer's Oath on_enabled(" .. (init_call and "init)" or ")")) end @@ -86,8 +86,8 @@ mod_data = {} mod_data.name = "True Solo" mod_data.is_mutator = true mod_data.mutator_settings = { - compatible_with_all = true, - title_placement = "before" + compatible_with_all = true, + title_placement = "before" } vmf.initialize_mod_data(mod, mod_data) mod.on_enabled = function(init_call) mod:echo("True Solo on_enabled(" .. (init_call and "init)" or ")")) end @@ -113,12 +113,12 @@ mod = get_mod("test_one_hit_one_kill") mod_data = {} mod_data.name = "One Hit One Kill" mod_data.description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse tincidunt placerat" .. - " nulla eget pharetra. Vivamus consequat tristique vestibulum. Nullam vitae feugiat arcu," .. - " non porta ante. Phasellus consequat facilisis quam quis dignissim" + " nulla eget pharetra. Vivamus consequat tristique vestibulum. Nullam vitae feugiat arcu," .. + " non porta ante. Phasellus consequat facilisis quam quis dignissim" mod_data.is_mutator = true mod_data.mutator_settings = { - difficulty_levels = {"hardest"}, - enable_after_these = {"test_more_rats_weapons"} + difficulty_levels = {"hardest"}, + enable_after_these = {"test_more_rats_weapons"} } vmf.initialize_mod_data(mod, mod_data) mod.on_enabled = function(init_call) mod:echo("One Hit One Kill on_enabled(" .. (init_call and "init)" or ")")) end @@ -144,11 +144,11 @@ mod_data = {} mod_data.name = "lmao" mod_data.is_mutator = true mod_data.mutator_settings = { - difficulty_levels = {"hardest"}, - enable_after_these = {"ayyyy"}, - dice = { - bonus = 2 - } + difficulty_levels = {"hardest"}, + enable_after_these = {"ayyyy"}, + dice = { + bonus = 2 + } } vmf.initialize_mod_data(mod, mod_data) mod.on_enabled = function(init_call) mod:echo("lmao on_enabled(" .. (init_call and "init)" or ")")) end @@ -163,8 +163,8 @@ mod_data = {} mod_data.name = "More Rat Weapons" mod_data.is_mutator = true mod_data.mutator_settings = { - compatible_with_all = true, - difficulty_levels = {"hardest"} + compatible_with_all = true, + difficulty_levels = {"hardest"} } vmf.initialize_mod_data(mod, mod_data) mod.on_enabled = function(init_call) mod:echo("More Rat Weapons on_enabled(" .. (init_call and "init)" or ")")) end @@ -258,4 +258,4 @@ vmf.initialize_mod_data(mod, mod_data) mod.on_enabled = function(init_call) mod:echo("888 on_enabled(" .. (init_call and "init)" or ")")) end mod.on_disabled = function(init_call) mod:echo("888 on_disabled(" .. (init_call and "init)" or ")")) end vmf.initialize_mod_state(mod) ---]] \ No newline at end of file +--]] diff --git a/vmf/scripts/mods/vmf/modules/core/network.lua b/vmf/scripts/mods/vmf/modules/core/network.lua index 78edd29..0e37d5a 100644 --- a/vmf/scripts/mods/vmf/modules/core/network.lua +++ b/vmf/scripts/mods/vmf/modules/core/network.lua @@ -314,7 +314,7 @@ vmf:hook("ChatManager", "rpc_chat_message", ) end end - end + end end) vmf:hook(PlayerManager, "add_remote_player", function (func, self, peer_id, player_controlled, ...) @@ -408,4 +408,4 @@ end -- ##### Script ####################################################################################################### -- #################################################################################################################### -vmf.load_network_settings() \ No newline at end of file +vmf.load_network_settings() diff --git a/vmf/scripts/mods/vmf/modules/core/options.lua b/vmf/scripts/mods/vmf/modules/core/options.lua index f3cf266..a352e3b 100644 --- a/vmf/scripts/mods/vmf/modules/core/options.lua +++ b/vmf/scripts/mods/vmf/modules/core/options.lua @@ -591,4 +591,4 @@ end if type(vmf:get("options_menu_collapsed_widgets")) ~= "table" then vmf:set("options_menu_collapsed_widgets", {}) -end \ No newline at end of file +end diff --git a/vmf/scripts/mods/vmf/modules/core/persistent_tables.lua b/vmf/scripts/mods/vmf/modules/core/persistent_tables.lua index da7e986..15cb300 100644 --- a/vmf/scripts/mods/vmf/modules/core/persistent_tables.lua +++ b/vmf/scripts/mods/vmf/modules/core/persistent_tables.lua @@ -32,4 +32,4 @@ function VMFMod:persistent_table(table_name, default_table) mod_tables[table_name] = mod_tables[table_name] or default_table or {} return mod_tables[table_name] -end \ No newline at end of file +end diff --git a/vmf/scripts/mods/vmf/modules/core/safe_calls.lua b/vmf/scripts/mods/vmf/modules/core/safe_calls.lua index d2eaf00..547c7b8 100644 --- a/vmf/scripts/mods/vmf/modules/core/safe_calls.lua +++ b/vmf/scripts/mods/vmf/modules/core/safe_calls.lua @@ -10,11 +10,11 @@ end local function print_error_callstack(error_message) - if type(error_message) == "table" and error_message.error then - error_message = error_message.error - end - print("Error: " .. tostring(error_message) .. "\n" .. Script.callstack()) - return error_message + if type(error_message) == "table" and error_message.error then + error_message = error_message.error + end + print("Error: " .. tostring(error_message) .. "\n" .. Script.callstack()) + return error_message end @@ -40,7 +40,7 @@ end function VMFMod:dofile(file_path) local _, return_values = pack_pcall(vmf.safe_call_dofile(self, "(dofile)", file_path)) - return unpack(return_values, 1, return_values.n) + return unpack(return_values, 1, return_values.n) end -- ##################################################################################################################### @@ -52,7 +52,7 @@ function vmf.safe_call(mod, error_prefix_data, func, ...) local success, return_values = pack_pcall(xpcall(func, print_error_callstack, ...)) if not success then show_error(mod, error_prefix_data, return_values[1]) - return success + return success end return success, unpack(return_values, 1, return_values.n) end @@ -80,10 +80,10 @@ end -- Safe Call [dofile] function vmf.safe_call_dofile(mod, error_prefix_data, file_path) - if type(file_path) ~= "string" then + if type(file_path) ~= "string" then show_error(mod, error_prefix_data, "file path should be a string.") - return false - end + return false + end return vmf.safe_call(mod, error_prefix_data, dofile, file_path) end @@ -91,4 +91,4 @@ end -- Format error message and throw error. function vmf.throw_error(error_message, ...) error(string.format(error_message, ...), 0) -end \ No newline at end of file +end diff --git a/vmf/scripts/mods/vmf/modules/core/settings.lua b/vmf/scripts/mods/vmf/modules/core/settings.lua index cc131ed..7382db4 100644 --- a/vmf/scripts/mods/vmf/modules/core/settings.lua +++ b/vmf/scripts/mods/vmf/modules/core/settings.lua @@ -86,4 +86,4 @@ function vmf.mod_has_settings(mod) if _mods_settings[mod:get_name()] then return true end -end \ No newline at end of file +end diff --git a/vmf/scripts/mods/vmf/modules/core/toggling.lua b/vmf/scripts/mods/vmf/modules/core/toggling.lua index 638d467..c247b18 100644 --- a/vmf/scripts/mods/vmf/modules/core/toggling.lua +++ b/vmf/scripts/mods/vmf/modules/core/toggling.lua @@ -59,4 +59,4 @@ vmf.mod_state_changed = function (mod_name, is_enabled) else vmf.set_mod_state(mod, is_enabled, false) end -end \ No newline at end of file +end diff --git a/vmf/scripts/mods/vmf/modules/debug/dev_console.lua b/vmf/scripts/mods/vmf/modules/debug/dev_console.lua index 8d481d0..52801a2 100644 --- a/vmf/scripts/mods/vmf/modules/debug/dev_console.lua +++ b/vmf/scripts/mods/vmf/modules/debug/dev_console.lua @@ -98,4 +98,4 @@ end -- ##### Script ####################################################################################################### -- #################################################################################################################### -vmf.load_dev_console_settings() \ No newline at end of file +vmf.load_dev_console_settings() diff --git a/vmf/scripts/mods/vmf/modules/debug/table_dump.lua b/vmf/scripts/mods/vmf/modules/debug/table_dump.lua index b20e08e..657c5a9 100644 --- a/vmf/scripts/mods/vmf/modules/debug/table_dump.lua +++ b/vmf/scripts/mods/vmf/modules/debug/table_dump.lua @@ -355,4 +355,4 @@ end VMFMod.dtf = VMFMod.dump_to_file --- Managers.curl._requests crashes the game \ No newline at end of file +-- Managers.curl._requests crashes the game diff --git a/vmf/scripts/mods/vmf/modules/gui/custom_textures.lua b/vmf/scripts/mods/vmf/modules/gui/custom_textures.lua index 0be532f..f35c6d0 100644 --- a/vmf/scripts/mods/vmf/modules/gui/custom_textures.lua +++ b/vmf/scripts/mods/vmf/modules/gui/custom_textures.lua @@ -292,4 +292,4 @@ end -- ##### Script ####################################################################################################### -- #################################################################################################################### -vmf.load_custom_textures_settings() \ No newline at end of file +vmf.load_custom_textures_settings() diff --git a/vmf/scripts/mods/vmf/modules/gui/custom_views.lua b/vmf/scripts/mods/vmf/modules/gui/custom_views.lua index 33b4e49..7d9db9d 100644 --- a/vmf/scripts/mods/vmf/modules/gui/custom_views.lua +++ b/vmf/scripts/mods/vmf/modules/gui/custom_views.lua @@ -406,4 +406,4 @@ else end if ingame_ui_exists then _ingame_ui = ingame_ui_return -end \ No newline at end of file +end diff --git a/vmf/scripts/mods/vmf/modules/gui/ui_scaling.lua b/vmf/scripts/mods/vmf/modules/gui/ui_scaling.lua index 3895b2b..857e596 100644 --- a/vmf/scripts/mods/vmf/modules/gui/ui_scaling.lua +++ b/vmf/scripts/mods/vmf/modules/gui/ui_scaling.lua @@ -43,4 +43,4 @@ end -- ##### Script ####################################################################################################### -- #################################################################################################################### -vmf.load_ui_scaling_settings() \ No newline at end of file +vmf.load_ui_scaling_settings() diff --git a/vmf/scripts/mods/vmf/modules/legacy/options.lua b/vmf/scripts/mods/vmf/modules/legacy/options.lua index f99ecb6..c057878 100644 --- a/vmf/scripts/mods/vmf/modules/legacy/options.lua +++ b/vmf/scripts/mods/vmf/modules/legacy/options.lua @@ -168,4 +168,4 @@ vmf.initialize_mod_options_legacy = function (mod, widgets_definition) end table.insert(vmf.options_widgets_data, mod_settings_list_widgets_definitions) -end \ No newline at end of file +end diff --git a/vmf/scripts/mods/vmf/modules/ui/chat/chat_actions.lua b/vmf/scripts/mods/vmf/modules/ui/chat/chat_actions.lua index 3860c72..f0f7d36 100644 --- a/vmf/scripts/mods/vmf/modules/ui/chat/chat_actions.lua +++ b/vmf/scripts/mods/vmf/modules/ui/chat/chat_actions.lua @@ -184,10 +184,10 @@ vmf:hook("ChatGui", "_update_input", function(func, self, input_service, menu_in -- ctrl + v if Keyboard.pressed(Keyboard.button_index("v")) and Keyboard.button(Keyboard.button_index("left ctrl")) == 1 then local new_chat_message = self.chat_message - + -- remove carriage returns local clipboard_data = tostring(Clipboard.get()):gsub("\r", "") - + -- remove invalid characters if Utf8.valid(clipboard_data) then new_chat_message = new_chat_message .. clipboard_data @@ -200,7 +200,7 @@ vmf:hook("ChatGui", "_update_input", function(func, self, input_service, menu_in end) new_chat_message = new_chat_message .. valid_data end - + set_chat_message(self, new_chat_message) end @@ -315,4 +315,4 @@ end if Managers.world and Managers.world:has_world("top_ingame_view") then initialize_drawing_function() -end \ No newline at end of file +end diff --git a/vmf/scripts/mods/vmf/modules/ui/chat/commands_list_gui.lua b/vmf/scripts/mods/vmf/modules/ui/chat/commands_list_gui.lua index a974ca1..f6aec04 100644 --- a/vmf/scripts/mods/vmf/modules/ui/chat/commands_list_gui.lua +++ b/vmf/scripts/mods/vmf/modules/ui/chat/commands_list_gui.lua @@ -37,16 +37,16 @@ local _WIDTH = 550 -- #################################################################################################################### local function get_text_width(text, font_material, font_size) - local text_extent_min, text_extent_max = Gui.text_extents(_gui, text, font_material, font_size) - local text_height = text_extent_max[1] - text_extent_min[1] - return text_height + local text_extent_min, text_extent_max = Gui.text_extents(_gui, text, font_material, font_size) + local text_height = text_extent_max[1] - text_extent_min[1] + return text_height end local function word_wrap(text, font_material, font_size, max_width) - local whitespace = " " - local soft_dividers = "-+&/*" - local return_dividers = "\n" - local reuse_global_table = true + local whitespace = " " + local soft_dividers = "-+&/*" + local return_dividers = "\n" + local reuse_global_table = true local scale = RESOLUTION_LOOKUP.scale return Gui.word_wrap(_gui, text, font_material, font_size, max_width * scale, whitespace, @@ -168,4 +168,4 @@ local function draw(commands_list, selected_command_index) --end) end -return draw \ No newline at end of file +return draw diff --git a/vmf/scripts/mods/vmf/modules/ui/mutators/mutators_gui.lua b/vmf/scripts/mods/vmf/modules/ui/mutators/mutators_gui.lua index e060525..9847b8e 100644 --- a/vmf/scripts/mods/vmf/modules/ui/mutators/mutators_gui.lua +++ b/vmf/scripts/mods/vmf/modules/ui/mutators/mutators_gui.lua @@ -421,4 +421,4 @@ function vmf.reset_map_view() change_map_view_look(map_view, false) show_mutator_list(map_view, false) end -end \ No newline at end of file +end diff --git a/vmf/scripts/mods/vmf/modules/ui/mutators/mutators_gui_definitions.lua b/vmf/scripts/mods/vmf/modules/ui/mutators/mutators_gui_definitions.lua index 84f732e..371a2c8 100644 --- a/vmf/scripts/mods/vmf/modules/ui/mutators/mutators_gui_definitions.lua +++ b/vmf/scripts/mods/vmf/modules/ui/mutators/mutators_gui_definitions.lua @@ -323,4 +323,4 @@ return { party_button_widget_defenition = party_button_widget_defenition, no_mutators_text_widget = no_mutators_text_widget, create_mutator_widget = create_mutator_widget -} \ No newline at end of file +} diff --git a/vmf/scripts/mods/vmf/modules/ui/options/mod_options.lua b/vmf/scripts/mods/vmf/modules/ui/options/mod_options.lua index aa6c319..1520ed9 100644 --- a/vmf/scripts/mods/vmf/modules/ui/options/mod_options.lua +++ b/vmf/scripts/mods/vmf/modules/ui/options/mod_options.lua @@ -123,4 +123,4 @@ end vmf.disable_mods_options_button = function () _button_injection_data.mod_options_button_disabled = true -end \ No newline at end of file +end diff --git a/vmf/scripts/mods/vmf/modules/ui/options/vmf_options_view.lua b/vmf/scripts/mods/vmf/modules/ui/options/vmf_options_view.lua index b4ab0e6..1e9d35f 100644 --- a/vmf/scripts/mods/vmf/modules/ui/options/vmf_options_view.lua +++ b/vmf/scripts/mods/vmf/modules/ui/options/vmf_options_view.lua @@ -2755,11 +2755,11 @@ local _SCROLL_STEP -- copypasted 'math.point_is_inside_2d_box' from VT2 source code, since VT1 and VT2 have different implementations local function is_point_inside_2d_box(pos, lower_left_corner, size) - if lower_left_corner[1] < pos[1] and pos[1] < lower_left_corner[1] + size[1] and lower_left_corner[2] < pos[2] and pos[2] < lower_left_corner[2] + size[2] then - return true - else - return false - end + if lower_left_corner[1] < pos[1] and pos[1] < lower_left_corner[1] + size[1] and lower_left_corner[2] < pos[2] and pos[2] < lower_left_corner[2] + size[2] then + return true + else + return false + end end -- #################################################################################################################### @@ -4288,9 +4288,9 @@ return { ingame = true }, keybind_transitions = { - open_view_transition = "vmf_options_view", - close_view_transition = "exit_menu", - } + open_view_transition = "vmf_options_view", + close_view_transition = "exit_menu", + } }, view_transitions = { vmf_options_view = function (self) @@ -4298,4 +4298,4 @@ return { self.menu_active = true end } -} \ No newline at end of file +} diff --git a/vmf/scripts/mods/vmf/modules/vmf_mod_data.lua b/vmf/scripts/mods/vmf/modules/vmf_mod_data.lua index 394aa82..f0baa78 100644 --- a/vmf/scripts/mods/vmf/modules/vmf_mod_data.lua +++ b/vmf/scripts/mods/vmf/modules/vmf_mod_data.lua @@ -69,4 +69,4 @@ function VMFMod:get_description() end function VMFMod:is_enabled() return self._data.is_enabled -end \ No newline at end of file +end diff --git a/vmf/scripts/mods/vmf/modules/vmf_options.lua b/vmf/scripts/mods/vmf/modules/vmf_options.lua index 33f81d2..d82aa4c 100644 --- a/vmf/scripts/mods/vmf/modules/vmf_options.lua +++ b/vmf/scripts/mods/vmf/modules/vmf_options.lua @@ -243,4 +243,4 @@ if not vmf:get("vmf_initialized") then --vmf.load_vmf_options_view_settings() vmf:set("vmf_initialized", true) -end \ No newline at end of file +end diff --git a/vmf/scripts/mods/vmf/modules/vmf_package_manager.lua b/vmf/scripts/mods/vmf/modules/vmf_package_manager.lua index 704364c..883a4e2 100644 --- a/vmf/scripts/mods/vmf/modules/vmf_package_manager.lua +++ b/vmf/scripts/mods/vmf/modules/vmf_package_manager.lua @@ -182,4 +182,4 @@ function vmf.unload_all_resource_packages() _loading_package.mod:unload_package(package_name) end end -end \ No newline at end of file +end diff --git a/vmf/scripts/mods/vmf/vmf_loader.lua b/vmf/scripts/mods/vmf/vmf_loader.lua index 018b7d9..6445de1 100644 --- a/vmf/scripts/mods/vmf/vmf_loader.lua +++ b/vmf/scripts/mods/vmf/vmf_loader.lua @@ -11,44 +11,44 @@ local vmf_mod_object = {} -- ##################################################################################################################### function vmf_mod_object:init() - dofile("scripts/mods/vmf/modules/vmf_mod_data") - dofile("scripts/mods/vmf/modules/vmf_mod_manager") - dofile("scripts/mods/vmf/modules/vmf_package_manager") - dofile("scripts/mods/vmf/modules/core/safe_calls") - dofile("scripts/mods/vmf/modules/core/events") - dofile("scripts/mods/vmf/modules/core/settings") - dofile("scripts/mods/vmf/modules/core/logging") - dofile("scripts/mods/vmf/modules/core/misc") - dofile("scripts/mods/vmf/modules/core/persistent_tables") - dofile("scripts/mods/vmf/modules/debug/dev_console") - dofile("scripts/mods/vmf/modules/debug/table_dump") - dofile("scripts/mods/vmf/modules/core/hooks") - dofile("scripts/mods/vmf/modules/core/toggling") - dofile("scripts/mods/vmf/modules/core/keybindings") - dofile("scripts/mods/vmf/modules/core/chat") - dofile("scripts/mods/vmf/modules/core/localization") - dofile("scripts/mods/vmf/modules/core/options") - dofile("scripts/mods/vmf/modules/legacy/options") - dofile("scripts/mods/vmf/modules/core/network") - dofile("scripts/mods/vmf/modules/core/commands") - dofile("scripts/mods/vmf/modules/gui/custom_textures") - dofile("scripts/mods/vmf/modules/gui/custom_views") - dofile("scripts/mods/vmf/modules/gui/ui_scaling") - dofile("scripts/mods/vmf/modules/ui/chat/chat_actions") - dofile("scripts/mods/vmf/modules/ui/options/mod_options") - dofile("scripts/mods/vmf/modules/vmf_options") + dofile("scripts/mods/vmf/modules/vmf_mod_data") + dofile("scripts/mods/vmf/modules/vmf_mod_manager") + dofile("scripts/mods/vmf/modules/vmf_package_manager") + dofile("scripts/mods/vmf/modules/core/safe_calls") + dofile("scripts/mods/vmf/modules/core/events") + dofile("scripts/mods/vmf/modules/core/settings") + dofile("scripts/mods/vmf/modules/core/logging") + dofile("scripts/mods/vmf/modules/core/misc") + dofile("scripts/mods/vmf/modules/core/persistent_tables") + dofile("scripts/mods/vmf/modules/debug/dev_console") + dofile("scripts/mods/vmf/modules/debug/table_dump") + dofile("scripts/mods/vmf/modules/core/hooks") + dofile("scripts/mods/vmf/modules/core/toggling") + dofile("scripts/mods/vmf/modules/core/keybindings") + dofile("scripts/mods/vmf/modules/core/chat") + dofile("scripts/mods/vmf/modules/core/localization") + dofile("scripts/mods/vmf/modules/core/options") + dofile("scripts/mods/vmf/modules/legacy/options") + dofile("scripts/mods/vmf/modules/core/network") + dofile("scripts/mods/vmf/modules/core/commands") + dofile("scripts/mods/vmf/modules/gui/custom_textures") + dofile("scripts/mods/vmf/modules/gui/custom_views") + dofile("scripts/mods/vmf/modules/gui/ui_scaling") + dofile("scripts/mods/vmf/modules/ui/chat/chat_actions") + dofile("scripts/mods/vmf/modules/ui/options/mod_options") + dofile("scripts/mods/vmf/modules/vmf_options") - if VT1 then - dofile("scripts/mods/vmf/modules/core/mutators/mutators_manager") - dofile("scripts/mods/vmf/modules/ui/mutators/mutators_gui") - end + if VT1 then + dofile("scripts/mods/vmf/modules/core/mutators/mutators_manager") + dofile("scripts/mods/vmf/modules/ui/mutators/mutators_gui") + end - vmf = get_mod("VMF") - vmf.delayed_chat_messages_hook() - vmf:hook(ModManager, "destroy", function(func, ...) - vmf.mods_unload_event(true) - func(...) - end) + vmf = get_mod("VMF") + vmf.delayed_chat_messages_hook() + vmf:hook(ModManager, "destroy", function(func, ...) + vmf.mods_unload_event(true) + func(...) + end) end -- ##################################################################################################################### @@ -56,62 +56,62 @@ end -- ##################################################################################################################### function vmf_mod_object:update(dt) - vmf.update_package_manager() - vmf.mods_update_event(dt) - vmf.check_keybinds() - vmf.execute_queued_chat_command() - if VT1 then vmf.check_mutators_state() end + vmf.update_package_manager() + vmf.mods_update_event(dt) + vmf.check_keybinds() + vmf.execute_queued_chat_command() + if VT1 then vmf.check_mutators_state() end - if not vmf.all_mods_were_loaded and Managers.mod._state == "done" then + if not vmf.all_mods_were_loaded and Managers.mod._state == "done" then - vmf.generate_keybinds() - vmf.initialize_vmf_options_view() - vmf.create_network_dictionary() - vmf.ping_vmf_users() + vmf.generate_keybinds() + vmf.initialize_vmf_options_view() + vmf.create_network_dictionary() + vmf.ping_vmf_users() - if VT1 then vmf.modify_map_view() end - if VT1 then vmf.mutators_delete_raw_config() end + if VT1 then vmf.modify_map_view() end + if VT1 then vmf.mutators_delete_raw_config() end - vmf.all_mods_loaded_event() + vmf.all_mods_loaded_event() - vmf.all_mods_were_loaded = true - end + vmf.all_mods_were_loaded = true + end end function vmf_mod_object:on_unload() - print("VMF:ON_UNLOAD()") - vmf.save_chat_history() - vmf.save_unsaved_settings_to_file() + print("VMF:ON_UNLOAD()") + vmf.save_chat_history() + vmf.save_unsaved_settings_to_file() end function vmf_mod_object:on_reload() - print("VMF:ON_RELOAD()") - vmf.disable_mods_options_button() - if VT1 then vmf.reset_map_view() end - vmf.mods_unload_event(false) - vmf.remove_custom_views() - vmf.unload_all_resource_packages() - vmf.hooks_unload() - vmf.reset_guis() + print("VMF:ON_RELOAD()") + vmf.disable_mods_options_button() + if VT1 then vmf.reset_map_view() end + vmf.mods_unload_event(false) + vmf.remove_custom_views() + vmf.unload_all_resource_packages() + vmf.hooks_unload() + vmf.reset_guis() 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) + 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) - if status == "enter" and state == "StateIngame" then - vmf.create_keybinds_input_service() - end + if status == "enter" and state == "StateIngame" then + vmf.create_keybinds_input_service() + end end -- ##################################################################################################################### -- ##### Return ######################################################################################################## -- ##################################################################################################################### -return vmf_mod_object \ No newline at end of file +return vmf_mod_object diff --git a/vmf/vmf.mod b/vmf/vmf.mod index e0591a5..f8bfbf9 100644 --- a/vmf/vmf.mod +++ b/vmf/vmf.mod @@ -1,9 +1,9 @@ local ret = { - run = function() - return dofile("scripts/mods/vmf/vmf_loader") - end, - packages = { - "resource_packages/vmf" - } + run = function() + return dofile("scripts/mods/vmf/vmf_loader") + end, + packages = { + "resource_packages/vmf" + } } return ret \ No newline at end of file