Adjust constructors a little
This commit is contained in:
parent
a112f790b3
commit
48ab92ea6f
|
@ -43,6 +43,7 @@ along with speciesgen. If not, see <https://www.gnu.org/licenses/>.
|
|||
namespace Starbound::Frames {
|
||||
class Grid {
|
||||
public:
|
||||
Grid() = delete;
|
||||
Grid(const std::vector<std::vector<std::optional<std::string>>>,
|
||||
const std::tuple<uint32_t, uint32_t> = {129, 129},
|
||||
const std::tuple<uint32_t, uint32_t> = {9, 6});
|
||||
|
@ -62,6 +63,7 @@ private:
|
|||
|
||||
class Frames {
|
||||
public:
|
||||
Frames() = delete;
|
||||
Frames(const std::unordered_map<std::string, std::string>, const Grid);
|
||||
std::unordered_map<std::string, std::string> GetAliases() const;
|
||||
Grid GetGrid() const;
|
||||
|
|
|
@ -53,8 +53,11 @@ enum class TooltipKind { Armor = 0 };
|
|||
|
||||
class Frames {
|
||||
public:
|
||||
Frames(const std::filesystem::path, const std::filesystem::path = "",
|
||||
const std::filesystem::path = "");
|
||||
Frames() = delete;
|
||||
Frames(const std::filesystem::path);
|
||||
Frames(const std::filesystem::path, const std::filesystem::path,
|
||||
const std::filesystem::path);
|
||||
|
||||
std::filesystem::path GetBody() const;
|
||||
std::filesystem::path GetBackSleeve() const;
|
||||
std::filesystem::path GetFrontSleeve() const;
|
||||
|
@ -72,8 +75,10 @@ private:
|
|||
class Item {
|
||||
public:
|
||||
Item() = default;
|
||||
Item(const std::string, const Rarity);
|
||||
Item(const std::string, const std::filesystem::path, const Category,
|
||||
const std::string, const std::string, const Frames, const Frames);
|
||||
|
||||
std::string GetItemName() const;
|
||||
uint32_t GetPrice() const;
|
||||
std::filesystem::path GetInventoryIcon() const;
|
||||
|
|
|
@ -26,6 +26,8 @@ namespace Starbound::Item {
|
|||
// Frames
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
Frames::Frames(const std::filesystem::path body) : m_body(body) {}
|
||||
|
||||
Frames::Frames(const std::filesystem::path body,
|
||||
const std::filesystem::path backSleeve,
|
||||
const std::filesystem::path frontSleeve)
|
||||
|
@ -51,12 +53,15 @@ void Frames::SetFrontSleeve(const std::filesystem::path frontSleeve) {
|
|||
// Item
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
Item::Item(const std::string itemName, const Rarity rarity)
|
||||
: m_itemName(itemName), m_price(0), m_maxStack(1), m_rarity(rarity) {}
|
||||
|
||||
Item::Item(const std::string itemName,
|
||||
const std::filesystem::path inventoryIcon, const Category category,
|
||||
const std::string description, const std::string shortDescription,
|
||||
const Frames maleFrames, const Frames femaleFrames)
|
||||
: m_itemName(itemName), m_price(0), m_inventoryIcon(inventoryIcon),
|
||||
m_maxStack(0), m_rarity(Rarity::Essential), m_category(category),
|
||||
m_maxStack(1), m_rarity(Rarity::Essential), m_category(category),
|
||||
m_description(description), m_shortDescription(shortDescription),
|
||||
m_tooltipKind(TooltipKind::Armor), m_maleFrames(maleFrames),
|
||||
m_femaleFrames(femaleFrames) {}
|
||||
|
|
|
@ -34,8 +34,7 @@ WeightStageSub::WeightStageSub(const std::string name,
|
|||
m_descriptionChest(descriptionChest), m_typeChest(typeChest) {}
|
||||
|
||||
WeightStageSub::WeightStageSub(const std::string name)
|
||||
: m_name(name), m_friendlyName(""), m_descriptionChest(""),
|
||||
m_typeChest(Types::Chests::Chest) {}
|
||||
: m_name(name), m_typeChest(Types::Chests::Chest) {}
|
||||
|
||||
WeightStageSub::WeightStageSub(const Types::Subs type,
|
||||
const std::string descriptionChest)
|
||||
|
@ -82,8 +81,8 @@ WeightStage::WeightStage(const std::string name, const std::string friendlyName,
|
|||
|
||||
WeightStage::WeightStage(const std::string name, const bool frames,
|
||||
const bool id, const std::vector<WeightStageSub> subs)
|
||||
: WeightStageSub(name), m_descriptionLeg(""), m_typeLeg(Types::Legs::Legs),
|
||||
m_frames(frames), m_id(id), m_subs(subs) {}
|
||||
: WeightStageSub(name), m_typeLeg(Types::Legs::Legs), m_frames(frames),
|
||||
m_id(id), m_subs(subs) {}
|
||||
|
||||
std::string WeightStage::GetLegDescription() const { return m_descriptionLeg; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue