widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #00704
[Merge] lp:~alocritani/widelands/resource_info_in_editor into lp:widelands
Angelo Locritani has proposed merging lp:~alocritani/widelands/resource_info_in_editor into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
For more details, see:
https://code.launchpad.net/~alocritani/widelands/resource_info_in_editor/+merge/98110
Added to info tool information regarding resource name and amount
--
https://code.launchpad.net/~alocritani/widelands/resource_info_in_editor/+merge/98110
Your team Widelands Developers is requested to review the proposed merge of lp:~alocritani/widelands/resource_info_in_editor into lp:widelands.
=== modified file 'src/editor/tools/editor_info_tool.cc'
--- src/editor/tools/editor_info_tool.cc 2012-02-21 13:52:14 +0000
+++ src/editor/tools/editor_info_tool.cc 2012-03-18 20:34:23 +0000
@@ -89,6 +89,28 @@
buf += buf1;
}
+ buf += _("3) Resources Info\n");
+ {
+ Widelands::Resource_Index ridx = f.get_resources();
+ int ramount = f.get_resources_amount();
+
+ if (ramount > 0){
+ snprintf
+ (buf1, sizeof(buf1), _("Resource name: %s\n"), world.get_resource(ridx)->name().c_str());
+ }
+ else
+ {
+ snprintf
+ (buf1, sizeof(buf1), _("Resource name: %s\n"), _("<none>"));
+ }
+
+ buf += buf1;
+
+ snprintf
+ (buf1, sizeof(buf1), _("Resource amount: %i\n"), ramount);
+ buf += buf1;
+ }
+
buf += _("4) Map Info\n Name: ");
buf += map.get_name();
snprintf
Follow ups