mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 12:31:41 +09:00
.
This commit is contained in:
@@ -231,31 +231,4 @@ types.color =
|
|||||||
end
|
end
|
||||||
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
|
return types
|
||||||
|
|||||||
@@ -271,9 +271,9 @@ function vlayer.insert_item(item_name, count)
|
|||||||
vlayer.allocate_item(item_name, allocate_count)
|
vlayer.allocate_item(item_name, allocate_count)
|
||||||
end
|
end
|
||||||
|
|
||||||
local nc = count - allocate_count
|
local unallocated = count - allocate_count
|
||||||
vlayer_data.storage.unallocated[item_name] = vlayer_data.storage.unallocated[item_name] + count - allocate_count
|
vlayer_data.storage.unallocated[item_name] = vlayer_data.storage.unallocated[item_name] + unallocated
|
||||||
vlayer.unable_alloc_item_pwr_calc(item_name, nc)
|
vlayer.unable_alloc_item_pwr_calc(item_name, unallocated)
|
||||||
else
|
else
|
||||||
vlayer.allocate_item(item_name, count)
|
vlayer.allocate_item(item_name, count)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -117,7 +117,6 @@ local add_player_base =
|
|||||||
local selected_player = game.players[selected_player_name]
|
local selected_player = game.players[selected_player_name]
|
||||||
if event.button == defines.mouse_button_type.left then
|
if event.button == defines.mouse_button_type.left then
|
||||||
-- LMB will open the map to the selected player
|
-- 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 }
|
event.player.set_controller{ type = defines.controllers.remote, position = selected_player.physical_position, surface = selected_player.physical_surface }
|
||||||
else
|
else
|
||||||
-- RMB will toggle the settings
|
-- RMB will toggle the settings
|
||||||
|
|||||||
Reference in New Issue
Block a user