import { CollectionConfig } from "payload"; import { isDeveloper } from "@/utils/access-control/isRole"; export const GameHardResources: CollectionConfig = { slug: "game-hard-resources", access: { create: isDeveloper, update: isDeveloper, delete: isDeveloper, }, admin: { group: "Game", useAsTitle: "name", description: "\"Hard Resources\" represent the hard-coded, integral resource types used to power the game. It includes things like Intelligence Points, Command Points, and other non-physical resources that are essential for gameplay mechanics. Unlike regular (\"soft\") resources, hard resources are not calculated by transactions and are instead stored as numeric amounts that are updated by the backend. Soft resources are designed by the players, are defined in the Resources category under Logistics, and are calculated by transactions (ledgers) to ensure their accuracy.", }, fields: [ { name: "name", type: "text", required: true, unique: true, }, { name: "amount", type: "number", required: true, defaultValue: 0, }, { name: "description", type: "richText", required: true, }, ], };