Add nonbinary gender support with pronoun system and server compatibility

Extends gender system beyond WoW's binary male/female to support nonbinary characters with proper they/them pronouns. Implements client-side gender mapping (nonbinary→male) for 3.3.5a server compatibility while preserving player identity through local config persistence. Adds pronoun placeholders ($p/$o/$s/$S) and three-option gender text parsing ($g<male>:<female>:<nonbinary>;) for inclusive quest and dialog text.
This commit is contained in:
Kelsi 2026-02-09 17:39:21 -08:00
parent eb0c9e18ba
commit 9f3a7d962e
10 changed files with 421 additions and 32 deletions

View file

@ -45,9 +45,41 @@ enum class Class : uint8_t {
*/
enum class Gender : uint8_t {
MALE = 0,
FEMALE = 1
FEMALE = 1,
NONBINARY = 2
};
/**
* Pronoun set for text substitution
*/
struct Pronouns {
std::string subject; // he/she/they
std::string object; // him/her/them
std::string possessive; // his/her/their
std::string possessiveP; // his/hers/theirs
static Pronouns forGender(Gender gender) {
switch (gender) {
case Gender::MALE:
return {"he", "him", "his", "his"};
case Gender::FEMALE:
return {"she", "her", "her", "hers"};
case Gender::NONBINARY:
return {"they", "them", "their", "theirs"};
default:
return {"they", "them", "their", "theirs"};
}
}
};
/**
* Convert gender to server-compatible value (WoW 3.3.5a only supports binary genders)
* Nonbinary is mapped to MALE for server communication while preserving client-side identity
*/
inline Gender toServerGender(Gender gender) {
return (gender == Gender::FEMALE) ? Gender::FEMALE : Gender::MALE;
}
/**
* Equipment item data
*/

View file

@ -6,6 +6,7 @@
#include <memory>
#include <string>
#include <unordered_map>
#include <algorithm>
namespace wowee {
namespace pipeline { class AssetManager; }
@ -36,6 +37,12 @@ public:
void setRotateWithCamera(bool rotate) { rotateWithCamera = rotate; }
bool isRotateWithCamera() const { return rotateWithCamera; }
void setSquareShape(bool square) { squareShape = square; }
bool isSquareShape() const { return squareShape; }
void zoomIn() { viewRadius = std::max(100.0f, viewRadius - 50.0f); }
void zoomOut() { viewRadius = std::min(800.0f, viewRadius + 50.0f); }
// Public accessors for WorldMap
GLuint getOrLoadTileTexture(int tileX, int tileY);
void ensureTRSParsed() { if (!trsParsed) parseTRS(); }
@ -79,6 +86,7 @@ private:
float viewRadius = 400.0f; // world units visible in minimap radius
bool enabled = true;
bool rotateWithCamera = false;
bool squareShape = false;
// Throttling
float updateIntervalSec = 0.25f;

View file

@ -80,10 +80,13 @@ private:
bool pendingInvertMouse = false;
int pendingUiOpacity = 65;
bool pendingMinimapRotate = false;
bool pendingMinimapSquare = false;
// UI element transparency (0.0 = fully transparent, 1.0 = fully opaque)
float uiOpacity_ = 0.65f;
bool minimapRotate_ = false;
bool minimapSquare_ = false;
bool minimapSettingsApplied_ = false;
/**
* Render player info window
@ -194,6 +197,9 @@ private:
static std::string getSettingsPath();
// Gender placeholder replacement
std::string replaceGenderPlaceholders(const std::string& text, game::GameHandler& gameHandler);
// Left-click targeting: distinguish click from camera drag
glm::vec2 leftClickPressPos_ = glm::vec2(0.0f);
bool leftClickWasPress_ = false;