Adds Upgraders

This commit is contained in:
2025-07-12 10:27:28 -03:00
parent dd36461c35
commit 23d9739167
7 changed files with 176 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
import { HarvesterHandler, RoleHandler } from "roleHandlers";
import { HarvesterHandler, RoleHandler, UpgraderHandler } from "roleHandlers";
import { PositionDelta } from "./source";
export type RoleDefinition = {
@@ -18,7 +18,7 @@ export const CreepRoles = {
upgrader: {
name: "upgrader",
body: [WORK, CARRY, MOVE],
handler: HarvesterHandler,
handler: UpgraderHandler,
priority: 2
},
builder: {
@@ -47,6 +47,11 @@ export type SourceDestination = {
sourceSpot: PositionDelta; // Position delta for the source spot
}
export type ControllerDestination = {
id: string; // ID of the controller
type: "controller";
}
export type CreepDestination = SpawnDestination | SourceDestination;
export type CreepDestination = SpawnDestination | SourceDestination | ControllerDestination;