Follow-up work to player objects (i.e. job names in triggers)
quisquous opened this issue · 1 comments
See also: #3000, #5916, #5861.
Here's a couple of follow-up items that should be pretty straightforward, if anybody is interested:
Localized Job Names
From the discussion of #3000, it looks like there may be shorter/localized names of jobs in other languages. Right now everything will say "WAR" or something, which is probably not ideal. If somebody adds a table of jobTranslation: Record<Lang, Record<Job, string>>
to party.ts
and then uses it in the member
function instead of directly using jobName
. You'll probably need to change the type of BasePartyMemberParamObject
to be job?: string
in party.d.ts
as well.
Handle multiple jobs
Right now it could say something like "Stacks on WHM, WHM" which is probably not useful. There's a couple of different ideas here, feel free to implement one if it sounds good. I think any solution will need to do some work in party.ts
onPartyChanged
to construct some data structures about if there is a job conflict, and then use them in the member
function to return something different for the job
field.
(1) if there's two people with the same job say somebody's name, e.g. WHM Tini
or WHM(Tini)
, but if there's only one person with the job, just use the job SGE
(2) if there's two people with the same job number them (by alphabetical full name?) e.g. WHM 1
or WHM 2
, but if there's only one person with the job, just use the job SGE
(3) if there's two people with the same job, then just use their name to differentiate, e.g. Tini
(4) implement some combination of these and add an extra option for the user to pick which one they want