diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-05-24 13:47:28 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-05-24 13:47:28 -0300 |
commit | 9c322449ade0d1952f6ca4dd73cc92413f61ca69 (patch) | |
tree | 1bff0731c4db0790ef57a2d524d739b1241ffa2c /npc/functions/gender.txt | |
parent | 9c649056dc45d39e88036bdb2bb373c477f8571f (diff) | |
parent | 255cf7c47f76a6e2f12fc809473ce513c294dfa4 (diff) | |
download | serverdata-jesusalva/inns.tar.gz serverdata-jesusalva/inns.tar.bz2 serverdata-jesusalva/inns.tar.xz serverdata-jesusalva/inns.zip |
Merge branch 'master' into jesusalva/innsjesusalva/inns
Diffstat (limited to 'npc/functions/gender.txt')
-rw-r--r-- | npc/functions/gender.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/npc/functions/gender.txt b/npc/functions/gender.txt new file mode 100644 index 00000000..0f153c53 --- /dev/null +++ b/npc/functions/gender.txt @@ -0,0 +1,13 @@ +function script stringToGender { + .@short$ = strtolower(charat(getarg(0, ""), 0)); + + return .@short$ == "f" ? GENDER_FEMALE : + .@short$ == "m" ? GENDER_MALE : GENDER_HIDDEN; +} + +function script genderToString { + .@gender = getarg(0, Gender); + + return .@gender == GENDER_FEMALE ? l("female") : + .@gender == GENDER_MALE ? l("male") : l("non-binary"); +} |