01-08-2016, 11:44 PM
That's not good enough, mouse hover is not a good interface (especially if you have to hover over multiple things). On the other hand, most parameters don't need this kind of info, they are self-explanatory.
How about listing one parameter per line, and add an optional type after, say, a colon?
(Things in [brackets] are links to respective pages)
For this to work, we could extend the APIDesc format for the "Params" - if it's a simple string, use the current behavior, if it is an array, consider each item a separate parameter and each item should have up to three member strings: name, typename, typelink:
How about listing one parameter per line, and add an optional type after, say, a colon?
Code:
DamageType: [eDamageType]
AttackerEntity: [cEntity]
RawDamage
KnockbackAmount: number
For this to work, we could extend the APIDesc format for the "Params" - if it's a simple string, use the current behavior, if it is an array, consider each item a separate parameter and each item should have up to three member strings: name, typename, typelink:
TakeDamage = { { Params = "{{AttackerEntity|cEntity}}", Return = "", Notes = "Causes this entity to take damage that AttackerEntity would inflict. Includes their weapon and this entity's armor." }, { Params = { {"DamageType", "eDamageType", "Globals#eDamageType"}, {"AttackerEntity", "cEntity"}, {"RawDamage"}, {"KnockbackAmount", "number"}, }, Return = "", Notes = "Causes this entity to take damage of the specified type, from the specified attacker (may be nil). The final damage is calculated from RawDamage using the currently equipped armor." }, ... },We could even do the same for the return values - sometimes there's more of them and of various types.