package world type ExitDir string const ( North ExitDir = "north" South ExitDir = "south" East ExitDir = "east" West ExitDir = "west" Up ExitDir = "up" Down ExitDir = "down" ) var ExitAliases = map[string]ExitDir{ "n": North, "s": South, "e": East, "w": West, "u": Up, "d": Down, } var OppositeExit = map[ExitDir]ExitDir{ North: South, South: North, East: West, West: East, Up: Down, Down: Up, } var ExitOrder = []ExitDir{ "northwest", North, "northeast", East, "southeast", South, "southwest", West, Up, Down, } type SpawnDef struct { ItemID string `yaml:"item_id"` Quantity int `yaml:"quantity"` RespawnTicks int `yaml:"respawn_ticks"` } type Room struct { ID int `yaml:"id"` Name string `yaml:"name"` Description string `yaml:"description"` MapSymbol string `yaml:"map_symbol"` Exits map[ExitDir]int `yaml:"exits"` Objects []string `yaml:"objects"` Spawns []SpawnDef `yaml:"spawns"` Mobs []string `yaml:"mobs"` }