[Freeciv-Dev] (PR#12706) Events framework
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<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)
- [Freeciv-Dev] Re: (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/05/02
- [Freeciv-Dev] (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/05/03
- [Freeciv-Dev] (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/05/03
- [Freeciv-Dev] Re: (PR#12706) Events framework, Jason Short, 2005/05/03
- [Freeciv-Dev] (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/05/03
- [Freeciv-Dev] (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/05/06
- [Freeciv-Dev] (PR#12706) Events framework,
Guest <=
- [Freeciv-Dev] Re: (PR#12706) Events framework, Per I. Mathisen, 2005/05/24
- [Freeciv-Dev] Re: (PR#12706) Events framework, Jason Short, 2005/05/24
- [Freeciv-Dev] (PR#12706) Events framework, Guest, 2005/05/24
- [Freeciv-Dev] (PR#12706) Events framework, Guest, 2005/05/24
- [Freeciv-Dev] Re: (PR#12706) Events framework, Jason Short, 2005/05/24
- [Freeciv-Dev] Re: (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/05/24
- [Freeciv-Dev] Re: (PR#12706) Events framework, Vasco Alexandre da Silva Costa, 2005/05/24
- [Freeciv-Dev] Re: (PR#12706) Events framework, Peter Schaefer, 2005/05/25
- [Freeciv-Dev] (PR#12706) Events framework, Guest, 2005/05/26
- [Freeciv-Dev] (PR#12706) Events framework, Guest, 2005/05/26
|
|