fix: stream burden stats to overlord

This commit is contained in:
Erik 2026-03-13 11:10:04 +01:00
parent 0fbd100b7b
commit 3bcd7d9e49
2 changed files with 9 additions and 0 deletions

View file

@ -6,6 +6,8 @@ using Decal.Adapter;
using Decal.Adapter.Wrappers; using Decal.Adapter.Wrappers;
using Newtonsoft.Json; using Newtonsoft.Json;
using Mag.Shared.Constants;
namespace MosswartMassacre namespace MosswartMassacre
{ {
public struct AllegianceInfoRecord public struct AllegianceInfoRecord
@ -341,6 +343,10 @@ namespace MosswartMassacre
} }
// --- Build payload --- // --- Build payload ---
int effectiveStrength = cf.EffectiveAttribute[CharFilterAttributeType.Strength];
int carryingCapacityAugs = cf.GetCharProperty((int)IntValueKey.AugmentationIncreasedCarryingCapacity);
int encumbranceCapacity = (150 * effectiveStrength) + (carryingCapacityAugs * 30 * effectiveStrength);
var payload = new var payload = new
{ {
type = "character_stats", type = "character_stats",
@ -354,6 +360,9 @@ namespace MosswartMassacre
unassigned_xp = cf.UnassignedXP, unassigned_xp = cf.UnassignedXP,
skill_credits = cf.SkillPoints, skill_credits = cf.SkillPoints,
deaths = cf.Deaths, deaths = cf.Deaths,
burden = cf.Burden,
burden_units = cf.BurdenUnits,
encumbrance_capacity = encumbranceCapacity,
luminance_earned = luminanceEarned >= 0 ? (long?)luminanceEarned : null, luminance_earned = luminanceEarned >= 0 ? (long?)luminanceEarned : null,
luminance_total = luminanceTotal >= 0 ? (long?)luminanceTotal : null, luminance_total = luminanceTotal >= 0 ? (long?)luminanceTotal : null,
current_title = currentTitle >= 0 ? (int?)currentTitle : null, current_title = currentTitle >= 0 ? (int?)currentTitle : null,