Skip to content

Commit

Permalink
actually, using paths is dumb here when they're already char strings.…
Browse files Browse the repository at this point in the history
… why bother? silly me.
  • Loading branch information
jadebenn committed Apr 23, 2024
1 parent 16412eb commit d8562a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#pragma once
#include "CDTable.h"

#include <filesystem>

/**
* Information for the minigame to be completed
*/
Expand All @@ -16,10 +14,10 @@ struct CDTamingBuildPuzzle {
UNUSED_COLUMN(LOT npcLot = LOT_NULL;)

// The .lxfml file that contains the bricks required to build the model
std::filesystem::path validPieces{};
std::string validPieces{};

// The .lxfml file that contains the bricks NOT required to build the model
UNUSED_COLUMN(std::filesystem::path invalidPieces{};)
UNUSED_COLUMN(std::string invalidPieces{};)

// Difficulty value
UNUSED_COLUMN(int32_t difficulty = 1;)
Expand All @@ -34,10 +32,10 @@ struct CDTamingBuildPuzzle {
UNUSED_COLUMN(int32_t totalNumPieces = 16;)

// Model name
UNUSED_COLUMN(std::filesystem::path modelName{};)
UNUSED_COLUMN(std::string modelName{};)

// The .lxfml file that contains the full model
UNUSED_COLUMN(std::filesystem::path fullModel{};)
UNUSED_COLUMN(std::string fullModel{};)

// The duration of the pet taming minigame
UNUSED_COLUMN(float duration = 45.0f;)
Expand Down
2 changes: 1 addition & 1 deletion dGame/dComponents/PetComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ void PetComponent::OnUse(Entity* originator) {
return;
}

const auto& bricks = BrickDatabase::GetBricks(entry.validPieces.string());
const auto& bricks = BrickDatabase::GetBricks(entry.validPieces);
if (bricks.empty()) {
ChatPackets::SendSystemMessage(originator->GetSystemAddress(), u"Failed to load the puzzle minigame for this pet.");
LOG("Couldn't find %s for minigame!", entry.validPieces.c_str());
Expand Down

0 comments on commit d8562a0

Please sign in to comment.