Merge lp:~widelands-dev/widelands/sphinx-tribes into lp:widelands

Proposed by GunChleoc
Status: Merged
Merged at revision: 8115
Proposed branch: lp:~widelands-dev/widelands/sphinx-tribes
Merge into: lp:widelands
Diff against target: 219 lines (+116/-5)
9 files modified
data/tribes/buildings/militarysites/atlanteans/castle/init.lua (+1/-1)
data/tribes/buildings/partially_finished/constructionsite/init.lua (+1/-1)
data/tribes/buildings/partially_finished/dismantlesite/init.lua (+1/-1)
data/tribes/buildings/productionsites/atlanteans/armorsmithy/init.lua (+1/-1)
data/tribes/buildings/warehouses/atlanteans/headquarters/init.lua (+1/-1)
data/tribes/immovables/ashes/init.lua (+31/-0)
data/tribes/ships/atlanteans/init.lua (+33/-0)
data/tribes/wares/armor/init.lua (+41/-0)
doc/sphinx/extract_rst.py (+6/-0)
To merge this branch: bzr merge lp:~widelands-dev/widelands/sphinx-tribes
Reviewer Review Type Date Requested Status
kaputtnik (community) testing Approve
Review via email: mp+306757@code.launchpad.net

Commit message

Added remaining Tribes units to Sphinx documentation (immovables, ships, wares).

To post a comment you must log in.
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 1362. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/162768596.
Appveyor build 1204. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_sphinx_tribes-1204.

Revision history for this message
kaputtnik (franku) wrote :

Extracts fine and sphinx-build found no failures.

I have just a question about the tabbing: If a table is used as parameter, the table entries are at the same column as the "Parameters" entry. Wouldn't it be better to have the "Table"-entries indented?

Example image: https://bugs.launchpad.net/widelands/+bug/1512093/+attachment/4748854/+files/sphinx_tabbed.png

review: Approve (testing)
Revision history for this message
GunChleoc (gunchleoc) wrote :

Let's continue this discussion in the bug.

@bunnybot merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/tribes/buildings/militarysites/atlanteans/castle/init.lua'
2--- data/tribes/buildings/militarysites/atlanteans/castle/init.lua 2016-09-02 09:30:13 +0000
3+++ data/tribes/buildings/militarysites/atlanteans/castle/init.lua 2016-09-26 11:38:31 +0000
4@@ -24,7 +24,7 @@
5 --
6 -- **name**: A string containing the internal name of this building.
7 --
8--- **descname**: The translatable display name. use ``pgettext`` with the ``msgctxt`` above to fetch the string.
9+-- **descname**: The translatable display name. Use ``pgettext`` with the ``msgctxt`` above to fetch the string.
10 --
11 -- **helptext_script**: The full path to the ``helptexts.lua`` script for this building.
12 --
13
14=== modified file 'data/tribes/buildings/partially_finished/constructionsite/init.lua'
15--- data/tribes/buildings/partially_finished/constructionsite/init.lua 2016-09-02 08:27:34 +0000
16+++ data/tribes/buildings/partially_finished/constructionsite/init.lua 2016-09-26 11:38:31 +0000
17@@ -25,7 +25,7 @@
18 --
19 -- **name**: A string containing the internal name of this building.
20 --
21--- **descname**: The translatable display name. use ``pgettext`` with the ``msgctxt`` above to fetch the string.
22+-- **descname**: The translatable display name. Use ``pgettext`` with the ``msgctxt`` above to fetch the string.
23 --
24 -- **helptext_script**: The full path to the ``helptexts.lua`` script for this building.
25 --
26
27=== modified file 'data/tribes/buildings/partially_finished/dismantlesite/init.lua'
28--- data/tribes/buildings/partially_finished/dismantlesite/init.lua 2016-09-02 08:27:34 +0000
29+++ data/tribes/buildings/partially_finished/dismantlesite/init.lua 2016-09-26 11:38:31 +0000
30@@ -25,7 +25,7 @@
31 --
32 -- **name**: A string containing the internal name of this building.
33 --
34--- **descname**: The translatable display name. use ``pgettext`` with the ``msgctxt`` above to fetch the string.
35+-- **descname**: The translatable display name. Use ``pgettext`` with the ``msgctxt`` above to fetch the string.
36 --
37 -- **helptext_script**: The full path to the ``helptexts.lua`` script for this building.
38 --
39
40=== modified file 'data/tribes/buildings/productionsites/atlanteans/armorsmithy/init.lua'
41--- data/tribes/buildings/productionsites/atlanteans/armorsmithy/init.lua 2016-09-10 16:50:51 +0000
42+++ data/tribes/buildings/productionsites/atlanteans/armorsmithy/init.lua 2016-09-26 11:38:31 +0000
43@@ -26,7 +26,7 @@
44 --
45 -- **name**: A string containing the internal name of this building.
46 --
47--- **descname**: The translatable display name. use ``pgettext`` with the ``msgctxt`` above to fetch the string.
48+-- **descname**: The translatable display name. Use ``pgettext`` with the ``msgctxt`` above to fetch the string.
49 --
50 -- **helptext_script**: The full path to the ``helptexts.lua`` script for this building.
51 --
52
53=== modified file 'data/tribes/buildings/warehouses/atlanteans/headquarters/init.lua'
54--- data/tribes/buildings/warehouses/atlanteans/headquarters/init.lua 2016-09-02 09:30:13 +0000
55+++ data/tribes/buildings/warehouses/atlanteans/headquarters/init.lua 2016-09-26 11:38:31 +0000
56@@ -28,7 +28,7 @@
57 --
58 -- **name**: A string containing the internal name of this building.
59 --
60--- **descname**: The translatable display name. use ``pgettext`` with the ``msgctxt`` above to fetch the string.
61+-- **descname**: The translatable display name. Use ``pgettext`` with the ``msgctxt`` above to fetch the string.
62 --
63 -- **helptext_script**: The full path to the ``helptexts.lua`` script for this building.
64 --
65
66=== modified file 'data/tribes/immovables/ashes/init.lua'
67--- data/tribes/immovables/ashes/init.lua 2015-11-03 18:18:27 +0000
68+++ data/tribes/immovables/ashes/init.lua 2016-09-26 11:38:31 +0000
69@@ -1,5 +1,36 @@
70+-- RST
71+-- Tribe Immovables
72+-- ----------------
73+--
74+-- Immovables are entities not connected to a road that a tribe can own,
75+-- for example a corn field or a ship under construction.
76+--
77+-- Tribe Immovables are defined in
78+-- ``data/tribes/immovables/<immovable_name>/init.lua``.
79+
80 dirname = path.dirname(__file__)
81
82+-- RST
83+-- .. function:: new_immovable_type(table)
84+--
85+-- This function adds the definition of a tribe immovable to the engine.
86+--
87+-- :arg table: This table contains all the data that the game engine will
88+-- add to this immovable. It contains the following entries:
89+--
90+-- **msgctxt**: The context that Gettext will use to disambiguate the
91+-- translations for strings in this table.
92+--
93+-- **name**: A string containing the internal name of this immovable.
94+--
95+-- **descname**: The translatable display name. Use ``pgettext`` with the
96+-- ``msgctxt`` above to fetch the string.
97+--
98+-- **programs**: A table with the programs that this immovable will perform,
99+-- e.g. ``{ animate=idle 4500, remove= }``
100+--
101+-- **animations**: A table containing all animations for this immovable.
102+--
103 tribes:new_immovable_type {
104 msgctxt = "immovable",
105 name = "ashes",
106
107=== modified file 'data/tribes/ships/atlanteans/init.lua'
108--- data/tribes/ships/atlanteans/init.lua 2015-11-03 18:18:27 +0000
109+++ data/tribes/ships/atlanteans/init.lua 2016-09-26 11:38:31 +0000
110@@ -1,3 +1,13 @@
111+-- RST
112+-- Ships
113+-- -----
114+--
115+-- Each tribe can have one ship that is used to explore the seas and transport
116+-- wares between ports.
117+--
118+-- Ships are defined in
119+-- ``data/tribes/ships/<tribe_name>/init.lua``.
120+
121 dirname = path.dirname(__file__)
122
123 animations = {
124@@ -14,6 +24,29 @@
125 }
126 add_worker_animations(animations, "sail", dirname, "sail", {89, 86}, 10)
127
128+
129+-- RST
130+-- .. function:: new_ship_type(table)
131+--
132+-- This function adds the definition of a ship to the engine.
133+--
134+-- :arg table: This table contains all the data that the game engine will
135+-- add to this ship. It contains the following entries:
136+--
137+-- **msgctxt**: The context that Gettext will use to disambiguate the
138+-- translations for strings in this table.
139+--
140+-- **name**: A string containing the internal name of this ship.
141+--
142+-- **descname**: The translatable display name. Use ``pgettext`` with the
143+-- ``msgctxt`` above to fetch the string.
144+--
145+-- **capacity**: An int defining how many wares or workers this ship can transport
146+--
147+-- **vision_range**: How far the ship can see.
148+--
149+-- **animations**: A table containing all animations for this ship.
150+-- Ships have an "idle", a "sinking" and a directional "sail" animation.
151 tribes:new_ship_type {
152 name = "atlanteans_ship",
153 -- TRANSLATORS: This is the ship's name used in lists of units
154
155=== modified file 'data/tribes/wares/armor/init.lua'
156--- data/tribes/wares/armor/init.lua 2015-12-11 16:54:00 +0000
157+++ data/tribes/wares/armor/init.lua 2016-09-26 11:38:31 +0000
158@@ -1,5 +1,46 @@
159+-- RST
160+-- Wares
161+-- -----
162+--
163+-- Wares are used to build buildings, produce other wares and recruit units.
164+--
165+-- Wares are defined in
166+-- ``data/tribes/wares/<ware_name>/init.lua``.
167+-- The ware will also need its help texts, which are defined in
168+-- ``data/tribes/wares/<ware_name>/helptexts.lua``
169+
170+
171 dirname = path.dirname(__file__)
172
173+-- RST
174+-- .. function:: new_ware_type(table)
175+--
176+-- This function adds the definition of a ware to the engine.
177+--
178+-- :arg table: This table contains all the data that the game engine will add
179+-- to this ware. It contains the following entries:
180+--
181+-- **msgctxt**: The context that Gettext will use to disambiguate the
182+-- translations for strings in this table.
183+--
184+-- **name**: A string containing the internal name of this ware.
185+--
186+-- **descname**: The translatable display name. Use ``pgettext`` with the
187+-- ``msgctxt`` above to fetch the string.
188+--
189+-- **helptext_script**: The full path to the ``helptexts.lua`` script for this ware.
190+--
191+-- **icon**: The full path to the menu icon for this ware.
192+--
193+-- **default_target_quantity**: A table listing the default target quantity
194+-- for each tribe's economy. For example, ``{ atlanteans = 3, empire = 1 }``
195+--
196+-- **preciousness**: How precious this ware is to each tribe. For example,
197+-- ``{ atlanteans = 0, empire = 1 }``
198+--
199+-- **animations**: A table containing all animations for this ware.
200+-- Wares have an "idle" animation.
201+
202 tribes:new_ware_type {
203 msgctxt = "ware",
204 name = "armor",
205
206=== modified file 'doc/sphinx/extract_rst.py'
207--- doc/sphinx/extract_rst.py 2016-09-02 09:48:28 +0000
208+++ doc/sphinx/extract_rst.py 2016-09-26 11:38:31 +0000
209@@ -47,6 +47,12 @@
210 'constructionsite', 'lua_tribes_units'),
211 ('data/tribes/buildings/partially_finished/dismantlesite',
212 'dismantlesite', 'lua_tribes_units'),
213+ ('data/tribes/immovables/ashes',
214+ 'immovables', 'lua_tribes_units'),
215+ ('data/tribes/ships/atlanteans',
216+ 'ships', 'lua_tribes_units'),
217+ ('data/tribes/wares/armor',
218+ 'wares', 'lua_tribes_units'),
219 )
220
221

Subscribers

People subscribed via source and target branches

to status/vote changes: