feat(train): a weight vest among the equipment (ADR 0034, D7)
All checks were successful
CI / check (push) Successful in 45m21s
CI / deploy (push) Successful in 1m1s

A vest keeps its weight and, if adjustable, how far it goes. At a place
that has one, a set of bodyweight work offers it beside the weight, a
tap writing its weight in.

Whats-New: Add a weight vest to your equipment, and put its weight on a bodyweight set with a tap.
Whats-New-De: Trage eine Gewichtsweste bei deiner Ausrüstung ein und übernimm ihr Gewicht mit einem Tipp in einen Satz mit Körpergewicht.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-11-05 16:47:23 +01:00
commit 011b144ba1
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -97,4 +97,33 @@ void main() {
expect(decodePlace(_bytes([1, 2])), isNull);
expect(decodePlace(ByteData(0)), isNull);
});
test('a weight vest keeps its weight, and how far an adjustable one goes '
'(ADR 0034, D7)', () {
const place = PlaceContent(
name: 'Home',
items: [
EquipmentItem(
kind: EquipmentKind.weightVest,
grams: 6000,
gramsUpTo: 10000,
),
EquipmentItem(kind: EquipmentKind.weightVest, grams: 8000),
],
);
expect(decodePlace(encodePlace(place)), place);
});
test("an upper weight that isn't above the vest's weight is left out", () {
final place = decodePlace(
_bytes({
'schemaVersion': 1,
'name': 'Home',
'items': [
{'kind': 'weightVest', 'count': 1, 'grams': 8000, 'gramsUpTo': 8000},
],
}),
);
expect(place!.items.single.gramsUpTo, isNull);
});
}