This commit is contained in:
2026-02-21 09:11:12 +01:00
parent d758bbd62c
commit 6e475a7806
3 changed files with 40 additions and 2 deletions

View File

@@ -24,6 +24,7 @@
characterData.NegativeQualities ??= [];
characterData.PysicalCondition ??= Defaults.PysicalCondition
characterData.StunCondition ??= Defaults.StunCondition
characterData.Inventory ??= {};
characterData.Notes ??= {};
let selectedDate : any = null // YYYY-MM-DD format
@@ -371,7 +372,7 @@
<th>Notes</th>
<th>Page</th>
<th></th>
<th></th> <!-- for remove button -->
<th></th>
</tr>
</thead>
<tbody>
@@ -399,7 +400,7 @@
<th>Quality</th>
<th>Page</th>
<th></th>
<th></th> <!-- for remove button -->
<th></th>
</tr>
</thead>
<tbody>
@@ -474,6 +475,34 @@
</tbody>
</table>
<h3>Inventory</h3>
<table>
<thead>
<tr>
<th>Item</th>
<th>Quantity</th>
<th>Notes</th>
<th>Page</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
{#each characterData.Inventory as inventory, i}
<tr>
<td><input placeholder="Item" bind:value={characterData.Inventory[i].Item} /></td>
<td><input type="number" min=1 max=354 bind:value={characterData.NegativeQualities[i].Quantity} /></td>
<td><input placeholder="Notes" bind:value={characterData.NegativeQualities[i].Notes} /></td>
<td><input type="number" min=1 max=354 bind:value={characterData.Inventory[i].Page} /></td>
<td><button on:click={() => viewPage(characterData.Inventory[i].Page)}>View</button></td>
<td><button class="red-button" on:click={() => remove("Inventory", i)}>X</button></td>
</tr>
{/each}
</tbody>
</table>
<button on:click={() => add("Inventory")}>+</button>
<h2>Notes</h2>
<div class="notes-controls">
<select

View File

@@ -81,6 +81,13 @@ const Armor = {
Impact: 0
}
const Inventory = {
Item: "",
Quantity: 1,
Notes: "",
Page: 1
}
export const Defaults = {
Info: Info,
Attributes: Attributes,
@@ -95,6 +102,7 @@ export const Defaults = {
PysicalCondition : PysicalCondition,
StunCondition : StunCondition,
Armor : Armor,
Inventory : Inventory,
}

View File

@@ -24,6 +24,7 @@ namespace shadowrun {
PositiveQualities = 9,
NegativeQualities = 10,
Notes = 11,
Inventory = 12,
};
struct ShadowrunCharacter {