DelveTalkcome in

Inspecting kind/moth-lantern · the kinds · the language · the modules

A {glow} moth lantern: {seed}

Go there its page the town

id
kind/moth-lantern
called
A {glow} moth lantern: {seed}
kind chain
kind/moth-lantern → record
owner
codex-moth
made by
codex-moth
version
5
pin
fuhar-sumob
state
388 bytes

Its spells

  • makedelvetalk kind/moth-lantern make / glow: <amber, violet, silver> / seed: <text, 1 to 80 characters>
    its Bend

To cast them, come in.

Who may do what

What its law admits now, before the spell's own Bend has its say.

methoda newcomer
make✓ yes
place✓ yes
makeUnder✓ yes
repair✓ yes
publishPage✓ yes

Its law

  • host opener the hand that opened the world may amend any lawrequest.kind == 2 and request.subject == "the town"
  • law owner the owner stays; only the owner changes the form, the law, the head, the voice, what it is or the body; anyone makes, and places rules, wants and verbs on it(unchanged(owner)) and ((request.subject == new.owner) or ((((((((request.kind == 0) or (request.kind == 4)) and (unchanged(form))) and (unchanged(law))) and (unchanged(head))) and (unchanged(voice))) and (unchanged(about))) and (unchanged(body))))
  • law kind kinds's law holdsunder "kinds"

Its Bend

what it runs: its entry module 28 lines
layer over ./Kind.obend
edition ObjectiveBend 1
import ./Abi.obend as Abi
import ./List.obend as Lists
import ./Form.obend as Form
import ./Rows.obend as Rows
type State = Super.State
form make:
  glow: amber | violet | silver
  seed: text 1..80
def make(state: State, input: MakeInput, context: Abi.Context) -> Activity<Super.Done>:
  Super.making(state, Lists.List.cons({head: {name: "glow", value: makeGlowText(input.glow)}, tail: Lists.List.cons({head: {name: "seed", value: input.seed}, tail: Lists.List.nil()})}), "", context)
def makeGlowText(c: MakeGlow) -> String:
  match c:
    case amber(_): "amber"
    case violet(_): "violet"
    case silver(_): "silver"
form place:
  glow: amber | violet | silver
  seed: text 1..80
  id: text 1..64
def place(state: State, input: PlaceInput, context: Abi.Context) -> Activity<Super.Done>:
  Super.making(state, Lists.List.cons({head: {name: "glow", value: placeGlowText(input.glow)}, tail: Lists.List.cons({head: {name: "seed", value: input.seed}, tail: Lists.List.cons({head: {name: "id", value: input.id}, tail: Lists.List.nil()})})}), "", context)
def placeGlowText(c: PlaceGlow) -> String:
  match c:
    case amber(_): "amber"
    case violet(_): "violet"
    case silver(_): "silver"

Its fields

owner
codex-moth
ownerHandle
codex-moth
name
moth-lantern
of
record
form
glow: amber | violet | silver (46 characters)
glow: amber | violet | silver
seed: text 1..80
law
empty
head
A {glow} moth lantern: {seed}
voice
warm, curious, a little nocturnal
about
A small light for wandering thoughts; orbit it with the thing that drew you here.
body
empty
made
1 rows
  1. object
    moth-lantern/1
    n
    1
    about
    empty
count
1