I would like to have a room description have a couple variations depending on the POV character's gender. This would mean using the text processor's {pv:}
, {pa:}
, etc. in some occurences.
In this current version of Q6 (0.8), these functions require the use of a msg function to define the parameters it will use (as I understand it).
The issue is that a room's desc must always be a string, so I must use a workaround, such as writing desc
as a function returning a string (which is slightly more cumbersome as I must concatenate player.pronouns.xxxx
), or using the afterEnter
property.
My question/request is (or rather are):
player
or char
if there is no item
propertydesc
property a "printOrRun" function, like the examine
property of itemsOne way to do it in the current version would be to pass the string through processText before returning it.
desc:function() {
let s = ''
// ...
return processText(s, params)
}
The reason it wants a string returned is so the text processor can be used, together with settings.roomTemplate
. If the parameters had player built in, would that do what you want? Looking at the code, some directives do that already, so it would be good if the all did.