Follow-up Comment #3, patch #3804 (project freeciv):

At this point I were most worried about level of abstraction. I don't want a
feature that is handling specifically flying units, but units that for any
reason cannot unload or load cargo outside cities or bases. That affects the
function naming at least - "Unreachable" flag was named like that instead of
"Flying" for the very reason it might be used for some other unreachability
reason than unit flying. Also I'm been thinking if we can go by allowing just
one such a rule in a ruleset. If yes, we could have just pair of flags of
which one defines units that usually cannot unload, and the other the special
cargo units. But like we can have multiple reasons unit cannot be attacked,
each with its own (not shared) exceptions, this should too. Alien ruleset has
both antigravity and burrowing units as unreachable. The units that can attack
flying units are not the same units that can attack burrowing units. Similarly
units that can paradrop from antigravity unit should not be automatically able
to dig their way out from transport burrowing through earth.
As the requirement are so similar to what unreachable/attacking has, I think
implementation should be similar too. First of all I think unreachable in
respect to attacks, unreachable in respect to unloading & unreachable in
respect to loading will so often be the same units that they should depend on
same "Unreachable" flag instead of forcing maintenance of two distinct flags.
It would still be possible to have unit unreachable in just one sense by
explicitly listing all the units able to attack it/unload from it. To the
ruleset format I would just add two unit class vectors, similar to "targets",
for unit types. One would list classes that the unit can unload from, and the
other classes that the unit can load to. Code to handle the vectors would be
almost copy+paste from "targets" handling.

Does this desing make sense to you?

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?3804>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to