summaryrefslogtreecommitdiff
path: root/npc/functions/bodytype.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/bodytype.txt')
-rw-r--r--npc/functions/bodytype.txt24
1 files changed, 13 insertions, 11 deletions
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");
}