Building help: clean up name, descname

Bug #1341082 reported by GunChleoc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Undecided
Unassigned

Bug Description

This bug will need attention after https://code.launchpad.net/~widelands-dev/widelands/bug-1074353 has been merged.

Comment from SirVer:

- Some of the wrapped lua objects (building, workers) have methods that are now on the description (like name, descname). They must be removed and the descr() methods used instead. This should also be done before b19, because then we have to guarantee some form of backwards compatibility again.

Tags: lua

Related branches

GunChleoc (gunchleoc)
Changed in widelands:
assignee: nobody → GunChleoc (gunchleoc)
tags: added: lua
Changed in widelands:
status: New → Triaged
milestone: none → build19-rc1
Revision history for this message
GunChleoc (gunchleoc) wrote :

Looking at worker.h, we have quite a bunch of those:

 const Image* icon() const {return descr().icon();}
 Ware_Index becomes() const {return descr().becomes();}
 Ware_Index worker_index() const {return descr().worker_index();}
 const Tribe_Descr & tribe() const {return descr().tribe();}
 const std::string & descname() const {return descr().descname();}

and more.

Do you want them all gone?

GunChleoc (gunchleoc)
Changed in widelands:
status: Triaged → In Progress
Revision history for this message
SirVer (sirver) wrote :

Yes, I think removing the forwarding methods will make the interface of worker clearer.

Revision history for this message
SirVer (sirver) wrote :

Do one at a time (per merge request though) to keep changes smaller and closer to trunk.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Will do :)

Revision history for this message
GunChleoc (gunchleoc) wrote :

I will do one MapObject type at a time; these are local properties, so there's not need to have a separate branch for each property. name/descname and the type name in the other bug are the big ones.

Revision history for this message
GunChleoc (gunchleoc) wrote :

OK, all done in 4 branches, plus the name/descname in the buildhelp branch.

GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
GunChleoc (gunchleoc)
Changed in widelands:
assignee: GunChleoc (gunchleoc) → nobody
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.