package data import ( "encoding/json" "log" "mazeratsgen/assets/bindata" ) type tableStruct struct { Character characterTable City cityTable Magic magicTable Maze mazeTable Monster monsterTable NPC npcTable Treasure treasureTable Wild wildTable } var Tables = tableStruct{ Character: CharacterTable(), City: CityTable(), Magic: MagicTable(), Maze: MazeTable(), Monster: MonsterTable(), NPC: NPCTable(), Treasure: TreasureTable(), Wild: WildTable(), } type characterTable struct { Appearance [][]string `json:"appearance"` Clothing [][]string `json:"clothing"` Background [][]string `json:"background"` Items [][]string `json:"items"` Mannerism [][]string `json:"mannerism"` Personality [][]string `json:"personality"` PhysicalDetail [][]string `json:"physical_detail"` Feat []string `json:"feat"` } type cityTable struct { CityThemes [][]string `json:"city_themes"` CityEvents [][]string `json:"city_events"` DistrictThemes [][]string `json:"district_themes"` UpperClassBuildings [][]string `json:"upper_class_buildings"` LowerClassBuildings [][]string `json:"lower_class_buildings"` CityActivities [][]string `json:"city_activities"` BuildingRooms [][]string `json:"building_rooms"` TacticalStreetFeatures [][]string `json:"tactical_street_features"` TacticalBuildingFeatures [][]string `json:"tactical_building_features"` Factions [][]string `json:"factions"` FactionTraits [][]string `json:"faction_traits"` FactionGoals [][]string `json:"faction_goals"` } type magicTable struct { PhysicalEffects [][]string `json:"physical_effects"` PhysicalElements [][]string `json:"physical_elements"` PhysicalForms [][]string `json:"physical_forms"` EtherealEffects [][]string `json:"ethereal_effects"` EtherealElements [][]string `json:"ethereal_elements"` EtherealForms [][]string `json:"ethereal_forms"` Mutations [][]string `json:"mutations"` Insanities [][]string `json:"insanities"` Catastrophes [][]string `json:"catastrophes"` } type mazeTable struct { DungeonEntrances [][]string `json:"dungeon_entrances"` DungeonForms [][]string `json:"dungeon_forms"` DungeonLayout [][]string `json:"dungeon_layout"` DungeonRuinations [][]string `json:"dungeon_ruinations"` DungeonRewards [][]string `json:"dungeon_rewards"` DungeonActivities [][]string `json:"dungeon_activities"` DungeonRooms [][]string `json:"dungeon_rooms"` DungeonRoomDetails [][]string `json:"dungeon_room_details"` DungeonTricks [][]string `json:"dungeon_tricks"` DungeonHazards [][]string `json:"dungeon_hazards"` TrapEffects [][]string `json:"trap_effects"` TrapTriggers [][]string `json:"trap_triggers"` } type monsterTable struct { Aerial [][]string `json:"aerial"` Terrestrial [][]string `json:"terrestrial"` Aquatic [][]string `json:"aquatic"` Features [][]string `json:"features"` Traits [][]string `json:"traits"` Abilities [][]string `json:"abilities"` Tactics [][]string `json:"tactics"` Personality [][]string `json:"personality"` Weakness [][]string `json:"weakness"` } type npcTable struct { CivilizedNPCs [][]string `json:"civilized_npcs"` UnderworldNPCs [][]string `json:"underworld_npcs"` WildernessNPCs [][]string `json:"wilderness_npcs"` FemaleNames [][]string `json:"female_names"` MaleNames [][]string `json:"male_names"` UpperClassSurnames [][]string `json:"upper_class_surnames"` LowerClassSurnames [][]string `json:"lower_class_surnames"` Assets [][]string `json:"assets"` Liabilities [][]string `json:"liabilities"` NPCGoals [][]string `json:"npc_goals"` Misfortunes [][]string `json:"misfortunes"` Missions [][]string `json:"missions"` Methods [][]string `json:"methods"` Appearances [][]string `json:"appearances"` PhysicalDetails [][]string `json:"physical_details"` Clothing [][]string `json:"clothing"` Personalities [][]string `json:"personalities"` Mannerisms [][]string `json:"mannerisms"` Secrets [][]string `json:"secrets"` Reputations [][]string `json:"reputations"` Hobbies [][]string `json:"hobbies"` Relationships [][]string `json:"relationships"` DivineDomains [][]string `json:"divine_domains"` AfterTheParty [][]string `json:"after_the_party"` } type treasureTable struct { MiscItems [][]string `json:"misc_items"` WornItems [][]string `json:"worn_items"` WeaponItems [][]string `json:"weapon_items"` BookSubjects [][]string `json:"book_subjects"` ToolItems [][]string `json:"tool_items"` Potions [][]string `json:"potions"` MagicalIngredients [][]string `json:"magical_ingredients"` TreasureItems [][]string `json:"treasure_items"` TreasureTraits [][]string `json:"treasure_traits"` ValuableMaterials [][]string `json:"valuable_materials"` } type wildTable struct { WildernessRegions [][]string `json:"wilderness_regions"` WildernessRegionTraits [][]string `json:"wilderness_region_traits"` WildernessLandmarks [][]string `json:"wilderness_landmarks"` WildernessStructures [][]string `json:"wilderness_structures"` WildernessDiscoveries [][]string `json:"wilderness_discoveries"` WildernessActivities [][]string `json:"wilderness_activities"` WildernessHazards [][]string `json:"wilderness_hazards"` EdiblePlants [][]string `json:"edible_plants"` PoisonousPlants [][]string `json:"poisonous_plants"` InnAdjectives [][]string `json:"inn_adjectives"` InnNouns [][]string `json:"inn_nouns"` InnQuirks [][]string `json:"inn_quirks"` } func CharacterTable() characterTable { var table characterTable unmarshalTable("character.json", &table) return table } func CityTable() cityTable { var table cityTable unmarshalTable("city.json", &table) return table } func MagicTable() magicTable { var table magicTable unmarshalTable("magic.json", &table) return table } func MazeTable() mazeTable { var table mazeTable unmarshalTable("maze.json", &table) return table } func MonsterTable() monsterTable { var table monsterTable unmarshalTable("monster.json", &table) return table } func NPCTable() npcTable { var table npcTable unmarshalTable("npc.json", &table) return table } func TreasureTable() treasureTable { var table treasureTable unmarshalTable("treasure.json", &table) return table } func WildTable() wildTable { var table wildTable unmarshalTable("wild.json", &table) return table } func unmarshalTable(path string, table interface{}) { asset, err := bindata.Asset(path) if err != nil { log.Fatal(err) } err = json.Unmarshal(asset, &table) if err != nil { log.Fatal(err) } }