[Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/doc_type_name into lp:widelands has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
Thanks for finishing this up :) @bunnybot merge -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
Ups, sorry for this. :( -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
This is a test, please ignore. -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
Done. I think this is ready to go now? -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
I think that's a good idea and I agree with the phrasing. I won't get to it before the weekend, would you like to take care of it? "You cannot instantiate this directly, access it via wl.Game().map.get_field() instead." -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
Continuous integration builds have changed state: Travis build 2499. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/259871581. Appveyor build 2323. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_doc_type_name-2323. -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
Nice :-) I did some additional syntax fixes for wl.map.Warehouse. There is one issue left from my side: I the Fields section one could read: "You cannot instantiate this class directly, instead use wl.map.Map.get_field()." See: https://wl.widelands.org/docs/wl/autogen_wl_map/#field The link points to wl.map.Map.get_field(), and only after scrolling up to the description of wl.map.Map one could read: "You cannot instantiate this directly, instead access it via wl.Game.map.". See: https://wl.widelands.org/docs/wl/autogen_wl_map/#map This too complicated and not understandable, additionally the last sentence is imho wrong. Shouldn't it be "... via wl.Game().map." (additional brackets)? Anyway, since we are working here on wl.map, i would suggest to turn the sentence in wl.map.Field into something like: "You cannot instantiate this directly, instead access it via wl.Game().map.get_field()", or show a code example? -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
Thanks for digging that one up! All linked now :) I think we still have too much asymmetry between objects and their descr, but that can't be helped without exposing the rest to the Lua interface, which I'd say is out of scope for this branch. -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
I get it to work, see http://ibb.co/ecziaQ If you are fine with my wording i will change the other occurrences according to this example. To get this working i just used another "role" called :any:. This searches for all parts wich has a clickable header in the documents. One could use parts of the link shown in the tooltip of the header (the address of the link). One has to pay attention that the used part is unique over all documents, otherwise an error occur. I used now the ResT-code: You can access further properties via :any:`MapObject.descr` to access the attributes of :class:`ImmovableDescription`. All ResT code which is like: .. FooBar:: are turned into clickable links, so they can be used for linking. -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
Continuous integration builds have changed state: Travis build 2490. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/259384065. Appveyor build 2314. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_doc_type_name-2314. -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
I spent an hour RTFM and it looks like we can't link to MapObject:descr with Sphinx. I ran out of time, so I'll have to try again some other time. If somebody else figures this out in the meantime, it won't hurt my feelings :P -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
Continuous integration builds have changed state: Travis build 2488. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/259145374. Appveyor build 2313. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_doc_type_name-2313. -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
This looks much better now :-) One nit: There are now several statements like: "You can access further properties via its descr." The word 'its' let me assume that 'descr' is a property of the linked objects, but there is no such property. Maybe clarify the statement to something like: "You can access further properties via from which you get access to " -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
Review: Resubmit I have made the documentation more detailed now, added a couple of links and documented the type hierarchy by linking. Also fixed the bugs that kaputtnik found. -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
The proposal to merge lp:~widelands-dev/widelands/doc_type_name into lp:widelands has been updated. Commit Message changed to: Fixed and improved documentation for LuaMapObjectDescription::get_type_name. More cross-linking between map object classes and their description objects. Fixed some miscellaneous bugs in the LuaMap documentation. For more details, see: https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 -- Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
That links to how to define a tribe... it would be more useful to have a reference to the properties that can be queried at runtime in https://wl.widelands.org/docs/wl/autogen_wl_map/#module-classes, link to class wl.map.ImmovableDescription etc. -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
> We could link them to the LuaDescription objects, > which already have documentation about he building types etc. Don't know what you mean here :-S E.g. this page: https://wl.widelands.org/docs/wl/autogen_toc_lua_tribes_buildings/ ? Creating a documentation which is useful for beginners is not easy... I am mostly lost in the current documentation. Maybe an image showing some sort of a class hierarchy would be helpful. -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
We could link them to the LuaDescription objects, which already have documentation about he building types etc. No resubmit needed unless you want to send a diff to the mailing list or signal a big change. -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
Continuous integration builds have changed state: Travis build 2476. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/257274323. Appveyor build 2301. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_doc_type_name-2301. -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
For me the whole section raises more questions then answers... It is unclear which string could be used for a query, especially because 'Buildings' and 'Other' are more indented. I guess they are indented because they are Immovables? So a query for 'building' should first ask for 'immovable' and additionally for 'building'? Maybe the list is better if each string of type_name has its own row: - ''bob'': E.g.:? - ''critter'': Excluding second carrier (Horse, Donkey, Oxen) - [..] - ''carrier'': Including second carrier (Horse, Donkey, Oxen) - [..] - ''immovable'': - ''building'': What is the difference to the more specific ones, like 'productiontype'? and so on. Of course this may lead into a long list... Btw, this section is also messed up: https://wl.widelands.org/docs/wl/autogen_wl_map/#bob -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
Sorry for the extra commit, using this Ubuntu on Win is a pian. OTOH I build the shinx Docs now, and found my comment there. Gun: will we need a resubmint? -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
Yes, your comment is correct. We still lack documentation for the world objects, so feel free to add it here. -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
Review: Approve review Since this is no code change there is no sense in compiling this. All fine foe me, ther mor docs the better. If my inline comment abot critter is correct I will iclude it. Diff comments: > > === modified file 'src/scripting/lua_map.cc' > --- src/scripting/lua_map.cc 2017-06-24 08:18:48 + > +++ src/scripting/lua_map.cc 2017-07-25 07:00:49 + > @@ -1616,9 +1616,18 @@ > } > > /* RST > - .. attribute:: type > - > - (RO) the name of the building, e.g. building. > + .. attribute:: type_name > + > + (RO) the map object's type as a string. Possible values are: > + > + * Bobs: ``bob``, ``critter``, ``ship``, ``worker``, ``carrier``, > ``soldier`` > + * Wares: ``ware`` > + * Immovables: ``immovable`` > + > +* Buildings: ``building``, ``constructionsite``, > ``dismantlesite``, ``warehouse``, ``productionsite``, ``militarysite``, > ``trainingsite`` > +* Other: ``flag``, ``road``, ``portdock`` > + 'critter' are the animals on the map (not including Donkye, Horse, Oxen, as they are carriers). If this is corerct I would like to add this (did not know what critters are till now). > + * Other: ``battle``, ``fleet`` > */ > int LuaMapObjectDescription::get_type_name(lua_State* L) { > lua_pushstring(L, to_string(get()->type())); -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/doc_type_name. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
You're right - I don't know when I gan get to it though. -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/doc_type_name into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
Since your on it, the documentation in https://wl.widelands.org/docs/wl/autogen_wl_map/#immovabledescription looks messed up. -- https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/doc_type_name into lp:widelands. ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp
[Widelands-dev] [Merge] lp:~widelands-dev/widelands/doc_type_name into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/doc_type_name into lp:widelands. Commit message: Fixed and improved documentation for LuaMapObjectDescription::get_type_name. Requested reviews: Widelands Developers (widelands-dev) For more details, see: https://code.launchpad.net/~widelands-dev/widelands/doc_type_name/+merge/328006 -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/doc_type_name into lp:widelands. === modified file 'src/logic/map_objects/map_object.cc' --- src/logic/map_objects/map_object.cc 2017-06-25 08:20:25 + +++ src/logic/map_objects/map_object.cc 2017-07-25 07:00:49 + @@ -619,6 +619,7 @@ } std::string to_string(const MapObjectType type) { + // The types are documented in scripting/lua_map.cc -> LuaMapObjectDescription::get_type_name for the Lua interface, so make sure to change the documentation there when changing anything in this function. switch (type) { case MapObjectType::BOB: return "bob"; === modified file 'src/scripting/lua_map.cc' --- src/scripting/lua_map.cc 2017-06-24 08:18:48 + +++ src/scripting/lua_map.cc 2017-07-25 07:00:49 + @@ -1616,9 +1616,18 @@ } /* RST - .. attribute:: type - - (RO) the name of the building, e.g. building. + .. attribute:: type_name + + (RO) the map object's type as a string. Possible values are: + + * Bobs: ``bob``, ``critter``, ``ship``, ``worker``, ``carrier``, ``soldier`` + * Wares: ``ware`` + * Immovables: ``immovable`` + +* Buildings: ``building``, ``constructionsite``, ``dismantlesite``, ``warehouse``, ``productionsite``, ``militarysite``, ``trainingsite`` +* Other: ``flag``, ``road``, ``portdock`` + + * Other: ``battle``, ``fleet`` */ int LuaMapObjectDescription::get_type_name(lua_State* L) { lua_pushstring(L, to_string(get()->type())); ___ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp