feat(locker): add event logging for locker and loadout actions
This commit is contained in:
parent
7f4df6597a
commit
9a565986e9
3 changed files with 19 additions and 1 deletions
|
|
@ -18,6 +18,8 @@ const TARGET_COLLECTIONS = [
|
||||||
{ label: "Bank Accounts", value: "bank-accounts" },
|
{ label: "Bank Accounts", value: "bank-accounts" },
|
||||||
{ label: "Bank Transactions", value: "bank-transactions" },
|
{ label: "Bank Transactions", value: "bank-transactions" },
|
||||||
{ label: "Ledger Entries", value: "ledger-entries" },
|
{ label: "Ledger Entries", value: "ledger-entries" },
|
||||||
|
{ label: "Locker Storages", value: "locker-storages" },
|
||||||
|
{ label: "Loadouts", value: "loadouts" },
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
export const GameEventLogs: CollectionConfig = {
|
export const GameEventLogs: CollectionConfig = {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ interface GameEventInput {
|
||||||
message: string;
|
message: string;
|
||||||
actor?: number;
|
actor?: number;
|
||||||
structure?: number;
|
structure?: number;
|
||||||
targetCollection?: "users" | "missions" | "maps" | "campaigns" | "factions" | "technologies" | "assets" | "resources" | "structures" | "vehicles" | "game-structures" | "game-vehicles" | "shipments" | "bank-accounts" | "bank-transactions" | "ledger-entries";
|
targetCollection?: "users" | "missions" | "maps" | "campaigns" | "factions" | "technologies" | "assets" | "resources" | "structures" | "vehicles" | "game-structures" | "game-vehicles" | "shipments" | "bank-accounts" | "bank-transactions" | "ledger-entries" | "locker-storages" | "loadouts";
|
||||||
targetId?: number;
|
targetId?: number;
|
||||||
data?: Record<string, unknown>;
|
data?: Record<string, unknown>;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,22 @@ export const EventTypes = {
|
||||||
FinanceTransfer: "finance:transfer",
|
FinanceTransfer: "finance:transfer",
|
||||||
BankAccountCreate: "bank:account-create",
|
BankAccountCreate: "bank:account-create",
|
||||||
|
|
||||||
|
// Locker
|
||||||
|
LockerCreate: "locker:create",
|
||||||
|
LockerAddItem: "locker:item-add",
|
||||||
|
LockerRemoveItem: "locker:item-remove",
|
||||||
|
LockerGridMove: "locker:grid-move",
|
||||||
|
LockerGridRotate: "locker:grid-rotate",
|
||||||
|
LockerGridMerge: "locker:grid-merge",
|
||||||
|
LockerGridSplit: "locker:grid-split",
|
||||||
|
LockerGridArrange: "locker:grid-arrange",
|
||||||
|
|
||||||
|
// Loadouts
|
||||||
|
LoadoutCreate: "loadout:create",
|
||||||
|
LoadoutUpdate: "loadout:update",
|
||||||
|
LoadoutDelete: "loadout:delete",
|
||||||
|
LoadoutEquip: "loadout:equip",
|
||||||
|
|
||||||
// Shipping
|
// Shipping
|
||||||
ShipmentCreate: "shipment:create",
|
ShipmentCreate: "shipment:create",
|
||||||
ShipmentDispatch: "shipment:dispatch",
|
ShipmentDispatch: "shipment:dispatch",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue