New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[message] does not display type name in the absence of a unit name or custom caption #3211

Closed
shikadiqueen opened this Issue Jun 5, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@shikadiqueen
Member

shikadiqueen commented Jun 5, 2018

In all previous stable versions of Wesnoth, [message] was implemented so that if the speaking unit did not have a name (i.e. the name is empty), the unit type's name would be used as the dialog's caption in its instead, unless caption= was explicitly set.

1.14.x currently does not do this, but rather than an oversight it's an issue with the logic that is supposed to implement this behaviour.

If you check data/lua/wml/message.lua:41 you'll notice that line 45 does not take into account that speaker.name can be an empty string (which is a true value). Furthermore, it refers to a proxy unit field (type_name) that does not exist. The correct attribute (language_name) is not a field of the proxy unit, but it can be found in the WML table attached to it.

I'm not really sure if type_name is actually supposed to exist (it's not documented in the wiki), but there's nothing in the C++ implementing it as a field of proxy units — the same goes for language_name.

@shikadiqueen shikadiqueen self-assigned this Jun 5, 2018

shikadiqueen added a commit that referenced this issue Jun 5, 2018

jostephd added a commit to jostephd/wesnoth that referenced this issue Oct 6, 2018

jostephd pushed a commit to jostephd/wesnoth that referenced this issue Oct 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment