← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug-1281823 into lp:widelands

 

TiborB has proposed merging lp:~widelands-dev/widelands/bug-1281823 into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1281823 in widelands: "Setting resources via LUA API broken in Editor"
  https://bugs.launchpad.net/widelands/+bug/1281823

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

The fix is very trivial - one line was added
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1281823 into lp:widelands.
=== modified file 'src/scripting/lua_map.cc'
--- src/scripting/lua_map.cc	2014-10-27 10:14:10 +0000
+++ src/scripting/lua_map.cc	2014-11-25 19:55:23 +0000
@@ -3660,6 +3660,7 @@
 		report_error(L, "Illegal amount: %i, must be >= 0 and <= %i", amount, max_amount);
 
 	field->set_resources(res, amount);
+	field->set_starting_res_amount(amount);
 
 	return 0;
 }


Follow ups