Skip to content

Commit

Permalink
Release: Version 1.6
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 87fe3a88b0b6fafd734fe2868e0b599fbcf02369f2a6dde542ba1dca69a2469f
  • Loading branch information
librarianmage committed Jun 10, 2024
2 parents db5d198 + c9b6ce9 commit e75e882
Show file tree
Hide file tree
Showing 15 changed files with 506 additions and 424 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v1.6 — 2024-06-10
Tested to work on game version 207.67

* Fix off-by-one error in pronoun selection

## v1.5 — 2023-08-15
Tested to work on game versions 204.100 / 205.54 (beta)

Expand Down
163 changes: 0 additions & 163 deletions NamePronoun.cs

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ A mod that works in conjunction with the [Gender and Pronoun Sets](https://steam

Specifically, this mod allows you to pick from all personal genders and pronouns defined in game (including pseudo-plural ones), with a number of additions.

Additionally, all gender and pronoun prompts have been redesigned with inspirations from kernelmethod's [Better Pet Selector](https://steamcommunity.com/sharedfiles/filedetails/?id=3006503292) mod.
Additionally, all gender and pronoun prompts have been redesigned with inspiration from kernelmethod's [Better Pet Selector](https://steamcommunity.com/sharedfiles/filedetails/?id=3006503292).

Tested to work on game versions 204.100 / 205.54 (beta).
Tested to work on game version 207.67.

[Source Code (GitHub)](https://github.com/librarianmage/QudGendersUnleashed) \| [Workshop Page](https://steamcommunity.com/sharedfiles/filedetails/?id=2815078000) \| [My Caves of Qud Mods (Steam Workshop)](https://steamcommunity.com/profiles/76561198836298826/myworkshopfiles/?appid=333640)

Expand Down
56 changes: 56 additions & 0 deletions Scripts/Formatting.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
using System.Linq;
using ConsoleLib.Console;
using XRL.World;

namespace QudGendersUnleashed
{
public static class Formatting
{
public static readonly string FromGenderText = Markup.Color("W", "<from gender>");
public static readonly string CreateNewText = Markup.Color("W", "<create new>");

public static string FormatGender(Gender G)
{
var name = Markup.Color("M", G.Name);
var summary = Markup.Color("c", G.GetBasicSummary());

return $"{name}\n{summary}";
}

public static string FormatPronounSet(PronounSet P)
{
var name = Markup.Color("M", P.GetShortName());
var summary = Markup.Color("c", P.GetBasicSummary());

if (P.FromGender)
{
var suspects = Gender
.Find(G => !G.DoNotReplicateAsPronounSet)
.Where(G => new PronounSet(G).Name == P.Name)
.Select(G => Markup.Color("m", G.Name));

var from = suspects.Any() ? string.Join(" / ", suspects) : "unknown";
var extra = Markup.Color("m", $"(from {from})");

return $"{name} {extra}\n{summary}";
}

return $"{name}\n{summary}";
}

public static string FormatFromGenderPronounOption(Gender G)
{
var g1 = G ?? Gender.Get("nonspecific");
if (g1 is null)
{
return FromGenderText;
}

var name = Markup.Color("m", g1.Name);
var extra = Markup.Color("m", $"({name})");
var summary = Markup.Color("c", g1.GetBasicSummary());

return $"{FromGenderText} {extra}\n{summary}";
}
}
}
Loading

0 comments on commit e75e882

Please sign in to comment.