Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Directive

Directives are contextual wrappers for flags and serve as attachment points for Overlords, acting as a sort of "process table" for the bot, with individual processes (Overlords) run by the scheulder (Overseer)

Hierarchy

Index

Constructors

constructor

  • new Directive(flag: Flag, requiredRCL?: number): Directive

Properties

colony

colony: Colony

memory

memory: FlagMemory

name

name: string

overlords

overlords: object

Type declaration

pos

pos: RoomPosition

ref

ref: string

requiredRCL

requiredRCL: number

room

room: Room | undefined

Static color

color: ColorConstant

Static directiveName

directiveName: string

Static secondaryColor

secondaryColor: ColorConstant

Accessors

flag

  • get flag(): Flag

print

  • get print(): string

Methods

alert

Private findNearestColony

  • findNearestColony(verbose?: boolean): Colony | undefined

Private getColony

  • getColony(): Colony | undefined

Private handleRelocation

  • handleRelocation(): boolean

Abstract init

  • init(): void

refresh

  • refresh(): void

remove

  • remove(force?: boolean): number | undefined

Abstract run

  • run(): void

setColor

  • setColor(color: ColorConstant, secondaryColor?: ColorConstant): number

setPosition

  • setPosition(pos: RoomPosition): number

Abstract spawnMoarOverlords

  • spawnMoarOverlords(): void

visuals

  • visuals(): void

Static create

  • create(pos: RoomPosition, opts?: DirectiveCreationOptions): number | string
  • Parameters

    • pos: RoomPosition
    • Default value opts: DirectiveCreationOptions = {}

    Returns number | string

Static createIfNotPresent

  • createIfNotPresent(pos: RoomPosition, scope: "room" | "pos", opts?: DirectiveCreationOptions): number | string | undefined
  • Parameters

    • pos: RoomPosition
    • scope: "room" | "pos"
    • Default value opts: DirectiveCreationOptions = {}

    Returns number | string | undefined

Static filter

  • filter(flag: Flag): boolean

Static find

Static isPresent

  • isPresent(pos: RoomPosition, scope: "room" | "pos"): boolean

Generated using TypeDoc