feat(packages): ludic.wildlife - a valley's animals: species handed in as data, ranges placed against the ground and moved with the season, the day's steering, the senses and a net alert that settles, feeding, lures and snares, birds, spawning and repopulation, its own dice, facts and a save section
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
80f3468ff8
commit
c9dc592dcc
28 changed files with 1956 additions and 0 deletions
34
packages/ludic.wildlife/record.ludic
Normal file
34
packages/ludic.wildlife/record.ludic
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# record.ludic - what this player has met: the species seen up close and the species fed, as masks
|
||||
# by species number, and whether anything has been fed at all
|
||||
var wl_seen: int = 0
|
||||
var wl_fed: int = 0
|
||||
var wl_fed_any: bool = false
|
||||
|
||||
export function wildlife_seen(sp: int) -> bool { return (wl_seen & (1 << sp)) != 0 }
|
||||
export function wildlife_seen_mask() -> int { return wl_seen }
|
||||
export function wildlife_fed_mask() -> int { return wl_fed }
|
||||
export function wildlife_fed_any() -> bool { return wl_fed_any }
|
||||
|
||||
# seen up close (a guest's own pass, droppings read, a sighting here); true the first time
|
||||
export function wildlife_saw(sp: int) -> bool {
|
||||
if wildlife_seen(sp) { return false }
|
||||
wl_seen = wl_seen | (1 << sp)
|
||||
return true
|
||||
}
|
||||
|
||||
export function wildlife_set_seen(mask: int) -> void { wl_seen = mask }
|
||||
|
||||
# a species fed, credited to this player
|
||||
export function wildlife_mark_fed(sp: int) -> void {
|
||||
wl_fed = wl_fed | (1 << sp)
|
||||
wl_fed_any = true
|
||||
}
|
||||
|
||||
# nothing fed yet (a test that feeds again), or the flag as given
|
||||
export function wildlife_set_fed_any(on: bool) -> void { wl_fed_any = on }
|
||||
|
||||
function wl_record_reset() -> void {
|
||||
wl_seen = 0
|
||||
wl_fed = 0
|
||||
wl_fed_any = false
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue