Added Config

This commit is contained in:
Cooldude2606
2019-03-14 18:30:50 +00:00
parent 7c40d82cb2
commit 2d634303a9
3 changed files with 102 additions and 1 deletions

View File

@@ -63,6 +63,9 @@ function Permissions_Groups.set_player_group(player,group)
end
function Permissions_Groups._prototype:set_action(action,state)
if type(action) == 'string' then
action = defines.input_action[action]
end
self.actions[action] = state
return self
end
@@ -98,6 +101,9 @@ function Permissions_Groups._prototype:disallow_all()
end
function Permissions_Groups._prototype:is_allowed(action)
if type(action) == 'string' then
action = defines.input_action[action]
end
local state = self.actions[action]
if state == nil then
state = self.allow_all_actions