[WF-General] spawn area
erik.hjortsberg at gmail.com
Sat Jan 2 16:42:41 PST 2010
How to proceed though? I really like they way the terrain mod shape code
works. It's a little bit of more code, as it deals with templates, but
it's very efficient in what it does, and it allows for a wide range of
different shapes to be defined. I can always code up a suggestion in a
Alistair Riddoch skrev:
> 2010/1/3 Erik Hjortsberg <erik.hjortsberg at gmail.com>:
>> Yes, adding a "type" attribute to the "area" property would make it fit with
>> how the shapes are parsed for the terrain mods.
>> While the "points" and "type" attribute for terrain mods could be moved up
>> one level, my main idea with having them under a "shape" attribute was that
>> this attribute could be reused wherever a shape needed to be defined (I'm
>> thinking that there will be other future attributes which will use shapes
>> apart from the current ones).
> When we were talking about attributes which contain references to
> other entites I mentioned the concept of attribute inheritance. This
> means that the "area" attribute could be considered a base class for
> attributes that represent an area of surface, and "terrain_mod" would
> inherit from "area", meaning that it is understood that sub-attributes
> have the same meaning. It probably doesn't matter that much, as either
> way works, but the more deeply nested attributes are, the more complex
> the code needed to read them gets.
> When I was writing the code for spawns, I intentionally used exactly
> the same format as surface mods as it can make things way clearer if
> the spawn area corresponds to a visible terrain area. Of course it
> still works if the designer wants the area to be invisible too.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the General