Raven Work in Progress – Dropping

One of the reasons I don’t accept donated code for my addons is that I extensively change the code from release to release.  Version control is difficult enough to control on my own.  When people contribute “fixes” for perceived problems, it adds and element of complexity that I don’t have time to tackle.

Check out this screenshot of the drop script for the Ground Control Station…

New on the left, old on the right
New on the left, old on the right

Even by not looking closely, you can see that I’ve more than doubled the number of things that are going on in this page just to drop an object.  One thing I implemented in the new version was reaching out to pick up and drop things.  If you have a weapon, the code works easily.  But for units that don’t have a weapon, I had to create a workaround (adding a weapon, calling the command to reach for a  weapon (current weapon), then removing it quickly).

Also, if you have a weapon, you reach out at one speed.  If you don’t have a weapon, you reach out much faster.  So I had to create a structure to work around these different situations and it required a lot of testing to figure things out.  The speed at which a unit drops something is not something I expect anyone to notice while playing.  But if I didn’t pay attention to these kinds of details and situations, the unit wouldn’t drop the object fast enough and then the unit would get injured by the object.

Now, if a user of my addon took the old version of this page (the one on the right) and modified it to fit their needs and sent it to me, I wouldn’t know where to start with implementing their changes.

These are just a few more reasons why I have my terms and conditions written the way they are.   Learn what you can from my code, but don’t change it without my permission.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.