dninemfive / wn-9id

WARNO mod implementing the 9th Infantry Division (Motorized).
Other
0 stars 0 forks source link

Automate application of unit traits #22

Open dninemfive opened 15 hours ago

dninemfive commented 15 hours ago

Currently, the unit trait icons in-game are controlled across multiple areas: the actual icons are specified by the Specialties member of the UI module, while the actual implementation is either in the Capacite module for certain traits, or in arbitrary other locations depending on the trait. For example, the ERA trait is just an extra 1 HP in the base damage module, while the False Flag trait removes the Dangerousness property.

This should be generally defined using something which defines an icon, name, description, and two callables, one which applies the trait and one which un-applies it. The latter might not be possible to define, for example in the case of False Flag, where the Dangerousness is not necessarily known once that module is removed.

This would make issues such as #1 and #21 much easier to implement.

dninemfive commented 15 hours ago

The idea of callables on units could be generalized a bit further - for example, a one-call way to make a unit (not) a transport unit or (not) a command unit would be very useful.