Post one_tribe cleanup

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

Bug Description

I am collecting a to-do list here for changes that we should do after one tribe has been merged. We might eventually split this up into several bugs. I will keep editing this entry

1. (Fix Committed) Expose something like ScopedTimer to the Lua interface, so we can add this to loading messages in Lua for both the world and the tribes.

2. (Fix Committed) Shift NumberGlob algorithm in Animations from C++ to Lua.

SirVer: But I just grepped the source code and realized that we never use the regular expression ability of list_directory anywhere except tests. How about changing it to do the work of NumGlob? I mean renaming it to path.list_files(pattern) (or something better). All "?" in pattern is replaced through numbers and we return a lua table with the filenames. We then guarantee that those files exist and we can already in the Lua dictionaries check that we have indeed pictures, i.e. that the config is sane. Right now, we only do it at load time

3. (Fix Committed) Since the website won't be able to parse the init.lua files, we need better help for wares in the Encyclopedia

4. (Fix Committed) All index data types used in DescriptionMaintainer (WareIndex, BuildingIndex, TerrainIndex, ResourceIndex, int) should all be of the same type (call it "DescriptionIndex").

5. (Fix Committed) We should think about refactoring the directory structure in Logic. Something along the lines of:

src/logic/map_objects: Contains the superclasses for world and tribes (MapObject, Immovable, Bob etc.)
src/logic/map_objects/tribes: Classes used in tribes only (Worker, Building etc.)
src/logic/map_objects/world: Classes used in the world only (Critter etc.)

6. (Being handled in https://bugs.launchpad.net/widelands/+bug/1512093) Add rst documentation to the Lua functions. It would be great to also have a reference for the init.lua files, e.g. how to define a new production site. We need to discuss where to put this, so the documentation will be close to the code - I think MapObjectDescr and its subclasses would be best, and Animation for the animations format.

7. (Fix Committed) Check if militarysites need to be productionsites, or if the inheritance can be shifted directly to Building. e.g. "outputs" is weird.

8. (Fix Committed) Turn static functions in Tribes into stand-alone functions.

Tags: cleanups

Related branches

GunChleoc (gunchleoc)
description: updated
GunChleoc (gunchleoc)
description: updated
GunChleoc (gunchleoc)
description: updated
GunChleoc (gunchleoc)
description: updated
GunChleoc (gunchleoc)
Changed in widelands:
milestone: none → build19-rc1
assignee: nobody → GunChleoc (gunchleoc)
status: New → In Progress
GunChleoc (gunchleoc)
description: updated
GunChleoc (gunchleoc)
description: updated
GunChleoc (gunchleoc)
description: updated
GunChleoc (gunchleoc)
description: updated
description: updated
GunChleoc (gunchleoc)
description: updated
GunChleoc (gunchleoc)
description: updated
GunChleoc (gunchleoc)
description: updated
Revision history for this message
kaputtnik (franku) wrote :
GunChleoc (gunchleoc)
description: updated
GunChleoc (gunchleoc)
description: updated
description: updated
description: updated
GunChleoc (gunchleoc)
Changed in widelands:
milestone: build19-rc1 → none
GunChleoc (gunchleoc)
Changed in widelands:
milestone: none → build20-rc1
GunChleoc (gunchleoc)
description: updated
GunChleoc (gunchleoc)
description: updated
description: updated
GunChleoc (gunchleoc)
description: updated
Changed in widelands:
status: In Progress → Fix Committed
assignee: GunChleoc (gunchleoc) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
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.