GunChleoc has proposed merging lp:~widelands-dev/widelands/sphinx-buildings
into lp:widelands.
Commit message:
Restructured and enhanced the Buildings documentation.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1512093 in widelands: "Add tribes directory to developer scripting
reference"
https://bugs.launchpad.net/widelands/+bug/1512093
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/sphinx-buildings/+merge/308704
--
Your team Widelands Developers is requested to review the proposed merge of
lp:~widelands-dev/widelands/sphinx-buildings into lp:widelands.
=== modified file 'data/tribes/atlanteans.lua'
--- data/tribes/atlanteans.lua 2016-09-01 15:43:01 +
+++ data/tribes/atlanteans.lua 2016-10-18 09:09:00 +
@@ -1,4 +1,6 @@
-- RST
+-- .. _lua_tribes_.lua:
+--
-- .lua
-- -
--
@@ -7,7 +9,7 @@
dirname = path.dirname(__file__)
-- RST
--- .. function:: new_tribe(table)
+-- .. function:: new_tribe{table}
--
--This function adds all units to a tribe.
--
=== modified file 'data/tribes/buildings/militarysites/atlanteans/castle/helptexts.lua'
--- data/tribes/buildings/militarysites/atlanteans/castle/helptexts.lua 2016-09-02 08:27:34 +
+++ data/tribes/buildings/militarysites/atlanteans/castle/helptexts.lua 2016-10-18 09:09:00 +
@@ -1,68 +1,29 @@
--- RST
--- Building Helptexts
--- --
---
--- Each building has a ``helptexts.lua`` script, which is located in the same directory as its ``init.lua`` script.
--- The functions in this file return texts that are used for buildings by the Tribal Encyclopedia.
---
--- See also the helper functions in ``scripting/help/global_helptexts.lua``
---
+-- The helptext documentation is located in /doc/sphinx/lua_tribes_buildings_rst.org
-- This include can be removed when all help texts have been defined.
include "tribes/scripting/help/global_helptexts.lua"
--- RST
--- .. function:: building_helptext_lore()
---
---Returns a localized string with a lore helptext for this building.
---If you don't have a lore text yet, use ``no_lore_text_yet()`` from the ``global_helptexts.lua`` script.
---
---:returns: Localized lore text
function building_helptext_lore()
-- TRANSLATORS#: Lore helptext for a building
return no_lore_text_yet()
end
--- RST
--- .. function:: building_helptext_lore_author()
---
---Returns a localized string with a fictional author for the lore helptext for this building. The returned string can be empty.
---If you don't have an author yet, use ``no_lore_author_text_yet()`` from the ``global_helptexts.lua`` script.
---
--:returns: Localized lore author or empty string.
function building_helptext_lore_author()
-- TRANSLATORS#: Lore author helptext for a building
return no_lore_author_text_yet()
end
--- RST
--- .. function:: building_helptext_purpose()
---
---Returns a localized string with a purpose helptext for this building. This should be individually defined for all buildings. You can use ``no_purpose_text_yet()`` from the ``global_helptexts.lua`` script if you're not ready to define this yet.
---
---:returns: Localized purpose text
function building_helptext_purpose()
-- TRANSLATORS: Purpose helptext for a building
return pgettext("building", "Garrisons soldiers to expand your territory.")
end
--- RST
--- .. function:: building_helptext_note()
---
---Returns a localized string with a note that is added to the purpose. This can be empty.
---
---:returns: Localized note text or empty string.
function building_helptext_note()
-- TRANSLATORS: Note helptext for a building
return pgettext("building", "If you’re low on soldiers to occupy new military sites, use the downward arrow button to decrease the capacity. You can also click on a soldier to send him away.")
end
--- RST
--- .. function:: building_helptext_performance()
---
---Returns a localized string with a performance helptext for this building. You can use ``no_purpose_text_yet()`` from the ``global_helptexts.lua`` script if the performance hasn't been calculated yet. Leave empty when this isn't applicable (e.g. for militarysites or warehouses).
---
---:returns: Localized performance text or empty string.
function building_helptext_performance()
-- TRANSLATORS#: Performance helptext for a building
return ""
=== modified file 'data/tribes/buildings/militarysites/atlanteans/castle/init.lua'
--- data/tribes/buildings/militarysites/atlanteans/castle/init.lua 2016-09-22 16:45:02 +
+++ data/tribes/buildings/militarysites/atlanteans/castle/init.lua 2016-10-18 09:09:00 +
@@ -1,4 +1,6 @@
-- RST
+-- .. _lua_tribes_buildings_militarysites:
+--
-- Military Sites
-- --
--
@@ -13,51 +15,37 @@
dirname = path.dirname(__file__)
-- RST
--- .. function:: new_militarysite_type(table)
+-- ..