Open dninemfive opened 1 month 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.
Should try breaking this up into several sub-components rather than developing a holistic approach at first. Namely:
Traits implemented by capacites, according to my analysis:
choc
electronic_warfare
eo_dazzler
falseflag
(this was a false positive, ironically enough)fireDirection
gsr
jammer
mp
reservist
resolute
security
singint
[sic]sniper
These could be generated from source with generate_hints.py
but that's probably out of scope for now.TODO: some kind of check to prevent adding a trait multiple times or removing it multiple times?
edit: done with 52caeb2.
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 theCapacite
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 dninemfive/wn-9id#1 and dninemfive/wn-9id#21 much easier to implement.