A permission group that defines what players in this group are allowed to do.
stringstringfalseThe name of this group. Setting the name to nil or an empty string sets the name to the default value.
Array<LuaPlayer>unknownfalseThe players in this group.
uint32unknownfalseThe group ID
booleanunknownfalseIs this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be false. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
stringunknownfalseThe class name of this object. Available even when valid is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
LuaPermissionGroup.add_player(player: PlayerIdentification) -> boolean
permissionGroup.add_player(player)
takes_table: falsetable_optional: falseAdds the given player to this group.
player: PlayerIdentificationboolean — Whether the player was added.LuaPermissionGroup.remove_player(player: PlayerIdentification) -> boolean
permissionGroup.remove_player(player)
takes_table: falsetable_optional: falseRemoves the given player from this group.
player: PlayerIdentificationboolean — Whether the player was removed.LuaPermissionGroup.allows_action(action: defines.input_action) -> boolean
permissionGroup.allows_action(action)
takes_table: falsetable_optional: falseWhether this group allows the given action.
action: defines.input_action — The action in question.booleanLuaPermissionGroup.set_allows_action(action: defines.input_action, allow_action: boolean) -> boolean
permissionGroup.set_allows_action(action, true)
takes_table: falsetable_optional: falseSets whether this group allows the performance the given action.
action: defines.input_action — The action in question.allow_action: boolean — Whether to allow the specified action.boolean — Whether the value was successfully applied.LuaPermissionGroup.destroy() -> boolean
permissionGroup.destroy()
takes_table: falsetable_optional: falseDestroys this group.
boolean — Whether the group was successfully destroyed.