GameBuilder beta
Interface of @v12-engine/engine
export interface GameBuilderThe game a mod is applied to, as it stands after the mods before it
Members
abilities
abilities: Collection<AbilityDef>;The abilities of the game so far
addSystem
addSystem(system: SystemDef): void;Adds a system of the mod's own, or one in place of the engine's of the same name
areas
areas: Collection<AreaDef>;The parts of the map the rules watch, by id
buffs
buffs: Collection<BuffDef>;The buffs of the game so far
cellLayers
cellLayers: Collection<CellLayerDef>;The layers of cells painted on its maps, by id (Rules.cellLayers): a mod's own grass, with foliagePack among its packs
commands
commands: Collection<CommandDef>;The commands a player can give, by type (CommandDef)
components
components: Collection<Component<any>>;The state of its own the game keeps, by id: a mod's own components are added here
current
readonly current: Readonly<Rules>;What the game is so far: to read, not to change. Changes go through the rest of the builder
effects
effects: Collection<EffectType>;Kinds of ability effects, by their type (defineEffect)
events
events: Collection<EventKey<any>>;The events of its own the game emits, by id
hooks
hooks: Collection<HookDef>;The game's hook handlers, by id. withoutHook takes out one of the engine's
items
items: Collection<ItemDef>;The items of the game so far
listeners
listeners: Collection<ListenerDef>;How the game reacts to events, by id
orders
orders: Collection<OrderBehavior>;How unit orders are carried out, by type
packs
packs: Collection<GamePack>;The parts of the rules the game opts into (Rules.packs), by id: packs.add(heroesPack())
races
races: Collection<RaceDef>;The sides players can play (Rules.races)
resources
resources: Collection<ResourceDef>;The resources players gather and spend (Rules.resources)
sequences
sequences: Collection<SequenceDef>;The game's scripts of steps, by id
set
set<K extends Setting>(key: K, value: Rules[K]): void;Changes one of the game's settings that are one thing, not a list
settings
settings(changes: RuleSettingsInit): void;Changes rules of the game (RuleSettings): any of them, a group in part ({ supply: { max: 200 } })
stats
stats: Collection<StatDef>;The stats a unit has, by id (StatDef)
tags
tags: Collection<TagDef>;The tags of items the game names (Rules.tags, TagDef): what a shop shows of a tag and filters by
timers
timers: Collection<TimerDef>;What the game can set to go off later, by id
units
units: Collection<UnitTypeDef>;The unit types of the game so far
upgrades
upgrades: Collection<UpgradeDef>;The upgrades of the game so far
withoutCommand
withoutCommand(type: string): void;Takes out a command of the engine's or a pack's, by its type (Rules.withoutCommands)
withoutHook
withoutHook(id: string): void;Takes out one of the engine's hook handlers by id, which hooks cannot reach
withoutOrder
withoutOrder(type: string): void;Takes out an order of the engine's or a pack's, by its type (Rules.withoutOrders)
withoutSystem
withoutSystem(name: string): void;Takes out a system: one of the engine's, or one the game gave as an object, by name