feat: better code formatting

This commit is contained in:
2026-04-23 23:03:00 -03:00
parent a3841bd173
commit e18980938e
37 changed files with 1691 additions and 7930 deletions

View File

@@ -1,5 +1,5 @@
import { HarvesterHandler, RoleHandler, UpgraderHandler } from "roleHandlers";
import { PositionDelta } from "utils/positions";
import { HarvesterHandler, RoleHandler, UpgraderHandler } from 'roleHandlers';
import { PositionDelta } from 'utils/positions';
export type RoleDefinition = {
name: string;
@@ -10,23 +10,23 @@ export type RoleDefinition = {
export const CreepRoles = {
harvester: {
name: "harvester",
name: 'harvester',
body: [WORK, CARRY, MOVE],
handler: HarvesterHandler,
priority: 1
priority: 1,
},
upgrader: {
name: "upgrader",
name: 'upgrader',
body: [WORK, CARRY, MOVE],
handler: UpgraderHandler,
priority: 2
priority: 2,
},
builder: {
name: "builder",
name: 'builder',
body: [WORK, CARRY, MOVE],
handler: HarvesterHandler,
priority: 3
}
priority: 3,
},
} satisfies Record<string, RoleDefinition>;
export type CreepRole = keyof typeof CreepRoles;
@@ -35,23 +35,23 @@ export type CreepRequisition = Record<CreepRole, number>;
export type SpawnDestination = {
id: string; // ID of the spawn
type: "spawn";
type: 'spawn';
};
export type SourceDestination = {
id: string; // ID of the source
type: "source";
type: 'source';
sourceSpot: PositionDelta; // Position delta for the source spot
};
export type ControllerDestination = {
id: string; // ID of the controller
type: "controller";
type: 'controller';
};
export type ConstructionSiteDestination = {
id: string; // ID of the construction site
type: "constructionSite";
type: 'constructionSite';
};
export type CreepDestination =