Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2005:
[Freeciv-Dev] (PR#12706) Events framework
Home

[Freeciv-Dev] (PR#12706) Events framework

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#12706) Events framework
From: "Guest" <rt-guest@xxxxxxxxxxx>
Date: Mon, 23 May 2005 20:02:37 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12706 >

This construction looks somewhat strange:

quote from per's message:
; whenever a hut is entered, entering player gets a unit at the hut
; location
[effect_hut_0]
name = "Units"
value = "units_0"
reqs =
{ "type", "name"
  "Event", "Hut"
}

[units_0]
units = { "id", "veteran", "type_from_role"
          "new", 0, "Hut"
}

To me, it looks like 'effect_hut_0 itself is nothing more than a
req(uistit)/effect: 
[effect_hut_0]
Units={ "(req_)type", "req" (ie effect name in this case)
        "Effect", "units_0"
        "Event", "Hut"
}

Though maybe making it that compact, would warrant OR and AND types. ie,
the new type: "logic" or "bind" (bind sound nice I think). The words
used would be captitalized and recognized as 'special', thus you can add
it in-between any fields of the effect definition (though dumb use may
lead to non-working effects.) Basically, it should only be interpreted
as making sense if it's before a "type" field, or a field that is of the
same funtion as the type field) AND between two conditions of the same
'type' (or 'id' or whatever).

Thus:
[effect_hut_0]
Units={ "(req_)type", "req"   
        "Effect", "units_0",,  ;(ie effect name in this case)
 "AND", "Event", "Hut", "OR", "Hut Disbanded" ;(see explanation below)
}
-No need to specify you are using 2 "reqs", the OR implies that there
will be an extra one. The and is read as not of a 'defined' type (thus
is not read for "type", rather the next entry is. AND is after
"units_0", but separated with an extra comma, indicating a new line, and
not a new requirement.
-Hut disbanded is the event where a plane 'scares' the hut inhabitants
away, caused by units with unit_type air and heli)



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