Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/use_image_cache into lp:widelands

2016-01-14 Thread kaputtnik
Runs fine, the time to create the atlas and loading images is very short on my 
old AMD CPU. Tested editor and a save game. File sizes:

ls -lh
insgesamt 2,4M
-rw-r--r-- 1 kaputtnik users  79K 14. Jan 16:36 texture_atlas.lua
-rw-r--r-- 1 kaputtnik users 2,3M 14. Jan 16:36 texture_atlas_00.png

CPU usage after loading a 5hrs save game:
This branch: ~32%
Current trunk: ~54%

-- 
https://code.launchpad.net/~widelands-dev/widelands/use_image_cache/+merge/282106
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/full_texture_atlas.

___
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] Bunnybot says...

2016-01-14 Thread bunnybot
Bunnybot encountered an error while working on this merge proposal:


-- 
https://code.launchpad.net/~hjd/widelands/tests-poc/+merge/250533
Your team Widelands Developers is requested to review the proposed merge of 
lp:~hjd/widelands/tests-poc into lp:~widelands-dev/widelands/debian.

___
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] Bunnybot says...

2016-01-14 Thread bunnybot
Travis build 124 has changed state to: failed. Details: 
https://travis-ci.org/widelands/widelands/builds/99784765.
-- 
https://code.launchpad.net/~hjd/widelands/tests-poc/+merge/250533
Your team Widelands Developers is requested to review the proposed merge of 
lp:~hjd/widelands/tests-poc into lp:~widelands-dev/widelands/debian.

___
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] Bunnybot says...

2016-01-14 Thread bunnybot
Travis build 267 has changed state to: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/102491117.
-- 
https://code.launchpad.net/~widelands-dev/widelands/fix_resource_overlay/+merge/282680
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/fix_resource_overlay 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/fix_resource_overlay into lp:widelands

2016-01-14 Thread SirVer
The proposal to merge lp:~widelands-dev/widelands/fix_resource_overlay into 
lp:widelands has been updated.

Commit Message changed to:

- Make mutating of field resources only possible through the map, no longer 
through the field interface. This allows the Map to decide if and which 
notifications it needs to send.
- Editor's resource overlays are completely handled in the EditorInteractive 
class which listens for change notifications from the map.

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/fix_resource_overlay/+merge/282680
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/fix_resource_overlay 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] Bunnybot says...

2016-01-14 Thread bunnybot
Hi, I am bunnybot (https://github.com/widelands/bunnybot).

I am keeping the source branch lp:~widelands-dev/widelands/fix_resource_overlay 
mirrored to 
https://github.com/widelands/widelands/tree/_widelands_dev_widelands_fix_resource_overlay

You can give me commands by starting a line with @bunnybot . I 
understand: 
 merge: Merges the source branch into the target branch, closing the merge 
proposal. I will use the proposed commit message if it is set.
-- 
https://code.launchpad.net/~widelands-dev/widelands/fix_resource_overlay/+merge/282680
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/fix_resource_overlay 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] Bunnybot says...

2016-01-14 Thread bunnybot
Travis build 266 has changed state to: failed. Details: 
https://travis-ci.org/widelands/widelands/builds/102467073.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1533183/+merge/282657
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1533183 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-website/iso_date_image_options into lp:widelands-website

2016-01-14 Thread kaputtnik
kaputtnik has proposed merging 
lp:~widelands-dev/widelands-website/iso_date_image_options into 
lp:widelands-website.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #338332 in Widelands Website: "Wiki Image display could need more options"
  https://bugs.launchpad.net/widelands-website/+bug/338332
  Bug #1285660 in Widelands Website: "forum calendar date should be standard 
(ISO 8601)"
  https://bugs.launchpad.net/widelands-website/+bug/1285660

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands-website/iso_date_image_options/+merge/282653

Changing date to ISO 8601 (-MM-DD) for not logged in users. For logged in 
users the settings are used which they set through user settings. New users 
will become the ISO 8601 format until they change the setting in their user 
profile.

Images in wiki could now be left/right/center aligned. The "Code to include" 
(shown under each image when editing an article) shows the new options for easy 
copy and paste. The new options appear only if the image has a width lower 700 
pixel.

A width could also be applied if the code is edited by hand. F.e.

![waterfall_1.gif](/wlmedia/wlimages/WaterFall_1.gif){: .right width="50"}

where "50" is the width in pixel. Values in percent wouldn't work because 
percentages rely on the width of the element which contain the image. Images 
are placed in a -Element which have the whole width of the article 
content. So using "50%" means half the size of the P-Element. So small images 
would be enlarged instead of scaled down.

Examples screenshots for aligning could be found in the forum post: 
https://wl.widelands.org/forum/topic/1906/?page=1#post-16125
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands-website/iso_date_image_options into 
lp:widelands-website.
=== modified file 'media/css/wiki.css'
--- media/css/wiki.css	2015-09-16 20:21:15 +
+++ media/css/wiki.css	2016-01-14 19:36:43 +
@@ -118,3 +118,22 @@
 border: 1px solid #000;
 padding: 0px 5px;
 }
+
+/*/
+/* Image positioning */
+/*/
+
+img.right {
+	float: right;
+	padding-left: 1em;
+}
+
+img.left {
+	float: left;
+	padding-right: 1em;
+}
+
+img.center {
+	display: block;
+	margin: auto;
+}

=== modified file 'settings.py'
--- settings.py	2016-01-12 08:05:17 +
+++ settings.py	2016-01-14 19:36:43 +
@@ -113,7 +113,7 @@
 ##
 AUTH_PROFILE_MODULE = 'wlprofile.Profile'
 DEFAULT_TIME_ZONE = 3
-DEFAULT_TIME_DISPLAY = r"%ND(m-d-y), H:i"
+DEFAULT_TIME_DISPLAY = r"%ND(Y-m-d,) H:i" #According to ISO 8601
 DEFAULT_MARKUP ="markdown"
 SIGNATURE_MAX_LENGTH = 255
 SIGNATURE_MAX_LINES = 8

=== modified file 'templates/wiki/edit.html'
--- templates/wiki/edit.html	2015-04-01 20:01:41 +
+++ templates/wiki/edit.html	2016-01-14 19:36:43 +
@@ -117,14 +117,24 @@
 
 			
 			
-Code to use in article:
+Code to use in article:
+{# Show only one code snippet if the image is greater than 700px #}
 {% if img.image.width > 700 %}
-	[![{{img.name}}]({{ img.url }})]({{ img.url }})
+[![{{img.name}}]({{ img.url }})]({{ img.url }})
+
+{# otherwise give all options #}
 {% else %}
 	![{{img.name}}]({{ img.url }})
+			
+
+	Right aligned:
+	![{{img.name}}]({{ img.url }}){: .right}
+
+
+	Left aligned:
+	![{{img.name}}]({{ img.url }}){: .left}
+
 {% endif %}
-			
-		
 		
 		
 		{% endfor %}

=== modified file 'wlprofile/templatetags/custom_date.py'
--- wlprofile/templatetags/custom_date.py	2012-04-22 12:51:33 +
+++ wlprofile/templatetags/custom_date.py	2016-01-14 19:36:43 +
@@ -102,11 +102,11 @@
 delta = ddate(date.year,date.month,date.day) - \
 ddate(now.year,now.month,now.day)
 if delta.days == 0:
-return _(ur'\t\o\d\a\y')
+return _(ur'\T\o\d\a\y')
 elif delta.days == 1:
-return _(ur'\t\o\m\o\r\r\o\w')
+return _(ur'\T\o\m\o\r\r\o\w')
 elif delta.days == -1:
-return _(ur'\y\e\s\t\e\r\d\a\y')
+return _(ur'\Y\e\s\t\e\r\d\a\y')
 else:
 return g.group(1)
 try:

___
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] Bunnybot says...

2016-01-14 Thread bunnybot
Hi, I am bunnybot (https://github.com/widelands/bunnybot).

I am keeping the source branch lp:~widelands-dev/widelands/bug-1533183 mirrored 
to 
https://github.com/widelands/widelands/tree/_widelands_dev_widelands_bug_1533183

You can give me commands by starting a line with @bunnybot . I 
understand: 
 merge: Merges the source branch into the target branch, closing the merge 
proposal. I will use the proposed commit message if it is set.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1533183/+merge/282657
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1533183 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/use_image_cache into lp:widelands

2016-01-14 Thread SirVer
I changed the code back to load an image from disk if it was not already 
loaded. That is the current behavior in trunk too. I just added logging to get 
a feeling how often that actually happens. I'll remove it before merging. 

nicolai, if you undo the last commit you have the originial behavior that 
creates a huge atlas if it can. I'll rework this branch to no longer cache the 
texture atlas and instead just regenerate the one with the most common images 
every time the game launches. We might revisit packing everything into an atlas 
once we go back to bug 1121982.
-- 
https://code.launchpad.net/~widelands-dev/widelands/use_image_cache/+merge/282106
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/full_texture_atlas.

___
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/use_image_cache into lp:widelands

2016-01-14 Thread TiborB
So it will not built it at once on start, but instead it will expand it on the 
fly as new images are needed during the game? Correct?
-- 
https://code.launchpad.net/~widelands-dev/widelands/use_image_cache/+merge/282106
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/full_texture_atlas.

___
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/bug-1533183 into lp:widelands

2016-01-14 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/bug-1533183 into lp:widelands 
has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1533183/+merge/282657
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1533183 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] Bunnybot says...

2016-01-14 Thread bunnybot
Travis build 266 has changed state to: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/102467073.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1533183/+merge/282657
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1533183 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/bug-1533183 into lp:widelands

2016-01-14 Thread SirVer
travis build was actually fine, just some flakyness with downloading debian 
packages.

code lgtm.

@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1533183/+merge/282657
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1533183 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/use_image_cache into lp:widelands

2016-01-14 Thread SirVer
no. sorry, that explanation was confusing.

It will immediately on start build a small one (~1024x1200 pixels) that 
contains frequently used images like the UI elements, buildhelp & the roads and 
world textures. Every other image will be loaded as needed from disk and put 
into a separate texture each, i.e. no texture atlas. 
-- 
https://code.launchpad.net/~widelands-dev/widelands/use_image_cache/+merge/282106
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/full_texture_atlas.

___
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/use_image_cache into lp:widelands

2016-01-14 Thread TiborB
Well, it compiled, building of that cache was fast, BUT I see a lot of output 
like this in console:

Image with hash tribes/workers/barbarians/lumberjack/walk_ne_08_pc.png not 
found. Loading from disk.
Image with hash tribes/workers/barbarians/lumberjack/walk_ne_09_pc.png not 
found. Loading from disk.

???
-- 
https://code.launchpad.net/~widelands-dev/widelands/use_image_cache/+merge/282106
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/full_texture_atlas.

___
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/bug-1533183 into lp:widelands

2016-01-14 Thread TiborB
TiborB has proposed merging lp:~widelands-dev/widelands/bug-1533183 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1533183 in widelands: "kNoResource crashes game when querying DBG info 
on empty field"
  https://bugs.launchpad.net/widelands/+bug/1533183

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1533183/+merge/282657

DBG window now prints "Resources: None" - if current resource is kNoResource
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1533183 into lp:widelands.
=== modified file 'src/wui/game_debug_ui.cc'
--- src/wui/game_debug_ui.cc	2015-11-29 09:43:15 +
+++ src/wui/game_debug_ui.cc	2016-01-14 20:07:54 +
@@ -358,14 +358,19 @@
 		}
 	}
 	{
-		Widelands::DescriptionIndex ridx = m_coords.field->get_resources();
-		int ramount = m_coords.field->get_resources_amount();
-		int initial_amount = m_coords.field->get_initial_res_amount();
-
-		str += (boost::format("Resource: %s\n")
-  % ibase().egbase().world().get_resource(ridx)->name().c_str()).str();
-
-		str += (boost::format("  Amount: %i/%i\n") % ramount % initial_amount).str();
+		const Widelands::DescriptionIndex ridx = m_coords.field->get_resources();
+
+		if (ridx == Widelands::kNoResource) {
+			str += "Resource: None\n";
+		} else {
+			const int ramount = m_coords.field->get_resources_amount();
+			const int initial_amount = m_coords.field->get_initial_res_amount();
+
+			str += (boost::format("Resource: %s\n")
+	  % ibase().egbase().world().get_resource(ridx)->name().c_str()).str();
+
+			str += (boost::format("  Amount: %i/%i\n") % ramount % initial_amount).str();
+		}
 	}
 
 	m_ui_field.set_text(str.c_str());

___
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/fix_resource_overlay into lp:widelands

2016-01-14 Thread SirVer
SirVer has proposed merging lp:~widelands-dev/widelands/fix_resource_overlay 
into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #977980 in widelands: "Fish and mountain ressources cannot be removed 
when they are on grass"
  https://bugs.launchpad.net/widelands/+bug/977980

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/fix_resource_overlay/+merge/282680

Fixes bug 977980 - display of overlays. 

I decided on a slightly more involve fix that added some symmetry between 
resources and terrains to the code and decoupled UI from logic through the use 
of notifications. 
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/fix_resource_overlay into lp:widelands.
=== modified file 'src/editor/editorinteractive.cc'
--- src/editor/editorinteractive.cc	2016-01-10 11:36:05 +
+++ src/editor/editorinteractive.cc	2016-01-14 22:10:38 +
@@ -62,6 +62,27 @@
 	egbase->tribes();
 }
 
+// Updates the resources overlays after a field has changed.
+void update_resource_overlay(const Widelands::NoteFieldResourceChanged& note,
+ const Widelands::World& world,
+ FieldOverlayManager* field_overlay_manager) {
+	//  Ok, we're doing something. First remove the current overlays.
+	if (note.old_resource != Widelands::kNoResource) {
+		const std::string str =
+		   world.get_resource(note.old_resource)->get_editor_pic(note.old_amount);
+		const Image* pic = g_gr->images().get(str);
+		field_overlay_manager->remove_overlay(note.fc, pic);
+	}
+
+	const auto amount = note.fc.field->get_resources_amount();
+	if (amount > 0) {
+		const std::string str =
+		   world.get_resource(note.fc.field->get_resources())->get_editor_pic(amount);
+		const Image* pic = g_gr->images().get(str);
+		field_overlay_manager->register_overlay(note.fc, pic, 0);
+	}
+}
+
 }  // namespace
 
 EditorInteractive::EditorInteractive(Widelands::EditorGameBase & e) :
@@ -134,6 +155,13 @@
 #endif
 
 	fieldclicked.connect(boost::bind(::map_clicked, this, false));
+
+	// Subscribe to changes of the resource type on a field..
+	field_resource_changed_subscriber_ =
+	   Notifications::subscribe(
+	  [this](const Widelands::NoteFieldResourceChanged& note) {
+		  update_resource_overlay(note, egbase().world(), mutable_field_overlay_manager());
+		   });
 }
 
 void EditorInteractive::register_overlays() {

=== modified file 'src/editor/editorinteractive.h'
--- src/editor/editorinteractive.h	2016-01-07 12:47:17 +
+++ src/editor/editorinteractive.h	2016-01-14 22:10:38 +
@@ -20,6 +20,8 @@
 #ifndef WL_EDITOR_EDITORINTERACTIVE_H
 #define WL_EDITOR_EDITORINTERACTIVE_H
 
+#include 
+
 #include "editor/tools/editor_history.h"
 #include "editor/tools/editor_increase_height_tool.h"
 #include "editor/tools/editor_increase_resources_tool.h"
@@ -32,6 +34,8 @@
 #include "editor/tools/editor_set_port_space_tool.h"
 #include "editor/tools/editor_set_starting_pos_tool.h"
 #include "editor/tools/editor_set_terrain_tool.h"
+#include "logic/map.h"
+#include "notifications/notifications.h"
 #include "ui_basic/button.h"
 #include "ui_basic/unique_window.h"
 #include "wui/interactive_base.h"
@@ -140,6 +144,8 @@
 
 	EditorHistory m_history;
 
+	std::unique_ptr
+	   field_resource_changed_subscriber_;
 	UI::UniqueWindow::Registry m_toolmenu;
 
 	UI::UniqueWindow::Registry m_toolsizemenu;

=== modified file 'src/editor/map_generator.cc'
--- src/editor/map_generator.cc	2016-01-06 19:11:20 +
+++ src/editor/map_generator.cc	2016-01-14 22:10:38 +
@@ -134,8 +134,7 @@
 		res_val *= static_cast(map_info_.resource_amount) + 1;
 		res_val /= 3;
 		if (map_.is_resource_valid(world, fc, res_idx)) {
-			fc.field->set_resources(res_idx, res_val);
-			fc.field->set_initial_res_amount(res_val);
+			map_.initialize_resources(fc, res_idx, res_val);
 		}
 	};
 

=== modified file 'src/editor/tools/editor_decrease_resources_tool.cc'
--- src/editor/tools/editor_decrease_resources_tool.cc	2016-01-10 11:36:05 +
+++ src/editor/tools/editor_decrease_resources_tool.cc	2016-01-14 22:10:38 +
@@ -36,7 +36,7 @@
 */
 int32_t EditorDecreaseResourcesTool::handle_click_impl(const Widelands::World& world,
Widelands::NodeAndTriangle<> const center,
-   EditorInteractive& parent,
+   EditorInteractive& /* parent */,
EditorActionArgs* args,
Widelands::Map* map) {
 	Widelands::MapRegion mr
@@ -54,8 +54,7 @@
 			map->is_resource_valid(world, mr.location(), args->cur_res)) {
 			args->orgResT.push_back(mr.location().field->get_resources());