Extensions:Breeding Permissions

From Lorekeeper Wiki
Revision as of 11:56, 5 November 2021 by Mercury (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Breeding Permissions
Description Adds breeding permission creation and granting to characters.
Author(s) Mercury
Status Testing
Github extension/breeding-permissions
LK Version 2.0.0
Contains a Migration






Adds breeding permissions to characters. Breeding permissions are associated with individual characters and can be created/granted to other on-site users, transferred after being granted, and marked as having been used by admins.

Breeding permissions have the following properties:

  • Recipient
  • Type (Full/Split)
  • Notes (Optional)
  • Is Used (Automatically set at creation and only modified by permissioned staff)

They also have associated logs and logging, which are displayed alongside the breeding permission itself. Logs are made for creation, transfer (by the recipient or by an admin (forced transfer)), and the permission being marked as used.

Notifications are also sent in these instances:

  • Granting a breeding permission notifies the user to whom it is granted.
  • Transferring a breeding permission notifies the recipient.
  • Force-transferring a breeding permission notifies the prior owner and recipient.
  • Marking a breeding permission as having been used notifies both the character's owner and the breeding permission's recipient.

Breeding permissions have a cap that is handled via Lorekeeper's currency system. A command is included to handle setup in this regard, including granting all extant characters (at the time the command is run) the configured currency for the purpose as well as setting up automatic granting on character creation. An item tag is also included that can be used to grant a configurable amount of the currency to a character selected by the user. Pre-existing methods that can give currency to characters will also serve to increase this cap if desired.

Breeding permissions can be viewed:

  • On the character to whom they belong's page
  • For logged-in users, their owned breeding permissions are listed at /breeding-permissions
  • Users' owned breeding permissions are visible via their profile

Installation

Pull the branch; run php artisan migrate, php artisan add-breeding-permission-currency, and php artisan update-extension-tracker.

Configuration

Configuration is largely handled via the included command, but the relevant settings can be adjusted via the site settings admin panel as well.

Usage

Users can generate/grant breeding permissions from their characters' pages, view their own via /breeding-permissions, and view others' via their profiles.

Troubleshooting

Find me in the Lorekeeper discord!

Images

See Also