Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added a ,

...

In 4.20 we introduced new functions to handle cycling the player ship weapons and retrieve the number of weapons. These functions originally performed in the context of the player's current controlled defensible object which normally is the player ship but can also be a remote controlled drone or missile. While this behavior opens up new possibilities for mods (f.e. allow drones with multiple weapons which can be cycled), it can result in some unexpected behavior if the code is not aware that it's context sensitive and the context changed (f.e. the player entered a remote controlled drone). In addition to that, all other existing weapon related functions (like the Lua function: Get[Primary/Secondary]ShipWeapon()) explicitly perform on the player ship; hence, having the new functions perform on the controlled defensible introduced some inconsistency here.

...