-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nelonn
committed
Dec 10, 2023
1 parent
c2ab95d
commit 2acbf86
Showing
11 changed files
with
149 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,5 +25,8 @@ | |
"pane", | ||
"pipe", | ||
"lightbulb" | ||
], | ||
"items": [ | ||
"stone" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include "Item.h" | ||
|
||
#include <utility> | ||
|
||
Item::Item(std::string name) { | ||
this->name = std::move(name); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef ITEM_H_ | ||
#define ITEM_H_ | ||
|
||
#include <string> | ||
#include "../typedefs.h" | ||
|
||
class Item { | ||
public: | ||
std::string name; | ||
|
||
// TODO: item properties | ||
|
||
struct { | ||
itemid_t id; | ||
} rt; | ||
|
||
explicit Item(std::string name); | ||
}; | ||
|
||
|
||
#endif //ITEM_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include "ItemStack.h" | ||
|
||
ItemStack::ItemStack(Item *item, int count) { | ||
this->item = item; | ||
this->count = count; | ||
} | ||
|
||
ItemStack::ItemStack(Item *item) : ItemStack(item, 1) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef ITEMSTACK_H_ | ||
#define ITEMSTACK_H_ | ||
|
||
#include <string> | ||
|
||
class Item; | ||
|
||
class ItemStack { | ||
public: | ||
Item* item; | ||
int count; | ||
|
||
ItemStack(Item* item, int count); | ||
explicit ItemStack(Item* item); | ||
}; | ||
|
||
|
||
#endif //ITEMSTACK_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters