mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 12:31:41 +09:00
Bug Fixing Round 3
This commit is contained in:
@@ -230,7 +230,7 @@ end
|
||||
function Public.move_items(items,surface,position,radius,chest_type)
|
||||
chest_type = chest_type or 'iron-chest'
|
||||
surface = surface or game.surfaces[1]
|
||||
if type(position) ~= 'table' then return end
|
||||
if position and type(position) ~= 'table' then return end
|
||||
if type(items) ~= 'table' then return end
|
||||
-- Finds all entities of the given type
|
||||
local p = position or {x=0,y=0}
|
||||
@@ -438,7 +438,7 @@ end
|
||||
-- @return the list item found that matches the input
|
||||
function Public.auto_complete(options,input,use_key,rtn_key)
|
||||
local rtn = {}
|
||||
if type(input)~= 'string' then return end
|
||||
if type(input) ~= 'string' then return end
|
||||
input = input:lower()
|
||||
for key,value in pairs(options) do
|
||||
local check = use_key and key or value
|
||||
|
||||
@@ -641,6 +641,8 @@ end
|
||||
-- @treturn boolean true if the player was added successfully
|
||||
function Roles._prototype:add_player(player,skip_check,skip_event)
|
||||
player = Game.get_player_from_any(player)
|
||||
-- Default role cant have players added or removed
|
||||
if self.name == Roles.config.internal.default then return end
|
||||
-- Check the player is valid, can be skipped but a name must be given
|
||||
if not player then
|
||||
if skip_check then
|
||||
@@ -673,6 +675,8 @@ end
|
||||
-- @treturn boolean true if the player was removed successfully
|
||||
function Roles._prototype:remove_player(player,skip_check,skip_event)
|
||||
player = Game.get_player_from_any(player)
|
||||
-- Default role cant have players added or removed
|
||||
if self.name == Roles.config.internal.default then return end
|
||||
-- Check the player is valid, can be skipped but a name must be given
|
||||
if not player then
|
||||
if skip_check then
|
||||
|
||||
Reference in New Issue
Block a user