Align character generation tutorial more closely with the code.

This commit is contained in:
gas-public-wooden-clean 2024-01-01 18:22:32 -06:00
parent ff159e3942
commit b6d7c2500a

View file

@ -354,7 +354,12 @@ def start_chargen(caller, session=None):
# this generates all random components of the character
tmp_character = TemporaryCharacterSheet()
EvMenu(caller, menutree, session=session, tmp_character=tmp_character)
EvMenu(
caller,
menutree,
session=session,
startnode_input=("sgsg", {"tmp_character": tmp_character}),
)
```
@ -645,16 +650,19 @@ This is a start point for spinning up the chargen from a command later.
"node_chargen": node_chargen,
"node_change_name": node_change_name,
"node_swap_abilities": node_swap_abilities,
"node_apply_character": node_apply_character
"node_apply_character": node_apply_character,
}
# this generates all random components of the character
tmp_character = TemporaryCharacterSheet()
EvMenu(caller, menutree, session=session,
EvMenu(
caller,
menutree,
startnode="node_chargen", # <-----
tmp_character=tmp_character)
session=session,
startnode_input=("sgsg", {"tmp_character": tmp_character}),
)
```
Now that we have all the nodes, we add them to the `menutree` we left empty before. We only add the nodes, _not_ the goto-helpers! The keys we set in the `menutree` dictionary are the names we should use to point to nodes from inside the menu (and we did).