diff --git a/cvarinfo.txt b/cvarinfo.txt index b36ac63..dcb9f56 100644 --- a/cvarinfo.txt +++ b/cvarinfo.txt @@ -5,4 +5,5 @@ server int vht_mfrost_damagefunc = 1; server bool vht_mbloodscourge_foilinvul = false; server bool vht_player_touchshatter = true; server bool vht_player_questlog = true; +user int vht_player_questlogplural = 0; server int vht_monster_centaur = 2; diff --git a/graphics/FONTA06.png b/graphics/FONTA06.png new file mode 100644 index 0000000..7ad59f3 Binary files /dev/null and b/graphics/FONTA06.png differ diff --git a/language.txt b/language.txt index ff9169d..45fe8ca 100644 --- a/language.txt +++ b/language.txt @@ -10,6 +10,7 @@ VHT_MFROST_DAMAGEFUNC = "Frost Shards Damage Function"; VHT_MBLOODSCOURGE_FOILINVUL = "Bloodscourge Foils Invulnerability"; VHT_PLAYER_TOUCHSHATTER = "Shatter Frozen Enemies On Touch"; VHT_PLAYER_QUESTLOG = "Enable Quest Log"; +VHT_PLAYER_QUESTLOGPLURAL = "Quest Log First-Person Pronouns (English)"; VHT_MONSTER_CENTAUR = "Centaur Behaviour"; VHT_OPT_CONSTANT = "Constant"; @@ -17,6 +18,9 @@ VHT_OPT_MODIFIED = "Modified"; VHT_OPT_VANILLA = "Vanilla"; VHT_OPT_NOREFLECT = "No Projectile Reflection"; VHT_OPT_ANGLED = "No Reflection, Back is Vulnerable"; +VHT_OPT_SINGULAR = "I/me/my"; +VHT_OPT_PLURAL = "we/our/us"; +VHT_OPT_PLURAL2 = "we&/our&/us&"; VHT_QST_1_0 = "@ must find the emerald key\n" diff --git a/menudef.txt b/menudef.txt index 968cbcf..23ba6d6 100644 --- a/menudef.txt +++ b/menudef.txt @@ -1,3 +1,9 @@ +OptionValue "VhtPlural" { + 0, "$VHT_OPT_SINGULAR" + 1, "$VHT_OPT_PLURAL" + 2, "$VHT_OPT_PLURAL2" +} + OptionValue "VhtDamageFunc" { 0, "$VHT_OPT_VANILLA" 1, "$VHT_OPT_MODIFIED" @@ -30,6 +36,7 @@ OptionMenu "VhtMenu" { StaticText "Players" Option "$VHT_PLAYER_TOUCHSHATTER", "vht_player_touchshatter", "OnOff" Option "$VHT_PLAYER_QUESTLOG", "vht_player_questlog", "OnOff" + Option "$VHT_PLAYER_QUESTLOGPLURAL", "vht_player_questlogplural", "VhtPlural" StaticText "Monsters" Option "$VHT_MONSTER_CENTAUR", "vht_monster_centaur", "VhtCentaurBehaviour" } diff --git a/vhtzs/events.zsc b/vhtzs/events.zsc index 399fb94..28bc4ad 100644 --- a/vhtzs/events.zsc +++ b/vhtzs/events.zsc @@ -1,6 +1,6 @@ class VhtEvents : StaticEventHandler { - bool m_useQuestLog; - string m_questLog; + ui bool m_useQuestLog; + ui string m_questLog; VhtFnPlayerInv m_fGetQuests; VhtQuestHolder vhtGetQuests() const { return m_fGetQuests.vhtRun() ? VhtQuestHolder(m_fGetQuests.m_result) : null; @@ -30,14 +30,19 @@ class VhtEvents : StaticEventHandler { } } } - override void worldTick() { + override void uiTick() { m_useQuestLog = vht_player_questlog; + if(m_useQuestLog) { + let qh = vhtGetQuests(); + if(qh) { + m_questLog = qh.vhtDescribe(); + } + } + } + override void worldTick() { let qh = vhtGetQuests(); if(qh) { qh.vhtTick(); - if(m_useQuestLog) { - m_questLog = qh.vhtDescribe(); - } } } override void renderUnderlay(RenderEvent e) { diff --git a/vhtzs/quest.zsc b/vhtzs/quest.zsc index 6308c87..0e7d840 100644 --- a/vhtzs/quest.zsc +++ b/vhtzs/quest.zsc @@ -1,6 +1,11 @@ class VhtQuest abstract play { int m_mapNum, m_step; VhtHubQuest m_hubQuest; + static const string m_pronouns[] = { + "I", "me", "my", + "we", "our", "us", + "we&", "our&", "us&" + }; virtual VhtQuest vhtInit(VhtHubQuest hubQuest) { m_mapNum = level.levelNum; m_hubQuest = hubQuest; @@ -9,11 +14,11 @@ class VhtQuest abstract play { virtual void vhtTick() {} virtual void vhtTravelled() {} virtual void vhtPreTravelled() {} - virtual string vhtDescribe() { + virtual ui string vhtDescribe(int pronouns) { let s = StringTable.localize("$VHT_QST_" .. m_mapNum .. "_" .. m_step); - s.replace("@=", multiplayer ? "us" : "me"); - s.replace("@'", multiplayer ? "our" : "my"); - s.replace("@", multiplayer ? "we" : "i"); + s.replace("@=", m_pronouns[2 + 3 * pronouns]); + s.replace("@'", m_pronouns[1 + 3 * pronouns]); + s.replace("@", m_pronouns[0 + 3 * pronouns]); return s; } LevelInfo vhtLevelInfo() const { @@ -90,8 +95,8 @@ class VhtQuest2 : VhtHubQuest { m_step = 1; } } - override string vhtDescribe() { - let s = super.vhtDescribe(); + override string vhtDescribe(int pronouns) { + let s = super.vhtDescribe(pronouns); if(m_step == 1) { s = string.format(s, m_guardianOfFire, m_guardianOfSteel); } @@ -128,8 +133,8 @@ class VhtQuest4 : VhtQuest { } } } - override string vhtDescribe() { - let s = super.vhtDescribe(); + override string vhtDescribe(int pronouns) { + let s = super.vhtDescribe(pronouns); if(!VhtQuest2(m_hubQuest).m_fFlameMask.m_result) { s = s .. StringTable.localize("$VHT_QST_4_FireMask"); } @@ -215,8 +220,9 @@ class VhtQuestHolder : Inventory { } } } - string vhtDescribe() { + ui string vhtDescribe() { string s = ""; + int pronouns = multiplayer ? 1 : clamp(CVar.getCVar('vht_player_questlogplural', players[consolePlayer]).getInt(), 0, 2); for(int i = 0, j = m_quests.size(); i < j; ++i) { if(m_quests[i]) { s.appendFormat( @@ -225,7 +231,7 @@ class VhtQuestHolder : Inventory { m_quests[i].vhtLevelInfo().levelName, false ), - m_quests[i].vhtDescribe() + m_quests[i].vhtDescribe(pronouns) ); } }