70 lines
2.5 KiB
Text
70 lines
2.5 KiB
Text
# defs.ludic - a job and a board as the game writes them, the states, the scopes and the facts
|
|
export const JOBS_SELF: int = 0 # a personal job: yours, saved with your body
|
|
export const JOBS_PARTY: int = 1 # the party's: the world's, saved with the trip
|
|
|
|
export const JOBS_OFFERED: int = 0
|
|
export const JOBS_ACTIVE: int = 1
|
|
export const JOBS_DONE: int = 2 # handed in and paid
|
|
export const JOBS_READY: int = 3 # everything in hand; waits to be handed in
|
|
|
|
export const JOBS_GROUPS: int = 8 # the game's lists (a board of notices, a vendor's longer work)
|
|
|
|
# `kind` is the game's (-1: nothing counts it; the game's own play says when it is ready), `param`
|
|
# narrows it (-1 any), `need` 0 is never ready by counting. Money and rep are paid through JobsPay.
|
|
export property JobDef {
|
|
key: string = ""
|
|
@OneOf(JG_) group: int = 0
|
|
@Ref(Vendors) vendor: int = 0
|
|
@Ref(JobKinds) kind: int = -1
|
|
@Ref(Species) param: int = -1
|
|
need: int = 1
|
|
money: int = 0
|
|
rep: int = 0
|
|
minrep: int = 0 # standing in its scope before it is offered
|
|
minstage: int = 0 # how far the game's story must be
|
|
@OneOf(JOBS_SELF, JOBS_PARTY, JOBS_OFFERED, JOBS_ACTIVE, JOBS_DONE, JOBS_READY, JOBS_GROUPS) scope: int = JOBS_SELF
|
|
@Text title: Key = null
|
|
@Text @Multiline text: Key = null
|
|
@Text @Multiline how: Key = null
|
|
icon: string = ""
|
|
}
|
|
|
|
# the game's jobs; saved by key, so order is free
|
|
@ByKey
|
|
export open registry Jobs of JobDef as JOB
|
|
|
|
# a board of posts rolled by the game (JobsWorld.roll): `keep` days a post stays up, `auto` pays
|
|
# the moment it is met, `refill` replaces a handed-in post at once
|
|
export property JobBoard {
|
|
key: string = ""
|
|
slots: int = 3
|
|
keep: int = 1
|
|
auto: bool = false
|
|
refill: bool = true
|
|
@OneOf(JOBS_SELF, JOBS_PARTY, JOBS_OFFERED, JOBS_ACTIVE, JOBS_DONE, JOBS_READY, JOBS_GROUPS) scope: int = JOBS_SELF
|
|
}
|
|
|
|
@AppendOnly
|
|
export open registry JobBoards of JobBoard as BOARD
|
|
|
|
export const JOBS_F_OFFERED: int = 0
|
|
export const JOBS_F_PROGRESSED: int = 1
|
|
export const JOBS_F_COMPLETED: int = 2
|
|
export const JOBS_F_HANDED_IN: int = 3
|
|
export const JOBS_F_GIVEN_UP: int = 4 # taken and let go: what the game placed for it comes down
|
|
|
|
# `job` a written job, or -1 and `board` / `slot` a post; what it counted rides along, since a
|
|
# post handed in is replaced before anyone reads the fact
|
|
export property JobsFact {
|
|
what: int = 0
|
|
job: int = -1
|
|
board: int = -1
|
|
slot: int = -1
|
|
kind: int = -1
|
|
param: int = -1
|
|
have: int = 0
|
|
need: int = 0
|
|
money: int = 0
|
|
rep: int = 0
|
|
scope: int = JOBS_SELF
|
|
}
|