Systems
WebsiteGitHubGitBook
  • πŸ•ΉοΈSystems Intro
    • Game Controls
    • User Interface
    • Item Sprite Generation
  • πŸ“¦Asset Data
    • How Asset Data works
    • Using Asset Data
    • Creating an Asset Database
    • Known Issues
  • πŸ“‘Traits
    • Containers & Items
    • Roles
  • πŸ”«Gamemodes
    • Adding objectives
    • Adding game modes
  • πŸŽ₯Roles
    • Adding a new role
    • Adding a new permission
  • πŸ–οΈInteractions
    • Interactions Guide
  • 🧰Containers
    • Using containers in game
    • Setting up a container
      • Fields description
      • Networking a container
      • Custom storage conditions
    • FAQ
  • πŸ‘œInventories
    • Developer Guide
  • πŸ—ΊοΈTilemaps
    • Creating Maps
    • Adding new items & objects
      • Adjacency Connections
    • Technical Implementation
    • Refactor notes
    • Interface
  • πŸ’Entities
    • 🩲Character Customization
  • πŸ›‹οΈLobby
  • πŸ› οΈCrafting
  • πŸ’¬Chat
    • Channels
      • Department specific channels
      • Distance based channels
  • πŸ“£Audios
  • πŸ”ŽExamine
    • How it works
    • Setting up a game object to be examinable
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. Roles

Adding a new permission

This page describes how to add new permissions into the game

PreviousAdding a new roleNextInteractions

Last updated 2 years ago

Was this helpful?

To add a new permission into the game go to Assets/Content/Data/Traits/Identification/Permissions, right click and go Create -> Inventory -> Traits -> Permission, just name it accordingly.

To add the permission into a role, just add it to the Role Data's permission list

This permission can be checked inside of a script throught the Inventory class, by using the HasPermission function.

For example, the Security Locker currently checks for a Security permission to be both locked and unlocked. the Unlock Locker interaction checks for the permission by getting the player's inventory:

πŸŽ₯
Here we get the player's inventory through the hands that executed the interaction, with it we have access to the HasPermission function, we then check if it has the "permissionToUnlock" permission.
The permissionToUnlock field is set via the inspector.