Make programs orthogonal

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

Bug Description

At the moment, our MapObject program syntax is not orthogonal. For example, we have:

    "animate=idle 500000",

    "animation planting 4000",

So, the programs should be refactored like this:

1. Program names are verbs, so "animation" needs to be replaced by "animate". Update the documentation.

2. Program names are separated from their parameters by =, so together with 1, "animation planting 4000" will become "animate=planting 4000". Update the documentation.

3. We have multiple parser implementations for programs. Create a common object MapObjectProgram. There could also be a separate object MapObjectProgramParser if that fits, or MapObjectProgram could parse itself.

4. Programs shared by multiple MapObject types like e.g. "animate" are parsed by MapObjectProgram and run by MapObject.

Related branches

GunChleoc (gunchleoc)
Changed in widelands:
assignee: nobody → GunChleoc (gunchleoc)
status: Confirmed → In Progress
GunChleoc (gunchleoc)
Changed in widelands:
milestone: none → build20-rc1
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.