summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/barber.txt16
-rw-r--r--npc/functions/bodytype.txt24
-rw-r--r--npc/functions/doors.txt2
-rw-r--r--npc/functions/main.txt3
4 files changed, 23 insertions, 22 deletions
diff --git a/npc/functions/barber.txt b/npc/functions/barber.txt
index 3d2e3014..6ce19eea 100644
--- a/npc/functions/barber.txt
+++ b/npc/functions/barber.txt
@@ -110,25 +110,25 @@ function script BarberChangeColor {
return;
}
-function script BarberChangeBodyType {
+function script BarberChangeGender {
mesn("Note");
- mes(b(l("Changing your body type will send you back to the character selection screen.")));
+ mes(b(l("Changing your gender will send you back to the character selection screen.")));
next();
- mes(l("Please select the desired body type:"));
+ mes(l("Please select the desired gender:"));
menuint(
- rif(BodyType == BODYTYPE_1, "► ") + l("Body type %i", 1), BODYTYPE_1,
- rif(BodyType == BODYTYPE_2, "► ") + l("Body type %i", 2), BODYTYPE_2,
- rif(BodyType == BODYTYPE_3, "► ") + l("Body type %i", 3), BODYTYPE_3);
+ rif(Gender == GENDER_FEMALE, "► ") + l("Gender female"), GENDER_FEMALE,
+ rif(Gender == GENDER_MALE, "► ") + l("Gender male", 2), GENDER_MALE,
+ rif(Gender == GENDER_HIDDEN, "► ") + l("Gender hidden"), GENDER_HIDDEN);
- if (BodyType == @menuret) {
+ if (Gender == @menuret) {
return; // don't kick to char selection when not needed
}
// FIXME: when manaplus supports seamless changing for evol2, use a simple return;
closedialog();
close2();
- BodyType = @menuret;
+ Gender = @menuret;
close;
}
diff --git a/npc/functions/bodytype.txt b/npc/functions/bodytype.txt
index 5d37775a..b67c9294 100644
--- a/npc/functions/bodytype.txt
+++ b/npc/functions/bodytype.txt
@@ -1,19 +1,21 @@
-function script stringToBodytype {
+function script stringToGender {
switch (ord(strtolower(charat(getarg(0, "n"), 0)))) {
- case 50: // 2
- case 102: // f
- return BODYTYPE_2;
- case 51: // 3
case 109: // m
- return BODYTYPE_3;
+ return GENDER_MALE;
+ case 102: // f
+ return GENDER_FEMALE;
default:
- return BODYTYPE_1;
+ return GENDER_HIDDEN;
}
}
-function script bodytypeToString {
- .@bodytype = getarg(0, BodyType);
+function script genderToString {
+ .@sex = getarg(0, Gender);
- return .@bodytype == BODYTYPE_2 ? l("type %i", 2) :
- .@bodytype == BODYTYPE_3 ? l("type %i", 3) : l("type %i", 1);
+ if (.@sex == 0)
+ return l("female");
+ else if (.@sex == 1)
+ return l("male");
+ else
+ return l("hidden");
}
diff --git a/npc/functions/doors.txt b/npc/functions/doors.txt
index d15969ad..6d73acf0 100644
--- a/npc/functions/doors.txt
+++ b/npc/functions/doors.txt
@@ -43,7 +43,7 @@ function script doorTimer {
function script doorInit {
.distance = 5;
.alwaysVisible = true;
- .bodytype = BODYTYPE_1;
+ .sex = GENDER_FEMALE;
end;
}
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index 3be6b6fb..aaac5c16 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -54,8 +54,7 @@ function script mesq {
}
function script g {
- // TODO: remove gendered lines from NPCs, or use any(getarg(0), getarg(1)) to make it random
- return BodyType == 0 ? getarg(0) : getarg(1);
+ return Gender == 0 ? getarg(0) : getarg(1);
}
function script b {