-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTradeMenu.cs
More file actions
61 lines (44 loc) · 1.12 KB
/
Copy pathTradeMenu.cs
File metadata and controls
61 lines (44 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
using Godot;
using System;
public partial class TradeMenu : Control
{
Godot.Collections.Array<InventoryItem> PlayerInvItems;
Godot.Collections.Array<InventoryItem> TradeComponentInvItems;
[Export]
Control PlayerTradeContainer;
[Export]
Control TradeComponentContainer;
public override void _Ready()
{
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
}
public TradeMenu()
{
}
public void PopulateList(Godot.Collections.Array<InventoryItem> list, Inventory inventory)
{
list.Clear();
foreach (EquipInvSlot slot in inventory.EquippedSlotList)
{
InventoryItem item = slot.ItemInSlot;
if (item == null) { continue; }
list.Add(item);
}
foreach (Godot.Collections.Array<InventoryItem> subarray in inventory.InventorySpace)
{
foreach (InventoryItem inv_item in subarray)
{
InventoryItem item = inv_item;
if (item == null) { continue; }
list.Add(item);
}
}
//Will need to add clothing once that is implemented
}
public void PopulateUIContainer(Control TradeContainer)
{
}
}