mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-25 19:02:19 -05:00
noUI placeholder
This commit is contained in:
parent
9e54c6d4ff
commit
8b0117bc58
@ -39,7 +39,7 @@ uint32_t giantLink;
|
|||||||
uint32_t minishLink;
|
uint32_t minishLink;
|
||||||
uint32_t gravityLevel;
|
uint32_t gravityLevel;
|
||||||
uint32_t resetLinkScale;
|
uint32_t resetLinkScale;
|
||||||
uint32_t noUi;
|
uint32_t noUI;
|
||||||
uint32_t invisibleLink;
|
uint32_t invisibleLink;
|
||||||
|
|
||||||
static bool ActorSpawnHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args) {
|
static bool ActorSpawnHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args) {
|
||||||
@ -468,6 +468,22 @@ static bool GravityHandler(std::shared_ptr<Ship::Console> Console, const std::ve
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Does not yet function
|
||||||
|
static bool NoUIHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args) {
|
||||||
|
if (args.size() != 2) {
|
||||||
|
SohImGui::console->SendErrorMessage("[SOH] Unexpected arguments passed");
|
||||||
|
return CMD_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
bool noUI = std::stoi(args[1], nullptr, 10) == 0 ? 0 : 1;
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
} catch (std::invalid_argument const& ex) {
|
||||||
|
SohImGui::console->SendErrorMessage("[SOH] NoUI value must be a number.");
|
||||||
|
return CMD_FAILED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#define VARTYPE_INTEGER 0
|
#define VARTYPE_INTEGER 0
|
||||||
#define VARTYPE_FLOAT 1
|
#define VARTYPE_FLOAT 1
|
||||||
#define VARTYPE_STRING 2
|
#define VARTYPE_STRING 2
|
||||||
@ -634,5 +650,9 @@ void DebugConsole_Init(void) {
|
|||||||
{ "value", Ship::ArgumentType::NUMBER }
|
{ "value", Ship::ArgumentType::NUMBER }
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
CMD_REGISTER("no_ui", { NoUIHandler, "Disable the UI.", {
|
||||||
|
{ "value", Ship::ArgumentType::NUMBER }
|
||||||
|
}});
|
||||||
|
|
||||||
CVar_Load();
|
CVar_Load();
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@ extern uint32_t giantLink;
|
|||||||
extern uint32_t minishLink;
|
extern uint32_t minishLink;
|
||||||
extern uint32_t gravityLevel;
|
extern uint32_t gravityLevel;
|
||||||
extern uint32_t resetLinkScale;
|
extern uint32_t resetLinkScale;
|
||||||
extern uint32_t noUi;
|
|
||||||
extern uint32_t invisibleLink;
|
extern uint32_t invisibleLink;
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -1562,7 +1562,7 @@ void RemoveEffect(const char* effectId) {
|
|||||||
gravityLevel = 1;
|
gravityLevel = 1;
|
||||||
return;
|
return;
|
||||||
} else if (strcmp(effectId, "no_ui") == 0) {
|
} else if (strcmp(effectId, "no_ui") == 0) {
|
||||||
noUi = 0;
|
noUI = 0;
|
||||||
return;
|
return;
|
||||||
} else if (strcmp(effectId, "invisible") == 0) {
|
} else if (strcmp(effectId, "invisible") == 0) {
|
||||||
invisibleLink = 0;
|
invisibleLink = 0;
|
||||||
@ -1670,7 +1670,7 @@ u8 ExecuteEffect(const char* effectId, uint32_t value) {
|
|||||||
Actor_Spawn(&gGlobalCtx->actorCtx, gGlobalCtx, ACTOR_EN_WALLMAS, player->actor.world.pos.x, player->actor.world.pos.y, player->actor.world.pos.z, 0, 0, 0, 0);
|
Actor_Spawn(&gGlobalCtx->actorCtx, gGlobalCtx, ACTOR_EN_WALLMAS, player->actor.world.pos.x, player->actor.world.pos.y, player->actor.world.pos.z, 0, 0, 0, 0);
|
||||||
return 1;
|
return 1;
|
||||||
} else if (strcmp(effectId, "no_ui") == 0) {
|
} else if (strcmp(effectId, "no_ui") == 0) {
|
||||||
noUi = 1;
|
noUI = 1;
|
||||||
return 1;
|
return 1;
|
||||||
} else if (strcmp(effectId, "invisible") == 0) {
|
} else if (strcmp(effectId, "invisible") == 0) {
|
||||||
invisibleLink = 1;
|
invisibleLink = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user