Currently we can do a lot with droids, but the JS API ties our hands somewhat. What should droid objects look like in order to make them more useful and easier to work with?
Also, would it be worth having distinct objects depending on the type of droid - for example trucks have a load of unique features that other droids can't do. Maybe droid categories could be something like:
- Construction - build, help build, demolish, repair stuff
- Attack - attack stuff
- Sensor - would this just be sensors or also ECM?
- Repair - droids with repair turrets
- Commander - commander droids.
Properties
Methods
Method | Description |
---|---|
.attack() | Attack something |
.move() | Move somewhere |
.retreat() | Retreat somewhere (to base if nowhere defined) |
.recycle() | Go and get recycled |
.build() | Build something (only applies to construction droids) |
.demolish() | Demolish something (only applies to construction droids) |
Constants
Currently all the constants associated with droids are stored on global, which is somewhat messy. However, they have a naming convention, for example DROID_* refers to droid types, and DORDER_* refers to droid orders.
There are currently no constants defined for droid secondary orders, things like stance (fire at will, return fire, hold fire) and retreat setting (retreat at heavy damage, medium damage, do or die), etc.