schema: every function a fn value can name, not only zero-argument ones - fn_type is the type a field sees with the states stripped, spelled as a field's type is (fn(A,B)->R), with params beside states; reseeded
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
863b9712f9
commit
b647964839
7 changed files with 18325 additions and 18333 deletions
|
|
@ -32,6 +32,8 @@ program Attributes {
|
|||
const CAMP_TOOLS: int = 2 * VD_COUNT # how many a camp can carry
|
||||
# the tool a new camp starts with
|
||||
function first_tool() -> string { return Tools[0].name }
|
||||
# what a pack of n of a tool weighs - a fn(Tool,int)->float an editor can offer a field of that type
|
||||
function pack_weight(t: Tool, n: int) -> float { return t.weight * float(n) }
|
||||
entry {
|
||||
print(`{TL_COUNT} {Tools[TL_LANTERN].seller} {Tools[TL_LANTERN].name} {CAMP_TOOLS / 2}`)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue