From dfd3f85975983f362eda9112723bec3ac9cabafc Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Tue, 31 Dec 2024 13:33:48 +0900 Subject: [PATCH] . --- exp_commands/module/commands/types.lua | 27 ------------------- exp_legacy/module/modules/control/vlayer.lua | 6 ++--- exp_legacy/module/modules/gui/player-list.lua | 1 - 3 files changed, 3 insertions(+), 31 deletions(-) diff --git a/exp_commands/module/commands/types.lua b/exp_commands/module/commands/types.lua index 13de4b54..2e823a4c 100644 --- a/exp_commands/module/commands/types.lua +++ b/exp_commands/module/commands/types.lua @@ -231,31 +231,4 @@ types.color = end end) ---[[ ---- A player who has joined the game at least once, with a lower role -types.lower_role_player = -add("lower_role_player", function(input, player) - local player_i = game.get_player(input) - local player = game.get_player(player) - - if Roles.get_player_highest_role(player_i).index <= Roles.get_player_highest_role(player).index then - return invalid{ "exp-commands-parse.player", input } - else - return valid(player) - end -end) - ---- A role that is lower than given user -types.lower_role = - add("lower_role", function(input) - local player = game.get_player(input) - - if Roles.config.roles[input] and (Roles.config.roles[input].index >= Roles.get_player_highest_role(player).index) then - return valid(player) - else - return invalid{ "exp-commands-parse.role", input } - end - end) -]] - return types diff --git a/exp_legacy/module/modules/control/vlayer.lua b/exp_legacy/module/modules/control/vlayer.lua index ccd157ca..c63a3e41 100644 --- a/exp_legacy/module/modules/control/vlayer.lua +++ b/exp_legacy/module/modules/control/vlayer.lua @@ -271,9 +271,9 @@ function vlayer.insert_item(item_name, count) vlayer.allocate_item(item_name, allocate_count) end - local nc = count - allocate_count - vlayer_data.storage.unallocated[item_name] = vlayer_data.storage.unallocated[item_name] + count - allocate_count - vlayer.unable_alloc_item_pwr_calc(item_name, nc) + local unallocated = count - allocate_count + vlayer_data.storage.unallocated[item_name] = vlayer_data.storage.unallocated[item_name] + unallocated + vlayer.unable_alloc_item_pwr_calc(item_name, unallocated) else vlayer.allocate_item(item_name, count) end diff --git a/exp_legacy/module/modules/gui/player-list.lua b/exp_legacy/module/modules/gui/player-list.lua index cc08db56..0cb3cf7d 100644 --- a/exp_legacy/module/modules/gui/player-list.lua +++ b/exp_legacy/module/modules/gui/player-list.lua @@ -117,7 +117,6 @@ local add_player_base = local selected_player = game.players[selected_player_name] if event.button == defines.mouse_button_type.left then -- LMB will open the map to the selected player - local position = selected_player.physical_position event.player.set_controller{ type = defines.controllers.remote, position = selected_player.physical_position, surface = selected_player.physical_surface } else -- RMB will toggle the settings