mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-15 19:32:56 +00:00
T: eliminate the 'gender' variable by using the SUF gender= key
This commit is contained in:
parent
bf1a9b0752
commit
e10dfeb92c
|
@ -87,17 +87,14 @@ function wml_actions.select_character()
|
|||
|
||||
local character = wesnoth.show_dialog(character_selection_dialog)
|
||||
local unit = wesnoth.get_variable("student_store")
|
||||
local gender = "male"
|
||||
|
||||
if character == 2 then
|
||||
gender = "female"
|
||||
|
||||
unit.type = "Fighteress"
|
||||
unit.name = "Li’sar"
|
||||
unit.gender = "female"
|
||||
unit.profile = "portraits/lisar.png"
|
||||
end
|
||||
|
||||
wesnoth.set_variable("gender", gender)
|
||||
wesnoth.put_unit(unit)
|
||||
wesnoth.redraw {}
|
||||
end
|
||||
|
|
|
@ -421,20 +421,20 @@
|
|||
[/objective]
|
||||
[objective]
|
||||
[show_if]
|
||||
[variable]
|
||||
name=gender
|
||||
not_equals=female
|
||||
[/variable]
|
||||
[have_unit]
|
||||
id=student
|
||||
gender=male
|
||||
[/have_unit]
|
||||
[/show_if]
|
||||
description= _"Death of Konrad"
|
||||
condition=lose
|
||||
[/objective]
|
||||
[objective]
|
||||
[show_if]
|
||||
[variable]
|
||||
name=gender
|
||||
equals=female
|
||||
[/variable]
|
||||
[have_unit]
|
||||
id=student
|
||||
gender=female
|
||||
[/have_unit]
|
||||
[/show_if]
|
||||
description= _"Death of Li’sar"
|
||||
condition=lose
|
||||
|
|
|
@ -45,10 +45,10 @@
|
|||
|
||||
#define GENDER MALE_WML FEMALE_WML
|
||||
[if]
|
||||
[variable]
|
||||
name=gender
|
||||
equals=male
|
||||
[/variable]
|
||||
[have_unit]
|
||||
id=student
|
||||
gender=male
|
||||
[/have_unit]
|
||||
[then]
|
||||
{MALE_WML}
|
||||
[/then]
|
||||
|
|
Loading…
Reference in New Issue
Block a user