widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #09901
[Merge] lp:~widelands-dev/widelands/move_website_binaries into lp:widelands
kaputtnik has proposed merging lp:~widelands-dev/widelands/move_website_binaries into lp:widelands.
Commit message:
Move website related binaries to base dir in compile.sh; fixed some wrong indentation for the documentation in the website.
Requested reviews:
Widelands Developers (widelands-dev)
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/move_website_binaries/+merge/319231
Modified the compile script to move also the website related binaries to the base dir. In conjunction with https://code.launchpad.net/~widelands-dev/widelands-website/widelands_trunk_binaries it should then be possible to use the website related binaries to upload a map in the local website.
Additionally fixed some errors in the documentation caused by using tabs (instead of spaces) for indentation and missing blank lines. E.g. https://wl.widelands.org/docs/wl/autogen_wl_map/#wl.map.ProductionSiteDescription
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/move_website_binaries into lp:widelands.
=== modified file 'compile.sh'
--- compile.sh 2017-02-14 18:11:53 +0000
+++ compile.sh 2017-03-07 16:43:27 +0000
@@ -128,8 +128,16 @@
rm -f ../VERSION || true
rm -f ../widelands || true
+ rm -f ../wl_map_object_info || true
+ rm -f ../wl_map_info || true
+
mv VERSION ../VERSION
mv src/widelands ../widelands
+
+ if [ $BUILD_WEBSITE = "ON" ]; then
+ mv ../build/src/website/wl_map_object_info ../wl_map_object_info
+ mv ../build/src/website/wl_map_info ../wl_map_info
+ fi
return 0
}
=== modified file 'src/scripting/lua_map.cc'
--- src/scripting/lua_map.cc 2017-01-30 14:40:12 +0000
+++ src/scripting/lua_map.cc 2017-03-07 16:43:27 +0000
@@ -1688,9 +1688,9 @@
}
/* RST
- .. attribute:: the name and descname of the editor category of this immovable
+ .. attribute:: the name and descname of the editor category of this immovable
- (RO) a table with "name" and "descname" entries for the editor category, or nil if it has none.
+ (RO) a table with "name" and "descname" entries for the editor category, or nil if it has none.
*/
int LuaImmovableDescription::get_editor_category(lua_State* L) {
const EditorCategory* editor_category = get()->editor_category();
@@ -1709,11 +1709,11 @@
}
/* RST
- .. attribute:: returns the terrain affinity values for this immovable
+ .. attribute:: returns the terrain affinity values for this immovable
- (RO) a table containing numbers labeled as pickiness (double), preferred_fertility (double),
- preferred_humidity (double), and preferred_temperature (uint),
- or nil if the immovable has no terrain affinity.
+ (RO) a table containing numbers labeled as pickiness (double), preferred_fertility (double),
+ preferred_humidity (double), and preferred_temperature (uint),
+ or nil if the immovable has no terrain affinity.
*/
int LuaImmovableDescription::get_terrain_affinity(lua_State* L) {
if (get()->has_terrain_affinity()) {
@@ -2129,6 +2129,7 @@
/* RST
.. attribute:: inputs
+
(RO) An array with :class:`LuaWareDescription` containing the wares that
the productionsite needs for its production.
*/
@@ -2146,6 +2147,7 @@
/* RST
.. attribute:: output_ware_types
+
(RO) An array with :class:`LuaWareDescription` containing the wares that
the productionsite can produce.
*/
@@ -2164,6 +2166,7 @@
/* RST
.. attribute:: output_worker_types
+
(RO) An array with :class:`LuaWorkerDescription` containing the workers that
the productionsite can produce.
*/
@@ -2198,6 +2201,7 @@
/* RST
.. attribute:: working_positions
+
(RO) An array with :class:`WorkerDescription` containing the workers that
can work here with their multiplicity, i.e. for a atlantean mine this
would be { miner, miner, miner }.
@@ -2219,13 +2223,13 @@
}
/* RST
- .. attribute:: consumed_wares_workers
-
- :arg program_name: the name of the production program that we want to get the consumed wares for
- :type tribename: :class:`string`
-
- (RO) Returns a table of {{ware name}, ware amount} for the wares consumed by this production program.
- Multiple entries in {ware name} are alternatives (OR logic)).
+ .. attribute:: consumed_wares_workers
+
+ :arg program_name: the name of the production program that we want to get the consumed wares for
+ :type tribename: :class:`string`
+
+ (RO) Returns a table of {{ware name}, ware amount} for the wares consumed by this production program.
+ Multiple entries in {ware name} are alternatives (OR logic)).
*/
int LuaProductionSiteDescription::consumed_wares_workers(lua_State* L) {
std::string program_name = luaL_checkstring(L, -1);
@@ -2253,12 +2257,12 @@
}
/* RST
- .. attribute:: produced_wares
-
- :arg program_name: the name of the production program that we want to get the produced wares for
- :type tribename: :class:`string`
-
- (RO) Returns a table of {ware name, ware amount} for the wares produced by this production program
+ .. attribute:: produced_wares
+
+ :arg program_name: the name of the production program that we want to get the produced wares for
+ :type tribename: :class:`string`
+
+ (RO) Returns a table of {ware name, ware amount} for the wares produced by this production program
*/
int LuaProductionSiteDescription::produced_wares(lua_State* L) {
std::string program_name = luaL_checkstring(L, -1);
@@ -2271,13 +2275,13 @@
}
/* RST
- .. attribute:: recruited_workers
-
- :arg program_name: the name of the production program that we want to get the recruited workers for
- :type tribename: :class:`string`
-
- (RO) Returns a table of {worker name, worker amount} for the workers recruited
- by this production program
+ .. attribute:: recruited_workers
+
+ :arg program_name: the name of the production program that we want to get the recruited workers for
+ :type tribename: :class:`string`
+
+ (RO) Returns a table of {worker name, worker amount} for the workers recruited
+ by this production program
*/
int LuaProductionSiteDescription::recruited_workers(lua_State* L) {
std::string program_name = luaL_checkstring(L, -1);
@@ -2344,10 +2348,10 @@
.. class:: TrainingSiteDescription
- A static description of a tribe's trainingsite, so it can be used in help files
- without having to access an actual building on the map.
- A training site can train some or all of a soldier's properties (Attack, Defense, Evade and Health).
- See also :class:`ProductionSiteDescription` and :class:`MapObjectDescription` for more properties.
+ A static description of a tribe's trainingsite, so it can be used in help files
+ without having to access an actual building on the map.
+ A training site can train some or all of a soldier's properties (Attack, Defense, Evade and Health).
+ See also :class:`ProductionSiteDescription` and :class:`MapObjectDescription` for more properties.
*/
const char LuaTrainingSiteDescription::className[] = "TrainingSiteDescription";
const MethodType<LuaTrainingSiteDescription> LuaTrainingSiteDescription::Methods[] = {
@@ -2686,6 +2690,7 @@
/* RST
.. attribute:: consumers
+
(RO) An array with :class:`LuaBuildingDescription` with buildings that
need this ware for their production.
*/
@@ -2712,7 +2717,7 @@
}
/* RST
- .. .. method:: is_construction_material
+ .. method:: is_construction_material
:arg tribename: the name of the tribe that this ware gets checked for
:type tribename: :class:`string`
@@ -2734,6 +2739,7 @@
/* RST
.. attribute:: producers
+
(RO) An array with :class:`LuaBuildingDescription` with buildings that
can procude this ware.
*/
@@ -2828,6 +2834,7 @@
/* RST
.. attribute:: employers
+
(RO) An array with :class:`LuaBuildingDescription` with buildings where
this worker can be employed.
*/
@@ -3140,11 +3147,11 @@
*/
/* RST
- .. method:: editor_image(amount)
-
- :arg amount: The amount of the resource what we want an overlay image for
-
- (RO) the :class:`string` path to the image representing the specified amount of this resource
+ .. method:: editor_image(amount)
+
+ :arg amount: The amount of the resource what we want an overlay image for
+
+ (RO) the :class:`string` path to the image representing the specified amount of this resource
*/
int LuaResourceDescription::editor_image(lua_State* L) {
if (lua_gettop(L) != 2) {
@@ -3220,10 +3227,10 @@
}
/* RST
- .. attribute:: get_default_resource
+ .. attribute:: get_default_resource
- (RO) the :class:`wl.map.ResourceDescription` for the default resource provided by this terrain, or
- nil if the terrain has no default resource.
+ (RO) the :class:`wl.map.ResourceDescription` for the default resource provided by this terrain, or
+ nil if the terrain has no default resource.
*/
int LuaTerrainDescription::get_default_resource(lua_State* L) {
@@ -3241,7 +3248,7 @@
/* RST
.. attribute:: default_resource_amount
- (RO) the int amount of the default resource provided by this terrain.
+ (RO) the int amount of the default resource provided by this terrain.
*/
int LuaTerrainDescription::get_default_resource_amount(lua_State* L) {
@@ -3250,9 +3257,9 @@
}
/* RST
- .. attribute:: the name and descname of the editor category of this terrain
+ .. attribute:: the name and descname of the editor category of this terrain
- (RO) a table with "name" and "descname" entries for the editor category, or nil if it has none.
+ (RO) a table with "name" and "descname" entries for the editor category, or nil if it has none.
*/
int LuaTerrainDescription::get_editor_category(lua_State* L) {
const EditorCategory* editor_category = get()->editor_category();
@@ -3315,9 +3322,9 @@
}
/* RST
- .. attribute:: valid_resources
+ .. attribute:: valid_resources
- (RO) a list of :class:`wl.map.ResourceDescription` with all valid resources for this terrain.
+ (RO) a list of :class:`wl.map.ResourceDescription` with all valid resources for this terrain.
*/
int LuaTerrainDescription::get_valid_resources(lua_State* L) {
@@ -3400,8 +3407,7 @@
/* RST
.. attribute:: serial
- (RO)
- The serial number of this object. Note that this value does not stay
+ (RO) The serial number of this object. Note that this value does not stay
constant after saving/loading.
*/
int LuaMapObject::get_serial(lua_State* L) {
@@ -3414,9 +3420,9 @@
to_lua<lua_klass>(L, new lua_klass(static_cast<const klass*>(desc)))
/* RST
- .. attribute:: descr
+ .. attribute:: descr
- (RO) The description object for this immovable, e.g. BuildingDescription.
+ (RO) The description object for this immovable, e.g. BuildingDescription.
*/
int LuaMapObject::get_descr(lua_State* L) {
const MapObjectDescr* desc = &get(L, get_egbase(L))->descr();
Follow ups