From 993670909d5c82ccd1a2f63e54313b15a2ad222d Mon Sep 17 00:00:00 2001 From: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:08:21 +0000 Subject: [PATCH 1/2] Do no default alt-view to false on load fail --- exp_legacy/module/modules/data/alt-view.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exp_legacy/module/modules/data/alt-view.lua b/exp_legacy/module/modules/data/alt-view.lua index 8a8a2cf9..c6b47e66 100644 --- a/exp_legacy/module/modules/data/alt-view.lua +++ b/exp_legacy/module/modules/data/alt-view.lua @@ -14,7 +14,9 @@ UsesAlt:set_metadata{ --- When your data loads apply alt view if you have it enabled UsesAlt:on_load(function(player_name, uses_alt) local player = game.players[player_name] - player.game_view_settings.show_entity_info = uses_alt or false + if uses_alt ~= nil then + player.game_view_settings.show_entity_info = uses_alt + end end) --- When alt view is toggled update this From 7f14fd359b7390c71585a70796f3da8022cc62b1 Mon Sep 17 00:00:00 2001 From: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:10:01 +0000 Subject: [PATCH 2/2] Fix comparator for lower_role type --- exp_scenario/module/commands/_types.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exp_scenario/module/commands/_types.lua b/exp_scenario/module/commands/_types.lua index 58e1d549..d2ade8fa 100644 --- a/exp_scenario/module/commands/_types.lua +++ b/exp_scenario/module/commands/_types.lua @@ -30,7 +30,7 @@ types.lower_role = --- @cast result any TODO role is not a defined type local player_highest = highest_role(player) - if player_highest.index >= result.index then + if player_highest.index < result.index then return invalid{ "exp-commands-parse_role.lower-role" } else return valid(result)