widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #00339
[Merge] lp:~shevonar/widelands/fix-ware-positioning into lp:widelands
Shevonar has proposed merging lp:~shevonar/widelands/fix-ware-positioning into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #837239 in widelands: "Impossible to find suitable wares position for carriers and beast of burdon alike."
https://bugs.launchpad.net/widelands/+bug/837239
For more details, see:
https://code.launchpad.net/~shevonar/widelands/fix-ware-positioning/+merge/75190
Fix vor bug 837239 (https://bugs.launchpad.net/widelands/+bug/837239)
--
https://code.launchpad.net/~shevonar/widelands/fix-ware-positioning/+merge/75190
Your team Widelands Developers is requested to review the proposed merge of lp:~shevonar/widelands/fix-ware-positioning into lp:widelands.
=== modified file 'src/logic/worker.cc'
--- src/logic/worker.cc 2011-02-06 12:11:23 +0000
+++ src/logic/worker.cc 2011-09-13 14:28:21 +0000
@@ -2786,7 +2786,7 @@
if (WareInstance const * const carried_item = get_carried_item(game))
dst.drawanim
- (drawpos - Point(0, 15),
+ (drawpos - descr().get_ware_hotspot(),
carried_item->descr().get_animation("idle"),
0,
get_owner());
=== modified file 'src/logic/worker_descr.cc'
--- src/logic/worker_descr.cc 2010-11-07 12:37:40 +0000
+++ src/logic/worker_descr.cc 2011-09-13 14:28:21 +0000
@@ -45,6 +45,7 @@
:
Bob::Descr(_name, _descname, directory, prof, global_s, &_tribe),
m_helptext(global_s.get_string("help", "")),
+ m_ware_hotspot(global_s.get_Point("ware_hotspot", Point(0, 15))),
m_icon_fname(directory + "/menu.png"),
m_icon(g_gr->get_no_picture()),
m_buildable (false),
=== modified file 'src/logic/worker_descr.h'
--- src/logic/worker_descr.h 2010-11-07 12:37:40 +0000
+++ src/logic/worker_descr.h 2011-09-13 14:28:21 +0000
@@ -70,6 +70,7 @@
const Tribe_Descr * get_tribe() const throw () {return m_owner_tribe;}
const Tribe_Descr & tribe() const throw () {return *m_owner_tribe;}
std::string helptext() const {return m_helptext;}
+ Point get_ware_hotspot() const {return m_ware_hotspot;}
/// How much of the worker type that an economy should store in warehouses.
/// The special value std::numeric_limits<uint32_t>::max() means that the
@@ -121,6 +122,7 @@
#endif
std::string m_helptext; ///< Short (tooltip-like) help text
+ Point m_ware_hotspot;
uint32_t m_default_target_quantity;
std::string const m_icon_fname; ///< Filename of worker's icon
PictureID m_icon; ///< Pointer to icon into picture stack
=== modified file 'tribes/atlanteans/horse/conf'
--- tribes/atlanteans/horse/conf 2010-11-09 14:14:57 +0000
+++ tribes/atlanteans/horse/conf 2011-09-13 14:28:21 +0000
@@ -1,6 +1,6 @@
help=_Horses help to carry items at heavily used roads. They are raised in a horse farm.
-
default_target_quantity=5
+ware_hotspot=-2 12
[idle]
pics=wildhorse_idle_sw_??.png
=== modified file 'tribes/barbarians/ox/conf'
--- tribes/barbarians/ox/conf 2010-11-09 14:14:57 +0000
+++ tribes/barbarians/ox/conf 2011-09-13 14:28:21 +0000
@@ -1,5 +1,6 @@
help=_Helps to carry items at heavily used roads.
default_target_quantity=5
+ware_hotspot=-2 13
[idle]
pics=wisent_idle_se_??.png # TODO: fix naming once we have real oxen animations
=== modified file 'tribes/empire/donkey/conf'
--- tribes/empire/donkey/conf 2010-08-01 14:35:38 +0000
+++ tribes/empire/donkey/conf 2011-09-13 14:28:21 +0000
@@ -1,5 +1,6 @@
help=_Helps to carry items at heavy used roads.
default_target_quantity=5
+ware_hotspot=-2 8
[idle]
pics=donkey_idle_e_??.png
Follow ups