-
Notifications
You must be signed in to change notification settings - Fork 0
/
ItemImport.example1
232 lines (210 loc) · 7.4 KB
/
ItemImport.example1
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
using System.Collections.Generic;
using HouseCS.Items;
using HouseCS.Items.Clothes;
using HouseCS.Items.Containers;
namespace HouseCS {
/// <summary>
/// ItemImport, stores all items, floors, and houses
/// </summary>
public class ItemImport {
/// <summary>
/// List of room names on floors in houses
/// </summary>
public static readonly List<List<List<string>>> roomNames = new List<List<List<string>>>() {
new List<List<string>>() {
new List<string>() {"Kitchen", "Dining Room", "Family Room", "Laundry Room", "Garage"},
new List<string>() {"Master Bedroom", "Office", "Game Room", "Master Bathroom"},
}, //Floor 0 and 1 of House 0
new List<List<string>>() {
new List<string>() {"Room"},
new List<string>() {"Room"},
new List<string>() {"Room"},
} //3 Floors of House 1
};
/// <summary>
/// Bookshelfs in the program
/// </summary>
public static readonly Bookshelf[] bookshelfs = {
new Bookshelf(new List<Book>() {
new Book("The Hobbit", "J.R.R. Tolkien", 1937) //Classic story, "The Hobbit"
}, string.Empty)
};
/// <summary>
/// Index of where bookshelfs are located
/// </summary>
public static readonly int[,] bookshelfsHFR =
{
{ 0 }, //The bookshelf is in House 0
{ 1 }, //On floor 1
{ 0 }, //and in room 0 (Master Bedroom)
};
/// <summary>
/// Computers in the program
/// </summary>
public static readonly Computer[] computers = {
new Computer("Tandy", "1000", "TL/2", false, "Desktop", "Tandy") //Nice vintage PC running on an Intel 80286
};
/// <summary>
/// Index of where computers are located
/// </summary>
public static readonly int[,] computersHFR =
{
{ 0 }, //The old PC is in House 0
{ 1 }, //On floor 1
{-1 }, //In the hall
};
/// <summary>
/// Consoles in the program
/// </summary>
public static readonly GameConsole[] consoles = {
new GameConsole(0, "Nintendo", "Wii U", "Wii U"), //console 0
new GameConsole(0, "Microsoft", "Xbox 360", "Xbox"), //console 1
new GameConsole(1, "Nintendo", "New 3DS XL", "n3ds") //console 2
}; //3 consoles in room 2 (Game Room)
/// <summary>
/// Index of where consoles are located
/// </summary>
public static readonly int[,] consolesHFR =
{
{ 0, 0, 0 }, //All consoles in House 0
{ 1, 1, 1 }, //On floor 1
{ 2, 2, 2 }, //And in room 2 (game room)
};
/// <summary>
/// Displays in the program
/// </summary>
public static readonly Display[] displays = {
new Display(true, new List<IItem>() { //a 24" monitor...
computers[0] //...with the old PC attached to it
}, 24, "Widescreen Monitor")
};
/// <summary>
/// Index of where displays are located
/// </summary>
public static readonly int[,] displaysHFR =
{
{ 0 }, //The monitor is in House 0
{ 1 }, //On floor 1
{ 2 }, //And in the game room once again
};
/// <summary>
/// Beds in the program
/// </summary>
public static readonly Bed[] beds = {
new Bed(false, 2, string.Empty) //standard bed
};
/// <summary>
/// Index of where beds are located
/// </summary>
public static readonly int[,] bedsHFR =
{
{ 0 }, //House 0
{ 1 }, //Floor 1
{ 0 }, //Room 0 (I hope you're starting to get it now)
};
/// <summary>
/// Containers in the program
/// </summary>
public static readonly Container[] containers = {
new Container(),
new Container(), //2 generic empty containers
};
/// <summary>
/// Index of where containers are located
/// </summary>
public static readonly int[,] containersHFR =
{
{ 0, 0 }, //House 0
{ 0, 0 }, //Floor 0
{-1, -1 }, //Room -1 (hall)
};
/// <summary>
/// Fridges in the program
/// </summary>
public static readonly Fridge[] fridges = {
new Fridge(new List<IItem>() {//fridges with books (ya know, a normal fridge)
new Book("One", "Two", 3),
new Book("Four", "Five", 6),
}, false, string.Empty), //a fridge in the kitchen... where it belongs
new Fridge(new List<IItem>() {
new Book("Seven", "Eight", 9),
}, false, "Old Fridge"),
};
/// <summary>
/// Index of where fridges are located
/// </summary>
public static readonly int[,] fridgesHFR =
{
{ 0, 0 }, //House 0
{ 0, 0 }, //Floor 0
{ 0, 4 }, //Room 0 (Kitchen), and Room 4 (Garage)
};
/// <summary>
/// Dressers in the program
/// </summary>
public static readonly Dresser[] dressers = {
new Dresser(new List<IItem>() { //clothes dressers
new Shirt("Red"),
new Pants("Blue"),
new Pants("Black")
}, string.Empty),
new Dresser(new List<IItem>() {
new Pants("Black")
}, string.Empty),
};
/// <summary>
/// Index of where dressers are located
/// </summary>
public static readonly int[,] dressersHFR =
{
{ 0, 0 }, //House 0
{ 1, 1 }, //Floor 1
{ 0, 0 }, //Room 0
};
/// <summary>
/// Tables in the program
/// </summary>
public static readonly Table[] tables = {
new Table(new List<IItem>() { //a table full of retro goodness
new GameConsole(0, "Atari", "VCS 2600"),
new GameConsole(0, "Nintendo", "NES"),
new GameConsole(0, "Sega", "Genesis")
}, "Game Table")
};
/// <summary>
/// Index of where tables are located
/// </summary>
public static readonly int[,] tablesHFR =
{
{ 0 }, //House 0
{ 1 }, //Floor 1
{ 2 }, //Room 2
};
//the above doesn't actually matter, because you don't have to do it that way, that's just the weird way I do it
/// <summary>
/// Houses in the program
/// </summary>
public static List<House> houses = new List<House>()
{
new House(5, roomNames[0].Count, false, 0, 28, 193, 1), //Would be at 19300 NW 28th St
new House(6, roomNames[1].Count, true, 0, 80, 68, 2), //Would be at 6800 SW 80th Ave
}; //this is required (though it can be an empty constructor if you wish)
/// <summary>
/// Item (house/floor) initializer
/// </summary>
public static void InitializeItems() { //this method is required, though it doesn't actually need to do anything if you define all the items in the variable from the start, however I will eventually use this method to add a "reset" functionality
for (int h = 0; h < houses.Count; h++) //this abomination adds the room names to the floors of the houses
for (int f = 0; f < houses[h].Floors.Count; f++)
houses[h].Floors[f] = new Floor(roomNames[h][f]);
for (int i = 0; i < bookshelfs.Length; i++) houses[bookshelfsHFR[0, i]].AddItem(bookshelfsHFR[1, i], bookshelfs[i], bookshelfsHFR[2, i]);
for (int i = 0; i < computers.Length; i++) houses[computersHFR[0, i]].AddItem(computersHFR[1, i], computers[i], computersHFR[2, i]);
for (int i = 0; i < consoles.Length; i++) houses[consolesHFR[0, i]].AddItem(consolesHFR[1, i], consoles[i], consolesHFR[2, i]);
for (int i = 0; i < displays.Length; i++) houses[displaysHFR[0, i]].AddItem(displaysHFR[1, i], displays[i], displaysHFR[2, i]);
for (int i = 0; i < beds.Length; i++) houses[bedsHFR[0, i]].AddItem(bedsHFR[1, i], beds[i], bedsHFR[2, i]);
for (int i = 0; i < containers.Length; i++) houses[containersHFR[0, i]].AddItem(containersHFR[1, i], containers[i], containersHFR[2, i]);
for (int i = 0; i < fridges.Length; i++) houses[fridgesHFR[0, i]].AddItem(fridgesHFR[1, i], fridges[i], fridgesHFR[2, i]);
for (int i = 0; i < dressers.Length; i++) houses[dressersHFR[0, i]].AddItem(dressersHFR[1, i], dressers[i], dressersHFR[2, i]);
for (int i = 0; i < tables.Length; i++) houses[tablesHFR[0, i]].AddItem(tablesHFR[1, i], tables[i], tablesHFR[2, i]);
}
}
}