Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2005:
[Freeciv-Dev] Re: using OR in requirements
Home

[Freeciv-Dev] Re: using OR in requirements

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: using OR in requirements
From: Marek "Baczek" Baczyński <imbaczek@xxxxxxxxx>
Date: Fri, 2 Dec 2005 20:24:54 +0100

(sorry for not sending to the list the first time.)

2005/12/2, Per Inge Mathisen <per@xxxxxxxxxxx>:
> I am not sure which is better. Perhaps there are other, better solutions.
> However, some kind of OR solution is greatly desired for advanced
> governments effects, of which there will be a great many to be defined the
> way I have drafted the design currently.

<delurk>
IMVHO what you need is to move effects to the scripting backend. This
way, it'll be possible to make constructs like

AND({"type": "Gov", "name": "Name1", "range": "Player"}, {...},
OR({...}, {...}))

(Above syntax is what would be possible to code directly in Python.
Please forgive my Lua ignorance.)

Alternatively, you may have reqs = lua_code and eval that, though
that's certainly not beautiful.
</delurk>

--
{ Marek Baczyński :: UIN 57114871 :: GG 161671 :: JID imbaczek@xxxxxxxxxxxxx  }
{ http://www.vlo.ids.gda.pl/ | imbaczek at poczta fm | http://www.promode.org }
.. .. .. .. ... ... ...... evolve or face extinction ...... ... ... .. .. .. ..

[Prev in Thread] Current Thread [Next in Thread]