Skip to content

SusInventoryStats

SusInventoryStats

Weight row + modifier list — shell refreshes from InventoryModel / character stats after equip changes.

Package

SusGame · Inventory (commercial)

Open in Playground

SusGame · Inventory

Props

NameTypeDefault
CurrentWeightProp<float>-1fv-model
MaxWeightProp<float>100fv-model

Slots

No slots.

Events

No public events.

Style hooks

USS class contract — override appearance without touching C#. States toggle via these classes:

  • sus-inventory-stats
  • sus-inventory-stats__mod-name
  • sus-inventory-stats__mod-row
  • sus-inventory-stats__mod-value
  • sus-inventory-stats__modifiers
  • sus-inventory-stats__weight-label
  • sus-inventory-stats__weight-label--over
  • sus-inventory-stats__weight-label--warn
  • sus-inventory-stats__weight-row

Usage

Prefer parent SusInventory — it owns weight + modifiers. Standalone:

csharp
var stats = new SusInventoryStats();
stats.CurrentWeight.Value = 12.5f; // < 0 hides the weight row
stats.MaxWeight.Value = 100f;
stats.Modifiers = new List<ModifierInstance> { /* … */ };
stats.RefreshModifiers();
xml
<template>
  <sus:SusInventoryStats :CurrentWeight="Cur.Value"
                         :MaxWeight="Max.Value" />
</template>

<script>
public Prop<float> Cur = new(12.5f);
public Prop<float> Max = new(100f);
// Modifiers list + RefreshModifiers() from C# after mount.
</script>
Prop / APIRole
CurrentWeightDisplay kg; < 0 hides the weight row
MaxWeightCap for warn / over USS classes
ModifiersList<ModifierInstance> (not a Prop)
RefreshModifiers()Rebuild modifier rows from Modifiers

Notes

  • Warn at ≥ 90% of max; over-weight uses --over class on the label.
  • Shell sets MaxWeight from model stats / SusInventorySystemParams on Configure.
  • Modifier rows show StatName + signed value from mod.Def.