diff --git a/src/collections/banking/BankAccounts.ts b/src/collections/banking/BankAccounts.ts index 4c46e87..b72d3aa 100644 --- a/src/collections/banking/BankAccounts.ts +++ b/src/collections/banking/BankAccounts.ts @@ -7,7 +7,15 @@ export const BankAccounts: CollectionConfig = { admin: { group: "Banking", useAsTitle: "name", - defaultColumns: ["name", "accountType", "ownerUser", "ownerFaction", "balance", "status", "currency"], + defaultColumns: [ + "name", + "accountType", + "ownerUser", + "ownerFaction", + "balance", + "status", + "currency", + ], }, access: { read: ({ req }) => !!req.user, @@ -21,7 +29,7 @@ export const BankAccounts: CollectionConfig = { type: "text", required: true, admin: { - description: "Display name for the account (e.g., \"Unit Treasury\", \"Red Faction Reserve\").", + description: 'Display name for the account (e.g., "Unit Treasury", "Red Faction Reserve").', }, }, { @@ -35,7 +43,8 @@ export const BankAccounts: CollectionConfig = { { label: "Personal", value: "personal" }, ], admin: { - description: "Treasury = unit-level central funds. Faction = a specific faction's funds. Personal = an individual operator's wallet.", + description: + "Treasury = unit-level central funds. Faction = a specific faction's funds. Personal = an individual operator's wallet.", }, }, { @@ -64,7 +73,8 @@ export const BankAccounts: CollectionConfig = { relationTo: "resources", required: true, admin: { - description: "The currency this account is denominated in (normally the main currency set in Game Rules).", + description: + "The currency this account is denominated in (normally the main currency set in Game Rules).", }, }, { diff --git a/src/collections/game/GameEventLogs.ts b/src/collections/game/GameEventLogs.ts index d87a523..fbd8e14 100644 --- a/src/collections/game/GameEventLogs.ts +++ b/src/collections/game/GameEventLogs.ts @@ -51,7 +51,8 @@ export const GameEventLogs: CollectionConfig = { type: "checkbox", defaultValue: true, admin: { - description: "System-generated events are created automatically. Uncheck for manual/GM narrative entries.", + description: + "System-generated events are created automatically. Uncheck for manual/GM narrative entries.", }, }, { diff --git a/src/collections/game/GameHardResources.ts b/src/collections/game/GameHardResources.ts index 584ecdc..7bf4868 100644 --- a/src/collections/game/GameHardResources.ts +++ b/src/collections/game/GameHardResources.ts @@ -11,7 +11,8 @@ export const GameHardResources: CollectionConfig = { 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.", + 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: [ { diff --git a/src/collections/game/GameStructures.ts b/src/collections/game/GameStructures.ts index 6fbda89..5c82d1d 100644 --- a/src/collections/game/GameStructures.ts +++ b/src/collections/game/GameStructures.ts @@ -36,7 +36,12 @@ export const GameStructures: CollectionConfig = { structure: d.id, targetCollection: "game-structures", targetId: d.id, - data: { previousStored: prev.storedResources, newStored: d.storedResources, previousVoid: prev.voidStorage, newVoid: d.voidStorage }, + data: { + previousStored: prev.storedResources, + newStored: d.storedResources, + previousVoid: prev.voidStorage, + newVoid: d.voidStorage, + }, }); }, ], diff --git a/src/collections/intelligence/Factions.ts b/src/collections/intelligence/Factions.ts index b35eb14..c9a1aa1 100644 --- a/src/collections/intelligence/Factions.ts +++ b/src/collections/intelligence/Factions.ts @@ -120,8 +120,7 @@ export const Factions: CollectionConfig = { min: -100, max: 100, admin: { - description: - "Standing from -100 (hostile) to 100 (allied). 0 is neutral.", + description: "Standing from -100 (hostile) to 100 (allied). 0 is neutral.", }, }, { diff --git a/src/collections/intelligence/Missions.ts b/src/collections/intelligence/Missions.ts index 1b310b8..966c87c 100644 --- a/src/collections/intelligence/Missions.ts +++ b/src/collections/intelligence/Missions.ts @@ -1,4 +1,4 @@ -import type { CollectionConfig, Payload, User } from "payload"; +import type { CollectionConfig, Payload } from "payload"; import { isDeveloper } from "@/utils/access-control/isRole"; import hasRoles from "@/utils/access-control/hasRoles"; diff --git a/src/collections/locker/LockerStorages.ts b/src/collections/locker/LockerStorages.ts index bdbcfcf..4bffa11 100644 --- a/src/collections/locker/LockerStorages.ts +++ b/src/collections/locker/LockerStorages.ts @@ -45,7 +45,8 @@ export const LockerStorages: CollectionConfig = { name: "items", type: "array", admin: { - description: "Items stored in the locker grid. Position and rotation are managed from the member locker UI.", + description: + "Items stored in the locker grid. Position and rotation are managed from the member locker UI.", }, fields: [ { @@ -133,7 +134,7 @@ export const LockerStorages: CollectionConfig = { name: "customName", type: "text", admin: { - description: "Optional custom name for this item (e.g. \"Frank's Karma\").", + description: 'Optional custom name for this item (e.g. "Frank\'s Karma").', }, }, ], diff --git a/src/collections/logistics/Assets.ts b/src/collections/logistics/Assets.ts index 5091a22..a0846c3 100644 --- a/src/collections/logistics/Assets.ts +++ b/src/collections/logistics/Assets.ts @@ -524,8 +524,7 @@ export const Assets: CollectionConfig = { type: "group", label: "Storage Dimensions", admin: { - description: - "How this asset occupies space in member lockers and container grids.", + description: "How this asset occupies space in member lockers and container grids.", }, fields: [ { diff --git a/src/collections/logistics/Shipments.ts b/src/collections/logistics/Shipments.ts index 50cbb42..2f05986 100644 --- a/src/collections/logistics/Shipments.ts +++ b/src/collections/logistics/Shipments.ts @@ -149,7 +149,8 @@ export const Shipments: CollectionConfig = { type: "checkbox", defaultValue: false, admin: { - description: "If true, the vehicle will automatically return to its origin after completing this shipment.", + description: + "If true, the vehicle will automatically return to its origin after completing this shipment.", }, }, // Metadata diff --git a/src/collections/logistics/Structures.ts b/src/collections/logistics/Structures.ts index 9baae41..b7d0ae5 100644 --- a/src/collections/logistics/Structures.ts +++ b/src/collections/logistics/Structures.ts @@ -52,12 +52,8 @@ export const Structures: CollectionConfig = { } const rotated = entry.rotated ?? false; - const ew = rotated - ? (res as any).gridHeight ?? 1 - : (res as any).gridWidth ?? 1; - const eh = rotated - ? (res as any).gridWidth ?? 1 - : (res as any).gridHeight ?? 1; + const ew = rotated ? ((res as any).gridHeight ?? 1) : ((res as any).gridWidth ?? 1); + const eh = rotated ? ((res as any).gridWidth ?? 1) : ((res as any).gridHeight ?? 1); let spot: { x: number; y: number } | null = null; for (let y = 0; y <= newY - eh && !spot; y++) { @@ -68,11 +64,11 @@ export const Structures: CollectionConfig = { if (!pRes || typeof pRes !== "object") continue; const pRotated = placed.rotated ?? false; const pw = pRotated - ? (pRes as any).gridHeight ?? 1 - : (pRes as any).gridWidth ?? 1; + ? ((pRes as any).gridHeight ?? 1) + : ((pRes as any).gridWidth ?? 1); const ph = pRotated - ? (pRes as any).gridWidth ?? 1 - : (pRes as any).gridHeight ?? 1; + ? ((pRes as any).gridWidth ?? 1) + : ((pRes as any).gridHeight ?? 1); const px = placed.gridX; const py = placed.gridY; for (let dx = 0; dx < ew && !overlaps; dx++) { @@ -116,12 +112,8 @@ export const Structures: CollectionConfig = { } const rotated = entry.rotated ?? false; - const ew = rotated - ? (res as any).gridHeight ?? 1 - : (res as any).gridWidth ?? 1; - const eh = rotated - ? (res as any).gridWidth ?? 1 - : (res as any).gridHeight ?? 1; + const ew = rotated ? ((res as any).gridHeight ?? 1) : ((res as any).gridWidth ?? 1); + const eh = rotated ? ((res as any).gridWidth ?? 1) : ((res as any).gridHeight ?? 1); const gx = entry.gridX; const gy = entry.gridY; @@ -135,11 +127,11 @@ export const Structures: CollectionConfig = { if (!pRes || typeof pRes !== "object") continue; const pRotated = placed.rotated ?? false; const pw = pRotated - ? (pRes as any).gridHeight ?? 1 - : (pRes as any).gridWidth ?? 1; + ? ((pRes as any).gridHeight ?? 1) + : ((pRes as any).gridWidth ?? 1); const ph = pRotated - ? (pRes as any).gridWidth ?? 1 - : (pRes as any).gridHeight ?? 1; + ? ((pRes as any).gridWidth ?? 1) + : ((pRes as any).gridHeight ?? 1); const px = placed.gridX; const py = placed.gridY; @@ -176,11 +168,11 @@ export const Structures: CollectionConfig = { if (!pRes || typeof pRes !== "object") continue; const pRotated = placed.rotated ?? false; const pw = pRotated - ? (pRes as any).gridHeight ?? 1 - : (pRes as any).gridWidth ?? 1; + ? ((pRes as any).gridHeight ?? 1) + : ((pRes as any).gridWidth ?? 1); const ph = pRotated - ? (pRes as any).gridWidth ?? 1 - : (pRes as any).gridHeight ?? 1; + ? ((pRes as any).gridWidth ?? 1) + : ((pRes as any).gridHeight ?? 1); const px = placed.gridX; const py = placed.gridY; @@ -230,7 +222,15 @@ export const Structures: CollectionConfig = { structure: gsDoc.id, targetCollection: "game-structures", targetId: gsDoc.id, - data: { oldX, oldY, newX, newY, structureName: gsDoc.name, voidCount: newVoid.length, repositioned: changed }, + data: { + oldX, + oldY, + newX, + newY, + structureName: gsDoc.name, + voidCount: newVoid.length, + repositioned: changed, + }, }); } diff --git a/src/collections/logistics/Vehicles.ts b/src/collections/logistics/Vehicles.ts index 741c83b..f772a9d 100644 --- a/src/collections/logistics/Vehicles.ts +++ b/src/collections/logistics/Vehicles.ts @@ -124,8 +124,7 @@ export const Vehicles: CollectionConfig = { required: true, defaultValue: 1, admin: { - description: - "Fuel consumed per unit of distance traveled.", + description: "Fuel consumed per unit of distance traveled.", }, }, ], diff --git a/src/collections/market/MarketListings.ts b/src/collections/market/MarketListings.ts index 0454dee..e7f963f 100644 --- a/src/collections/market/MarketListings.ts +++ b/src/collections/market/MarketListings.ts @@ -70,8 +70,7 @@ export const MarketListings: CollectionConfig = { name: "desiredPrice", type: "number", admin: { - description: - "The seller's target price during negotiations. Defaults to the asking price.", + description: "The seller's target price during negotiations. Defaults to the asking price.", }, }, { @@ -87,7 +86,8 @@ export const MarketListings: CollectionConfig = { type: "relationship", relationTo: "resources", admin: { - description: "The currency this listing is priced in. Defaults to the main campaign currency.", + description: + "The currency this listing is priced in. Defaults to the main campaign currency.", }, }, { diff --git a/src/collections/market/MarketNegotiations.ts b/src/collections/market/MarketNegotiations.ts index afa9999..4996d32 100644 --- a/src/collections/market/MarketNegotiations.ts +++ b/src/collections/market/MarketNegotiations.ts @@ -8,7 +8,16 @@ export const MarketNegotiations: CollectionConfig = { admin: { group: "Market", useAsTitle: "id", - defaultColumns: ["id", "listing", "buyer", "amount", "patience", "proposedBy", "status", "updatedAt"], + defaultColumns: [ + "id", + "listing", + "buyer", + "amount", + "patience", + "proposedBy", + "status", + "updatedAt", + ], pagination: { defaultLimit: 50 }, }, access: { @@ -17,10 +26,7 @@ export const MarketNegotiations: CollectionConfig = { if (!user) return false; if (hasRoles(["admin", "developer"], user)) return true; return { - or: [ - { buyer: { equals: user.id } }, - { "listing.seller": { equals: user.id } }, - ], + or: [{ buyer: { equals: user.id } }, { "listing.seller": { equals: user.id } }], } as Where; }, create: ({ req }) => !!req.user, @@ -29,10 +35,7 @@ export const MarketNegotiations: CollectionConfig = { if (!user) return false; if (hasRoles(["admin", "developer"], user)) return true; return { - or: [ - { buyer: { equals: user.id } }, - { "listing.seller": { equals: user.id } }, - ], + or: [{ buyer: { equals: user.id } }, { "listing.seller": { equals: user.id } }], } as Where; }, delete: isDeveloper, diff --git a/src/collections/tickets/Tickets.ts b/src/collections/tickets/Tickets.ts index 1300159..56881e4 100644 --- a/src/collections/tickets/Tickets.ts +++ b/src/collections/tickets/Tickets.ts @@ -36,7 +36,15 @@ export const Tickets: CollectionConfig = { admin: { group: "Helpdesk", useAsTitle: "title", - defaultColumns: ["title", "status", "priority", "category", "reporter", "assignee", "updatedAt"], + defaultColumns: [ + "title", + "status", + "priority", + "category", + "reporter", + "assignee", + "updatedAt", + ], listSearchableFields: ["title", "id"], pagination: { defaultLimit: 50 }, },