Kantele.World.Loader (ExVenture v0.1.0) View Source
Load the world from data files
Link to this section Summary
Functions
Dereference a variable for a specific zone
Dereference a variable to it's value
Load zone files into Kalevala structs
Load help files
Parse character data
Parse characters for zones
Parse exits for zones
Parse item data
Parse items for zones
Parse room data
Parse verb data into structs
Convert zones into a world struct
Parse a zone
Strip a zone of extra information that Kalevala doesn't care about
Link to this section Functions
Dereference a variable for a specific zone
Dereference a variable to it's value
If a known key is found, use the current zone
Load zone files into Kalevala structs
load_help(path \\ %{brains_path: "data/brains", help_path: "data/help", verbs_path: "data/verbs.ucl", world_path: "data/world"}.help_path)
View SourceLoad help files
Parse character data
ID is the zone's id concatenated with the character's key
Parse characters for zones
Dereferences the world characters, creates structs and attachs them to the matching room.
Parse exits for zones
Dereferences the exit exit_names, creates structs for each exit_name, and attaches them to the matching room.
Parse item data
ID is the zone's id concatenated with the item's key
Parse items for zones
Dereferences the world items, creates structs and attachs them to the matching room.
Parse room data
ID is the zone's id concatenated with the room's key
Parse verb data into structs
Convert zones into a world struct
Parse a zone
Loads basic data and rooms
Strip a zone of extra information that Kalevala doesn't care about