ludic/packages/ludic.hints/defs.ludic

40 lines
1.7 KiB
Text

# defs.ludic - a card as the game writes it, how much it matters, and the facts
export const HINTS_TIP: int = 0 # worth knowing
export const HINTS_NOTE: int = 1 # worth doing soon
export const HINTS_WARN: int = 2 # worth doing now
export const HINTS_URGENT: int = 3 # do it or lose the day
# The words are the lesson's text keys (the game translates them where it draws). Pictures are
# the game's: `icon` / `picN` name a glyph, `item` / `itemN` a thing's picture instead (-1: none).
export property HintCard {
key: string = ""
@OneOf(HINTS_TIP, HINTS_NOTE, HINTS_WARN, HINTS_URGENT) urgency: int = HINTS_TIP
icon: string = ""
@Ref(Items) item: int = -1
@Text line: Key = null # the chip on the rail: five or six words
@Text title: Key = null # the card's heading
@Text s1: Key = null # three steps, each with a picture
@Text s2: Key = null
@Text s3: Key = null
pic1: string = ""
pic2: string = ""
pic3: string = ""
@Ref(Items) item1: int = -1
@Ref(Items) item2: int = -1
@Ref(Items) item3: int = -1
@Text @Multiline later: Key = null # how not to be here next time
}
# the game's cards; a card's mute is kept by its key, so their order is free
@ByKey
export open registry Hints of HintCard as HINT
export const HINTS_F_OPENED: int = 0 # a card was opened, or the arrows moved to another
export const HINTS_F_CLOSED: int = 1 # put down by the player (not when it stopped being true)
export const HINTS_F_MUTED: int = 2 # "I know this": off the rail for good
export const HINTS_F_UNMUTED: int = 3 # every muted card given back (card -1)
export property HintsFact {
what: int = 0
card: int = -1
}