indigoextras.jobs

Type members

Classlikes

trait Job extends Product with Serializable

A trait that when extended represents a job that can be done. Jobs have names and can be local to the worker, or globalablly available

A trait that when extended represents a job that can be done. Jobs have names and can be local to the worker, or globalablly available

final case
class JobMarket(availableJobs: List[Job]) extends SubSystem

The JobMarket is a subsystem that manages a global pool of available jobs.

The JobMarket is a subsystem that manages a global pool of available jobs.

Not all jobs are available to all workers however.

All interaction with the job market is done by a series of events.

Value Params
availableJobs

Jobs currently available for allocation to workers.

Companion
object
object JobMarket
Companion
class
sealed
trait JobMarketEvent extends GlobalEvent with Product with Serializable

Events that are used to manage the JobMarket

Events that are used to manage the JobMarket

Companion
object
Companion
class
object JobName
final case
class WorkContext[Actor, Context](gameTime: GameTime, dice: Dice, actor: Actor, context: Context)

The context the work is being done in, similar to frame context, work is not done in a vacuum.

The context the work is being done in, similar to frame context, work is not done in a vacuum.

Value Params
actor

An instance of the actor, for asking question like "Can the actor do the work?"

context

A free form type, e.g.: A list of other characters the worker can see.

dice

A dice for random number generation.

gameTime

The supplied game time.

final case
class WorkProgressReport[Actor, Context](workSchedule: WorkSchedule[Actor, Context], actor: Actor)

Encapsulates an updated schedule and an updated actor. Work is done by workers, but work can also affect workers, e.g. making them stronger, smarter, or tired.

Encapsulates an updated schedule and an updated actor. Work is done by workers, but work can also affect workers, e.g. making them stronger, smarter, or tired.

Value Params
actor

The updated actor.

workSchedule

The updated work schedule.

final case
class WorkSchedule[Actor, Context](id: BindingKey, worker: Worker[Actor, Context], jobStack: List[Job])

Represents an Actor's work schedule

Represents an Actor's work schedule

Companion
object
Companion
class
trait Worker[Actor, Context]

Represents a Worker for a given Actor

Represents a Worker for a given Actor

Companion
object
object Worker
Companion
class

Types

opaque type JobName

A simple type to distingush job names from other strings.

A simple type to distingush job names from other strings.

Value Params
value

the name of the job