Building help: clean up name, descname
Bug #1341082 reported by
GunChleoc
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:/
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.
Related branches
lp:~widelands-dev/widelands/mapobject_cleanup_worker
- SirVer: Approve
-
Diff: 211 lines (+21/-26)8 files modifiedsrc/economy/idleworkersupply.cc (+1/-1)
src/economy/portdock.cc (+1/-1)
src/logic/productionsite.cc (+3/-3)
src/logic/ship.cc (+1/-1)
src/logic/soldier.cc (+3/-3)
src/logic/worker.cc (+8/-8)
src/logic/worker.h (+0/-5)
src/wui/productionsitewindow.cc (+4/-4)
lp:~widelands-dev/widelands/mapobject_cleanup_building
- SirVer: Approve
-
Diff: 1037 lines (+112/-124)19 files modifiedsrc/ai/defaultai.cc (+5/-5)
src/logic/building.cc (+5/-5)
src/logic/building.h (+0/-12)
src/logic/constructionsite.cc (+4/-4)
src/logic/dismantlesite.cc (+2/-2)
src/logic/militarysite.cc (+7/-7)
src/logic/partially_finished_building.cc (+1/-1)
src/logic/playercommand.cc (+1/-1)
src/logic/production_program.cc (+2/-2)
src/logic/productionsite.cc (+7/-7)
src/logic/soldier.cc (+1/-1)
src/logic/trainingsite.cc (+1/-1)
src/logic/warehouse.cc (+47/-47)
src/map_io/widelands_map_building_data_packet.cc (+2/-2)
src/map_io/widelands_map_buildingdata_data_packet.cc (+21/-21)
src/wui/actionconfirm.cc (+1/-1)
src/wui/buildingwindow.cc (+3/-3)
src/wui/productionsitewindow.cc (+1/-1)
src/wui/soldierlist.cc (+1/-1)
lp:~widelands-dev/widelands/mapobject_cleanup_misc
- SirVer: Approve
-
Diff: 174 lines (+13/-21)11 files modifiedsrc/economy/fleet.cc (+1/-1)
src/economy/portdock.cc (+2/-2)
src/logic/bob.cc (+4/-4)
src/logic/bob.h (+0/-2)
src/logic/immovable.cc (+1/-1)
src/logic/immovable.h (+0/-4)
src/logic/ship.cc (+1/-1)
src/logic/ship.h (+0/-2)
src/logic/soldier.cc (+1/-1)
src/logic/worker.cc (+2/-2)
src/wui/shipwindow.cc (+1/-1)
lp:~widelands-dev/widelands/mapobject_cleanup_soldier
- SirVer: Approve
-
Diff: 56 lines (+7/-21)2 files modifiedsrc/logic/soldier.h (+0/-14)
src/wui/soldierlist.cc (+7/-7)
lp:~widelands-dev/widelands/bug-1074353
- SirVer: Approve
-
Diff: 10406 lines (+6402/-1471)216 files modifiedcampaigns/atl01.wmf/scripting/init.lua (+2/-2)
campaigns/tutorial01.wmf/scripting/init.lua (+2/-1)
scripting/format_help.lua (+726/-49)
scripting/infrastructure.lua (+17/-0)
src/CMakeLists.txt (+3/-0)
src/ai/defaultai.cc (+5/-5)
src/economy/flag.cc (+0/-5)
src/economy/flag.h (+0/-1)
src/economy/portdock.cc (+0/-6)
src/economy/portdock.h (+0/-1)
src/economy/road.cc (+0/-4)
src/economy/road.h (+0/-1)
src/economy/ware_instance.cc (+2/-2)
src/logic/bob.h (+2/-1)
src/logic/building.cc (+3/-7)
src/logic/building.h (+7/-2)
src/logic/carrier.h (+2/-0)
src/logic/cmd_luacoroutine.cc (+2/-2)
src/logic/constructionsite.cc (+1/-1)
src/logic/constructionsite.h (+1/-0)
src/logic/critter_bob.h (+2/-1)
src/logic/dismantlesite.h (+1/-0)
src/logic/game.cc (+2/-1)
src/logic/immovable.cc (+2/-8)
src/logic/immovable.h (+3/-2)
src/logic/instances.h (+4/-0)
src/logic/militarysite.h (+5/-0)
src/logic/player.cc (+1/-1)
src/logic/productionsite.cc (+1/-1)
src/logic/productionsite.h (+5/-0)
src/logic/ship.h (+6/-1)
src/logic/soldier.h (+2/-2)
src/logic/trainingsite.h (+3/-0)
src/logic/tribe.cc (+3/-6)
src/logic/ware_descr.cc (+1/-1)
src/logic/ware_descr.h (+2/-0)
src/logic/warehouse.cc (+2/-1)
src/logic/warehouse.h (+3/-0)
src/logic/worker.cc (+3/-3)
src/logic/worker_descr.h (+2/-0)
src/map_io/widelands_map_buildingdata_data_packet.cc (+3/-3)
src/scripting/lua_bases.cc (+92/-0)
src/scripting/lua_bases.h (+3/-0)
src/scripting/lua_coroutine.cc (+46/-21)
src/scripting/lua_coroutine.h (+11/-4)
src/scripting/lua_map.cc (+948/-19)
src/scripting/lua_map.h (+310/-1)
src/scripting/luna_impl.h (+1/-0)
src/scripting/scripting.h (+0/-2)
src/ui_basic/CMakeLists.txt (+2/-0)
src/ui_basic/helpwindow.cc (+18/-14)
src/ui_basic/helpwindow.h (+9/-3)
src/wui/buildingwindow.cc (+2/-2)
src/wui/game_debug_ui.cc (+2/-2)
test/maps/lua_persistence.wmf/scripting/test_persistence.lua (+8/-0)
test/maps/lua_testsuite.wmf/scripting/cplayer.lua (+8/-10)
test/maps/lua_testsuite.wmf/scripting/immovables_descriptions.lua (+379/-0)
test/maps/lua_testsuite.wmf/scripting/init.lua (+1/-0)
tribes/atlanteans/armorsmithy/conf (+2/-2)
tribes/atlanteans/armorsmithy/help.lua (+31/-0)
tribes/atlanteans/bakery/help.lua (+32/-0)
tribes/atlanteans/blackroot_farm/help.lua (+31/-0)
tribes/atlanteans/burners_house/help.lua (+31/-0)
tribes/atlanteans/castle/help.lua (+22/-0)
tribes/atlanteans/coalmine/help.lua (+31/-0)
tribes/atlanteans/crystalmine/help.lua (+31/-0)
tribes/atlanteans/dungeon/help.lua (+40/-0)
tribes/atlanteans/farm/help.lua (+31/-0)
tribes/atlanteans/fish_breeders_house/conf (+1/-1)
tribes/atlanteans/fish_breeders_house/help.lua (+31/-0)
tribes/atlanteans/fishers_house/conf (+1/-1)
tribes/atlanteans/fishers_house/help.lua (+32/-0)
tribes/atlanteans/foresters_house/conf (+1/-1)
tribes/atlanteans/foresters_house/help.lua (+32/-0)
tribes/atlanteans/gold-spinning-mill/help.lua (+31/-0)
tribes/atlanteans/goldmine/help.lua (+31/-0)
tribes/atlanteans/guardhall/help.lua (+22/-0)
tribes/atlanteans/guardhouse/help.lua (+22/-0)
tribes/atlanteans/headquarters/help.lua (+22/-0)
tribes/atlanteans/high_tower/help.lua (+22/-0)
tribes/atlanteans/horsefarm/help.lua (+32/-0)
tribes/atlanteans/hunters_house/conf (+1/-1)
tribes/atlanteans/hunters_house/help.lua (+32/-0)
tribes/atlanteans/ironmine/help.lua (+31/-0)
tribes/atlanteans/labyrinth/help.lua (+48/-0)
tribes/atlanteans/mill/help.lua (+32/-0)
tribes/atlanteans/port/help.lua (+29/-0)
tribes/atlanteans/quarry/help.lua (+31/-0)
tribes/atlanteans/sawmill/help.lua (+31/-0)
tribes/atlanteans/scouts_house/help.lua (+31/-0)
tribes/atlanteans/shipyard/help.lua (+31/-0)
tribes/atlanteans/small_tower/help.lua (+22/-0)
tribes/atlanteans/smelting_works/help.lua (+31/-0)
tribes/atlanteans/smokery/help.lua (+31/-0)
tribes/atlanteans/spiderfarm/help.lua (+31/-0)
tribes/atlanteans/toolsmithy/conf (+2/-2)
tribes/atlanteans/toolsmithy/help.lua (+31/-0)
tribes/atlanteans/tower/help.lua (+22/-0)
tribes/atlanteans/warehouse/help.lua (+21/-0)
tribes/atlanteans/weaponsmithy/conf (+2/-2)
tribes/atlanteans/weaponsmithy/help.lua (+31/-0)
tribes/atlanteans/weaving-mill/help.lua (+31/-0)
tribes/atlanteans/well/help.lua (+32/-0)
tribes/atlanteans/woodcutters_house/conf (+1/-1)
tribes/atlanteans/woodcutters_house/help.lua (+31/-0)
tribes/barbarians/axfactory/help.lua (+24/-53)
tribes/barbarians/bakery/help.lua (+22/-44)
tribes/barbarians/barrier/help.lua (+15/-2)
tribes/barbarians/battlearena/help.lua (+29/-44)
tribes/barbarians/big_inn/help.lua (+24/-2)
tribes/barbarians/brewery/help.lua (+24/-2)
tribes/barbarians/burners_house/conf (+2/-2)
tribes/barbarians/burners_house/help.lua (+24/-2)
tribes/barbarians/cattlefarm/help.lua (+22/-36)
tribes/barbarians/citadel/help.lua (+15/-2)
tribes/barbarians/coalmine/help.lua (+23/-46)
tribes/barbarians/deep_coalmine/help.lua (+25/-49)
tribes/barbarians/deep_goldmine/help.lua (+23/-44)
tribes/barbarians/deep_oremine/help.lua (+23/-44)
tribes/barbarians/deeper_coalmine/help.lua (+24/-49)
tribes/barbarians/deeper_goldmine/help.lua (+23/-44)
tribes/barbarians/deeper_oremine/help.lua (+23/-44)
tribes/barbarians/donjon/help.lua (+15/-2)
tribes/barbarians/farm/help.lua (+19/-39)
tribes/barbarians/fishers_hut/conf (+1/-1)
tribes/barbarians/fishers_hut/help.lua (+22/-38)
tribes/barbarians/fortress/help.lua (+15/-2)
tribes/barbarians/gamekeepers_hut/help.lua (+22/-32)
tribes/barbarians/goldmine/help.lua (+22/-41)
tribes/barbarians/granitemine/help.lua (+22/-41)
tribes/barbarians/hardener/help.lua (+24/-2)
tribes/barbarians/headquarters/help.lua (+15/-2)
tribes/barbarians/headquarters_interim/help.lua (+15/-2)
tribes/barbarians/helmsmithy/help.lua (+24/-2)
tribes/barbarians/hunters_hut/conf (+1/-1)
tribes/barbarians/hunters_hut/help.lua (+22/-40)
tribes/barbarians/inn/help.lua (+24/-2)
tribes/barbarians/lime_kiln/conf (+2/-2)
tribes/barbarians/lime_kiln/help.lua (+22/-43)
tribes/barbarians/lumberjacks_hut/help.lua (+21/-37)
tribes/barbarians/metalworks/help.lua (+22/-59)
tribes/barbarians/micro-brewery/help.lua (+21/-42)
tribes/barbarians/oremine/help.lua (+22/-41)
tribes/barbarians/port/help.lua (+22/-2)
tribes/barbarians/quarry/conf (+2/-2)
tribes/barbarians/quarry/help.lua (+21/-35)
tribes/barbarians/rangers_hut/conf (+2/-2)
tribes/barbarians/rangers_hut/help.lua (+23/-32)
tribes/barbarians/reed_yard/help.lua (+22/-36)
tribes/barbarians/scouts_hut/help.lua (+24/-2)
tribes/barbarians/sentry/help.lua (+15/-2)
tribes/barbarians/shipyard/help.lua (+25/-2)
tribes/barbarians/smelting_works/help.lua (+24/-2)
tribes/barbarians/tavern/help.lua (+24/-2)
tribes/barbarians/trainingcamp/help.lua (+37/-52)
tribes/barbarians/warehouse/help.lua (+14/-2)
tribes/barbarians/warmill/help.lua (+24/-55)
tribes/barbarians/weaving-mill/conf (+3/-3)
tribes/barbarians/weaving-mill/help.lua (+24/-2)
tribes/barbarians/well/help.lua (+22/-37)
tribes/empire/arena/help.lua (+39/-0)
tribes/empire/armorsmithy/help.lua (+31/-0)
tribes/empire/bakery/help.lua (+32/-0)
tribes/empire/barracks/help.lua (+22/-0)
tribes/empire/barrier/help.lua (+26/-0)
tribes/empire/brewery/help.lua (+31/-0)
tribes/empire/burners_house/conf (+2/-2)
tribes/empire/burners_house/help.lua (+31/-0)
tribes/empire/castle/help.lua (+22/-0)
tribes/empire/coalmine/help.lua (+32/-0)
tribes/empire/colosseum/help.lua (+39/-0)
tribes/empire/deep_coalmine/help.lua (+32/-0)
tribes/empire/deep_goldmine/help.lua (+31/-0)
tribes/empire/deep_marblemine/help.lua (+31/-0)
tribes/empire/deep_oremine/help.lua (+31/-0)
tribes/empire/donkeyfarm/help.lua (+32/-0)
tribes/empire/farm/help.lua (+31/-0)
tribes/empire/fishers_house/conf (+1/-1)
tribes/empire/fishers_house/help.lua (+32/-0)
tribes/empire/foresters_house/help.lua (+32/-0)
tribes/empire/fortress/help.lua (+22/-0)
tribes/empire/goldmine/help.lua (+32/-0)
tribes/empire/headquarters/help.lua (+22/-0)
tribes/empire/headquarters_shipwreck/help.lua (+22/-0)
tribes/empire/hunters_house/conf (+1/-1)
tribes/empire/hunters_house/help.lua (+32/-0)
tribes/empire/inn/help.lua (+31/-0)
tribes/empire/lumberjacks_house/conf (+1/-1)
tribes/empire/lumberjacks_house/help.lua (+31/-0)
tribes/empire/marblemine/help.lua (+31/-0)
tribes/empire/mill/help.lua (+32/-0)
tribes/empire/oremine/help.lua (+32/-0)
tribes/empire/outpost/help.lua (+22/-0)
tribes/empire/piggery/help.lua (+31/-0)
tribes/empire/port/help.lua (+29/-0)
tribes/empire/quarry/help.lua (+31/-0)
tribes/empire/sawmill/help.lua (+31/-0)
tribes/empire/scouts_house/help.lua (+31/-0)
tribes/empire/sentry/help.lua (+25/-0)
tribes/empire/sheepfarm/help.lua (+31/-0)
tribes/empire/shipyard/help.lua (+32/-0)
tribes/empire/smelting_works/help.lua (+31/-0)
tribes/empire/stonemasons_house/conf (+2/-2)
tribes/empire/stonemasons_house/help.lua (+31/-0)
tribes/empire/tavern/help.lua (+31/-0)
tribes/empire/toolsmithy/conf (+2/-2)
tribes/empire/toolsmithy/help.lua (+31/-0)
tribes/empire/tower/help.lua (+22/-0)
tribes/empire/trainingcamp/help.lua (+46/-0)
tribes/empire/vineyard/help.lua (+31/-0)
tribes/empire/warehouse/help.lua (+21/-0)
tribes/empire/weaponsmithy/help.lua (+31/-0)
tribes/empire/weaving-mill/help.lua (+31/-0)
tribes/empire/well/help.lua (+32/-0)
tribes/empire/winery/conf (+2/-2)
tribes/empire/winery/help.lua (+31/-0)
lp:~gunchleoc/widelands/mapobject_cleanup
- SirVer: Approve
-
Diff: 274 lines (+17/-53)12 files modifiedsrc/logic/building.cc (+0/-11)
src/logic/building.h (+0/-1)
src/logic/constructionsite.cc (+3/-3)
src/logic/dismantlesite.cc (+1/-1)
src/logic/partially_finished_building.cc (+0/-13)
src/logic/partially_finished_building.h (+0/-1)
src/logic/player.cc (+1/-1)
src/logic/soldier.cc (+5/-5)
src/logic/worker.cc (+3/-3)
src/logic/worker.h (+1/-11)
src/wui/buildingwindow.cc (+1/-1)
src/wui/productionsitewindow.cc (+2/-2)
Changed in widelands: | |
assignee: | nobody → GunChleoc (gunchleoc) |
tags: | added: lua |
Changed in widelands: | |
status: | New → Triaged |
milestone: | none → build19-rc1 |
Changed in widelands: | |
status: | Triaged → In Progress |
Changed in widelands: | |
status: | In Progress → Fix Committed |
Changed in widelands: | |
assignee: | GunChleoc (gunchleoc) → nobody |
Changed in widelands: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Looking at worker.h, we have quite a bunch of those:
const Image* icon() const {return descr().icon();} .worker_ index() ;} .descname( );}
Ware_Index becomes() const {return descr().becomes();}
Ware_Index worker_index() const {return descr()
const Tribe_Descr & tribe() const {return descr().tribe();}
const std::string & descname() const {return descr()
and more.
Do you want them all gone?