Add scene fragments to portrait prompts after clothing.

Thing, room, yard and climate precipitation can contribute a short prompt when they are in frame, with a budget so chairs stay silent.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-20 23:35:17 +03:00
co-authored by Cursor
parent f046f145ec
commit 3c682a2b74
26 changed files with 1020 additions and 26 deletions
@@ -1,4 +1,5 @@
using Arch.Core;
using HSchool.Ai;
using HSchool.Content;
using HSchool.People;
using HSchool.Server.Api;
@@ -20,6 +21,9 @@ internal static partial class PersonCardReader
private static readonly QueryDescription IdentityAndActivity =
new QueryDescription().WithAll<PersonIdentity, PersonActivity>();
private static readonly QueryDescription IdentityAndPresence =
new QueryDescription().WithAll<PersonIdentity, Presence>();
public static PersonCardResponse? Read(School school, string personId, string locale)
{
var roster = school.Roster;
@@ -136,4 +140,18 @@ internal static partial class PersonCardReader
});
return found;
}
public static string? NodeId(School school, string personId)
{
string? found = null;
var query = IdentityAndPresence;
school.World.Query(in query, (ref PersonIdentity identity, ref Presence presence) =>
{
if (identity.Id.Equals(personId, StringComparison.Ordinal))
{
found = presence.NodeId;
}
});
return found;
}
}