Add POV foreground clothing cues

This commit is contained in:
2026-06-28 10:31:01 +02:00
parent d937c219ee
commit 54617e4702
4 changed files with 84 additions and 1 deletions
+58
View File
@@ -437,10 +437,51 @@ def default_man_hardcore_clothing_entries(
return entries
def _pov_clothing_sentence(clothing: str, needs_lower_access: bool) -> str:
clothing = _clean_pair_punctuation(str(clothing or "").strip().rstrip("."))
if not clothing:
return ""
lower = clothing.lower()
if lower.startswith(("fully nude", "nude")):
if needs_lower_access:
return "POV foreground body cue: the viewer's bare hips, thighs, hands, and penis are visible only as first-person body cues"
return "POV foreground body cue: the viewer's bare hands, forearms, or torso edge are visible only as first-person body cues"
clothing = re.sub(r"^(?:wears|wearing|keeps|has|with)\s+", "", clothing, flags=re.IGNORECASE).strip()
if needs_lower_access:
return (
f"POV foreground clothing cue: {clothing}, visible only as the viewer's hands, hips, thighs, or lowered waistband"
)
return (
f"POV foreground clothing cue: {clothing}, visible only as the viewer's hands, forearms, sleeves, or torso edge"
)
def pov_hardcore_clothing_entries(
label_map: dict[str, dict[str, Any]],
pov_labels: list[str] | None,
rng: Any,
needs_lower_access: bool,
choose: Callable[[Any, list[str]], str],
slot_hardcore_clothing: Callable[[dict[str, Any] | None, Any], str] | None = None,
) -> list[str]:
entries: list[str] = []
pool = INSTA_OF_HARDCORE_MEN_CLOTHING_LOWER_ACCESS if needs_lower_access else INSTA_OF_HARDCORE_MEN_CLOTHING_VISIBLE
for label in pov_labels or []:
slot = label_map.get(label)
clothing = slot_hardcore_clothing(slot, rng) if slot_hardcore_clothing is not None else ""
if not clothing:
clothing = choose(rng, pool)
sentence = _pov_clothing_sentence(clothing, needs_lower_access)
if sentence:
entries.append(sentence)
return entries
@dataclass(frozen=True)
class HardcorePairClothingRoute:
access_flags: dict[str, bool]
woman_access: str
pov_hardcore_clothing: list[str]
default_man_hardcore_clothing: list[str]
hardcore_clothing_state: str
hardcore_clothing_sentence: str
@@ -450,6 +491,7 @@ class HardcorePairClothingRoute:
return {
"access_flags": dict(self.access_flags),
"woman_access": self.woman_access,
"pov_hardcore_clothing": list(self.pov_hardcore_clothing),
"default_man_hardcore_clothing": list(self.default_man_hardcore_clothing),
"hardcore_clothing_state": self.hardcore_clothing_state,
"hardcore_clothing_sentence": self.hardcore_clothing_sentence,
@@ -468,9 +510,19 @@ def resolve_hardcore_pair_clothing_result(
rng: Any,
continuity_map: dict[str, str],
choose: Callable[[Any, list[str]], str],
label_map: dict[str, dict[str, Any]] | None = None,
slot_hardcore_clothing: Callable[[dict[str, Any] | None, Any], str] | None = None,
) -> HardcorePairClothingRoute:
access_flags = hardcore_row_access_flags(hard_row)
woman_access = "lower" if access_flags["woman_lower"] else "upper" if access_flags["woman_upper"] else ""
pov_entries = pov_hardcore_clothing_entries(
label_map or {},
pov_labels,
rng,
access_flags["man_lower"],
choose,
slot_hardcore_clothing,
)
default_man_entries = default_man_hardcore_clothing_entries(
men_count,
pov_labels,
@@ -491,6 +543,7 @@ def resolve_hardcore_pair_clothing_result(
for part in (
fallback_state,
*character_hardcore_clothing_entries,
*pov_entries,
*default_man_entries,
)
if str(part or "").strip()
@@ -510,6 +563,7 @@ def resolve_hardcore_pair_clothing_result(
return HardcorePairClothingRoute(
access_flags=access_flags,
woman_access=woman_access,
pov_hardcore_clothing=pov_entries,
default_man_hardcore_clothing=default_man_entries,
hardcore_clothing_state=hard_clothing_state,
hardcore_clothing_sentence=f"{hard_clothing_state}. " if hard_clothing_state else "",
@@ -531,6 +585,8 @@ def resolve_hardcore_pair_clothing(
rng: Any,
continuity_map: dict[str, str],
choose: Callable[[Any, list[str]], str],
label_map: dict[str, dict[str, Any]] | None = None,
slot_hardcore_clothing: Callable[[dict[str, Any] | None, Any], str] | None = None,
) -> dict[str, Any]:
return resolve_hardcore_pair_clothing_result(
hard_row=hard_row,
@@ -542,4 +598,6 @@ def resolve_hardcore_pair_clothing(
rng=rng,
continuity_map=continuity_map,
choose=choose,
label_map=label_map,
slot_hardcore_clothing=slot_hardcore_clothing,
).as_dict()