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

Parse characters for zones

Parse exits for zones

Parse items for zones

Parse verb data into structs

Convert zones into a world struct

Strip a zone of extra information that Kalevala doesn't care about

Link to this section Functions

Link to this function

dereference(zone, reference)

View Source

Dereference a variable for a specific zone

Link to this function

dereference(zones, zone, reference)

View Source

Dereference a variable to it's value

If a known key is found, use the current zone

Load zone files into Kalevala structs

Link to this function

load_help(path \\ %{brains_path: "data/brains", help_path: "data/help", verbs_path: "data/verbs.ucl", world_path: "data/world"}.help_path)

View Source

Load help files

Link to this function

parse_character(zone, key, character_data, brains)

View Source

Parse character data

ID is the zone's id concatenated with the character's key

Link to this function

parse_characters(zone, data, zones)

View Source

Parse characters for zones

Dereferences the world characters, creates structs and attachs them to the matching room.

Link to this function

parse_exits(zone, data, zones)

View Source

Parse exits for zones

Dereferences the exit exit_names, creates structs for each exit_name, and attaches them to the matching room.

Link to this function

parse_features(arg1, zone_data)

View Source
Link to this function

parse_item(zone, key, item_data, verbs)

View Source

Parse item data

ID is the zone's id concatenated with the item's key

Link to this function

parse_items(zone, data, zones)

View Source

Parse items for zones

Dereferences the world items, creates structs and attachs them to the matching room.

Link to this function

parse_room(zone, key, room_data, zone_data)

View Source

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

Link to this function

parse_zone(arg, context)

View Source

Parse a zone

Loads basic data and rooms

Strip a zone of extra information that Kalevala doesn't care about