T: eliminate the 'gender' variable by using the SUF gender= key

This commit is contained in:
Charles Dang 2015-01-03 21:34:36 +11:00
parent bf1a9b0752
commit e10dfeb92c
3 changed files with 13 additions and 16 deletions

View File

@ -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 = "Lisar"
unit.gender = "female"
unit.profile = "portraits/lisar.png"
end
wesnoth.set_variable("gender", gender)
wesnoth.put_unit(unit)
wesnoth.redraw {}
end

View File

@ -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 Lisar"
condition=lose

View File

@ -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]