24.04.2008, 15:13:15
My thoughts when asking were that a sample like this explains the internals in detail (which is not always the same as what observing a game from a modder's perspective suggests), and is easier than typing out all the cases in plain English. (Case in point: the sample I gave already shows how many special case weapons assume they will only be in a particular primary/secondary weapon slot.)
Edit: Marshall, I believe that snippet was a block to avoid Locomotor weaponry attacking buildings when the locomotor weapon code was still in development, since internally buildings derive from a different class than the mobile objects and thus special code is needed to detect that (well, two lines of special code is not much, but ... we all know who wrote this game.). I think I should describe the main concepts in the game before posting more snippets.
Edit: Marshall, I believe that snippet was a block to avoid Locomotor weaponry attacking buildings when the locomotor weapon code was still in development, since internally buildings derive from a different class than the mobile objects and thus special code is needed to detect that (well, two lines of special code is not much, but ... we all know who wrote this game.). I think I should describe the main concepts in the game before posting more snippets.