building_help.lua ----------------- This script returns a formatted entry for the ingame building help. Pass the internal tribe name and building name to the coroutine to select the building type. .. function:: dependencies_basic(images[, text = nil]) Creates a dependencies line of any length. :arg images: images in the correct order from left to right as table (set in {}). :arg text: comment of the image. :returns: a row of pictures connected by arrows. .. function:: item_image(mapobject) Creates Richtext image code for the given map object. :arg mapobject: the mapobject to represent :returns: richtext code for displaying the mapobject as an image, preferable using its menu icon .. function:: find_resource_indicator(tribe, resource) Returns the biggest resource indicator available. :arg tribe: the tribe to use for getting a tribe-specific indicator :arg resource: a map resource description :returns: a resource indicator immovable description .. function:: find_created_collected_matches(creator, collector) Returns a table of map objects that link the two given production sites :arg creator: a productionsite description that creates bobs, immovables and/or resources :arg collector: a productionsite description that collects bobs, immovables and/or resources :returns: a list of all bob, immovable and resource descriptions that matches both .. function:: dependencies_collects(tribe, building_description) Assemble dependency help for a building that collects bobs, immovables and/or resources :arg tribe: the tribe for which to display this help :arg building_description: a production site that collects bobs, immovables and/or resources from the map :returns: a richtext-formatted ``p()`` .. function:: dependencies_creates(tribe, building_description) Assemble dependency help for a building that places bobs, immovables and/or resources on the map :arg tribe: the tribe for which to display this help :arg building_description: a production site that creates bobs, immovables and/or resources :returns: a richtext-formatted ``p()`` .. function:: building_help_general_string(tribe, building_description) Creates the string for the general section in building help :arg tribe: The :class:`wl.map.TribeDescription` for the tribe that has this building. :arg building_description: The :class:`wl.map.BuildingDescription` for the building that we are displaying this help for. :returns: rt of the formatted text .. function:: building_help_dependencies_production(tribe, building_description) The input and output wares of a productionsite :arg tribe: The :class:`wl.map.TribeDescription` for the tribe that has this building. :arg building_description: The :class:`wl.map.BuildingDescription` for the building that we are displaying this help for. :returns: an rt string with images describing a chain of ware/building dependencies .. function:: building_help_building_section(building_description) Formats the "Building" section in the building help: Enhancing info, costs and space required :arg building_description: The :class:`wl.map.BuildingDescription` for the building that we are displaying this help for. :returns: an rt string describing the building section .. function:: building_help_crew_section(tribe, building_description) Displays the building's workers with an image and the tool they use :arg tribe: The :class:`wl.map.TribeDescription` for the tribe that we are displaying this help for. :arg building_description: The :class:`wl.map.BuildingDescription` for the building that we are displaying this help for. :returns: Workers/Crew section of the help file .. function:: building_help_production_section(tribe, building_description) Displays the production/performance section with a headline :arg tribe: The :class:`wl.map.TribeDescription` for the tribe that has this building. :arg building_description: The :class:`wl.map.BuildingDescription` for the building that we are displaying this help for. :returns: rt for the production section .. function:: building_help(tribe, building_description) Main function to create a building help string. :arg tribe: The :class:`wl.map.TribeDescription` for the tribe that has this building. :arg building_description: The :class:`wl.map.BuildingDescription` for the building that we are displaying this help for. :returns: rt of the formatted text