Skip to content

Commit

Permalink
fix permission groups
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmartin0 committed Sep 15, 2024
1 parent ddb5a50 commit 7879de1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions maps/pirates/roles/roles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ local function set_restricted_permissions(group)
group.set_allows_action(defines.input_action.activate_paste, false)
group.set_allows_action(defines.input_action.upgrade, false)
group.set_allows_action(defines.input_action.deconstruct, false)
group.set_allows_action(defines.input_action.open_gui, false)
group.set_allows_action(defines.input_action.fast_entity_transfer, false)
group.set_allows_action(defines.input_action.fast_entity_split, false)
end
Expand All @@ -623,6 +624,7 @@ function Public.try_create_permissions_groups()
set_restricted_permissions(group)
group.set_allows_action(defines.input_action.deconstruct, true) --pick up dead players

group.set_allows_action(defines.input_action.open_gui, true)
group.set_allows_action(defines.input_action.fast_entity_transfer, true)
group.set_allows_action(defines.input_action.fast_entity_split, true)
end
Expand All @@ -632,15 +634,15 @@ function Public.try_create_permissions_groups()
group.set_allows_action(defines.input_action.deconstruct, true) --pick up dead players
set_restricted_permissions(group)

-- Note there is other code to prevent these players from opening chests
group.set_allows_action(defines.input_action.open_gui, true) -- We want you to open the market, but there is other code to prevent you from opening certain chests
end

if not game.permissions.get_group('cabin_privileged') then
local group = game.permissions.create_group('cabin_privileged')
group.set_allows_action(defines.input_action.deconstruct, true) --pick up dead players
set_restricted_permissions(group)

-- Note there is other code to prevent these players from opening chests
group.set_allows_action(defines.input_action.open_gui, true) -- We want you to open the market, but there is other code to prevent you from opening certain chests
end

if not game.permissions.get_group('plebs') then
Expand Down

0 comments on commit 7879de1

Please sign in to comment.