Worker
namespace Griff.Modules.Strategy;
public sealed class Worker : ComponentLets a Unit gather and build. Right-click a Resource and it fetches loads of it back to the nearest depot (a Building with Depot ticked) over and over; select it and press a building’s hotkey to place one of its Builds.
This is a component: its saved properties are on its component page.
Properties
Section titled “Properties”Builds
Section titled “Builds”public string? Builds { get; set; }The building prefabs it can put up, e.g. “Farm, Barracks, Tower”. Each needs a Building.
public int Carry { get; set; }How much it carries back each trip.
Carrying
Section titled “Carrying”public string? Carrying { get; }What it’s carrying, e.g. “Gold”, or empty.
GatherTime
Section titled “GatherTime”public float GatherTime { get; set; }Seconds it takes to gather a load.
public int Load { get; }How much it’s carrying.
Source
Section titled “Source”public Entity? Source { get; }The resource it goes back to after dropping off a load.
Methods
Section titled “Methods”Gather
Section titled “Gather”public void Gather(Entity resource)Sends it to gather from resource.
Options
Section titled “Options”public IReadOnlyList<string> Options()The building prefabs in Builds.