mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user