mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-19 13:00:11 -07:00
Update after dev merge
This commit is contained in:
parent
eec5a9e7f8
commit
a6b2d6c3ce
3 changed files with 26 additions and 21 deletions
|
@ -537,10 +537,10 @@ GameInteractionEffectQueryResult GameInteractor::RawAction::SpawnEnemyWithOffset
|
||||||
if (actor == NULL) {
|
if (actor == NULL) {
|
||||||
return GameInteractionEffectQueryResult::TemporarilyNotPossible;
|
return GameInteractionEffectQueryResult::TemporarilyNotPossible;
|
||||||
}
|
}
|
||||||
if (nameTag != "" && CVarGetInteger(CVAR_ENHANCEMENT("CrowdControl.EnemyNameTags"), 0)) {
|
if (nameTag != "" && CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("EnemyNameTags"), 0)) {
|
||||||
NameTag_RegisterForActor(actor, nameTag.c_str());
|
NameTag_RegisterForActor(actor, nameTag.c_str());
|
||||||
}
|
}
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("CrowdControl.SpawnedEnemiesIgnoredIngame"), 0)) {
|
if (CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("SpawnedEnemiesIgnoredIngame"), 0)) {
|
||||||
Actor_ChangeCategory(gPlayState, &gPlayState->actorCtx, actor, ACTORCAT_NPC);
|
Actor_ChangeCategory(gPlayState, &gPlayState->actorCtx, actor, ACTORCAT_NPC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -549,10 +549,10 @@ GameInteractionEffectQueryResult GameInteractor::RawAction::SpawnEnemyWithOffset
|
||||||
Actor* actor =
|
Actor* actor =
|
||||||
Actor_Spawn(&gPlayState->actorCtx, gPlayState, enemyId, pos.x, pos.y, pos.z, 0, 0, 0, enemyParams, 0);
|
Actor_Spawn(&gPlayState->actorCtx, gPlayState, enemyId, pos.x, pos.y, pos.z, 0, 0, 0, enemyParams, 0);
|
||||||
if (actor != NULL) {
|
if (actor != NULL) {
|
||||||
if (nameTag != "" && CVarGetInteger(CVAR_ENHANCEMENT("CrowdControl.EnemyNameTags"), 0)) {
|
if (nameTag != "" && CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("EnemyNameTags"), 0)) {
|
||||||
NameTag_RegisterForActor(actor, nameTag.c_str());
|
NameTag_RegisterForActor(actor, nameTag.c_str());
|
||||||
}
|
}
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("CrowdControl.SpawnedEnemiesIgnoredIngame"), 0)) {
|
if (CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("SpawnedEnemiesIgnoredIngame"), 0)) {
|
||||||
Actor_ChangeCategory(gPlayState, &gPlayState->actorCtx, actor, ACTORCAT_NPC);
|
Actor_ChangeCategory(gPlayState, &gPlayState->actorCtx, actor, ACTORCAT_NPC);
|
||||||
}
|
}
|
||||||
return GameInteractionEffectQueryResult::Possible;
|
return GameInteractionEffectQueryResult::Possible;
|
||||||
|
@ -580,7 +580,7 @@ GameInteractionEffectQueryResult GameInteractor::RawAction::SpawnActor(uint32_t
|
||||||
return GameInteractionEffectQueryResult::TemporarilyNotPossible;
|
return GameInteractionEffectQueryResult::TemporarilyNotPossible;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nameTag != "" && CVarGetInteger(CVAR_ENHANCEMENT("CrowdControl.EnemyNameTags"), 0)) {
|
if (nameTag != "" && CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("EnemyNameTags"), 0)) {
|
||||||
NameTag_RegisterForActor((Actor*)cucco, nameTag.c_str());
|
NameTag_RegisterForActor((Actor*)cucco, nameTag.c_str());
|
||||||
}
|
}
|
||||||
cucco->actionFunc = func_80AB70A0_nocutscene;
|
cucco->actionFunc = func_80AB70A0_nocutscene;
|
||||||
|
@ -605,10 +605,10 @@ GameInteractionEffectQueryResult GameInteractor::RawAction::SpawnActor(uint32_t
|
||||||
Actor* actor = Actor_Spawn(&gPlayState->actorCtx, gPlayState, actorId, player->actor.world.pos.x,
|
Actor* actor = Actor_Spawn(&gPlayState->actorCtx, gPlayState, actorId, player->actor.world.pos.x,
|
||||||
player->actor.world.pos.y, player->actor.world.pos.z, 0, 0, 0, actorParams, 0);
|
player->actor.world.pos.y, player->actor.world.pos.z, 0, 0, 0, actorParams, 0);
|
||||||
if (actor != NULL) {
|
if (actor != NULL) {
|
||||||
if (nameTag != "" && CVarGetInteger(CVAR_ENHANCEMENT("CrowdControl.EnemyNameTags"), 0)) {
|
if (nameTag != "" && CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("EnemyNameTags"), 0)) {
|
||||||
NameTag_RegisterForActor((Actor*)actor, nameTag.c_str());
|
NameTag_RegisterForActor((Actor*)actor, nameTag.c_str());
|
||||||
}
|
}
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("CrowdControl.SpawnedEnemiesIgnoredIngame"), 0)) {
|
if (CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("SpawnedEnemiesIgnoredIngame"), 0)) {
|
||||||
Actor_ChangeCategory(gPlayState, &gPlayState->actorCtx, actor, ACTORCAT_NPC);
|
Actor_ChangeCategory(gPlayState, &gPlayState->actorCtx, actor, ACTORCAT_NPC);
|
||||||
}
|
}
|
||||||
return GameInteractionEffectQueryResult::Possible;
|
return GameInteractionEffectQueryResult::Possible;
|
||||||
|
|
|
@ -96,21 +96,15 @@ void SohMenu::AddMenuNetwork() {
|
||||||
AddSidebarEntry("Network", path.sidebarName, 3);
|
AddSidebarEntry("Network", path.sidebarName, 3);
|
||||||
path.column = SECTION_COLUMN_1;
|
path.column = SECTION_COLUMN_1;
|
||||||
|
|
||||||
|
AddWidget(path, "About Crowd Control", WIDGET_SEPARATOR_TEXT);
|
||||||
AddWidget(path,
|
AddWidget(path,
|
||||||
"Crowd Control is a platform that allows viewers to interact "
|
"Crowd Control is a platform that allows viewers to interact "
|
||||||
"with a streamer's game in real time.\n"
|
"with a streamer's game in real time.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Click the question mark to copy the link to the Crowd Control "
|
"Please head over to www.crowdcontrol.live for more information!",
|
||||||
"website to your clipboard.",
|
|
||||||
WIDGET_TEXT);
|
WIDGET_TEXT);
|
||||||
AddWidget(path, ICON_FA_CLIPBOARD "##CrowdControl", WIDGET_BUTTON)
|
|
||||||
.Callback([](WidgetInfo& info) {
|
AddWidget(path, "Connect to Crowd Control", WIDGET_SEPARATOR_TEXT);
|
||||||
ImGui::SetClipboardText("https://crowdcontrol.live");
|
|
||||||
Notification::Emit({
|
|
||||||
.message = "Copied to clipboard",
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.Options(ButtonOptions().Tooltip("https://crowdcontrol.live"));
|
|
||||||
AddWidget(path, "Host & Port", WIDGET_CUSTOM).CustomFunction([](WidgetInfo& info) {
|
AddWidget(path, "Host & Port", WIDGET_CUSTOM).CustomFunction([](WidgetInfo& info) {
|
||||||
ImGui::BeginDisabled(CrowdControl::Instance->isEnabled || CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
|
ImGui::BeginDisabled(CrowdControl::Instance->isEnabled || CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
|
||||||
ImGui::Text("%s", info.name.c_str());
|
ImGui::Text("%s", info.name.c_str());
|
||||||
|
@ -155,14 +149,25 @@ void SohMenu::AddMenuNetwork() {
|
||||||
CrowdControl::Instance->Enable();
|
CrowdControl::Instance->Enable();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
AddWidget(path, "Connecting...##CrowdControl", WIDGET_TEXT).PreFunc([](WidgetInfo& info) {
|
AddWidget(path, "Connecting...", WIDGET_TEXT).PreFunc([](WidgetInfo& info) {
|
||||||
info.isHidden = !CrowdControl::Instance->isEnabled;
|
info.isHidden = !CrowdControl::Instance->isEnabled;
|
||||||
if (CrowdControl::Instance->isConnected) {
|
if (CrowdControl::Instance->isConnected) {
|
||||||
info.name = "Connected##CrowdControl";
|
info.name = "Connected";
|
||||||
} else {
|
} else {
|
||||||
info.name = "Connecting...##CrowdControl";
|
info.name = "Connecting...";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
AddWidget(path, "Additional Settings", WIDGET_SEPARATOR_TEXT);
|
||||||
|
AddWidget(path, "Enemy Name Tags", WIDGET_CVAR_CHECKBOX)
|
||||||
|
.CVar(CVAR_REMOTE_CROWD_CONTROL("EnemyNameTags"))
|
||||||
|
.RaceDisable(true)
|
||||||
|
.Options(CheckboxOptions().Tooltip(
|
||||||
|
"When viewers spawn enemies, the enemy will have a name tag above them with the viewer's name."));
|
||||||
|
AddWidget(path, "Spawned Enemies Ignored Ingame", WIDGET_CVAR_CHECKBOX)
|
||||||
|
.CVar(CVAR_REMOTE_CROWD_CONTROL("SpawnedEnemiesIgnoredIngame"))
|
||||||
|
.RaceDisable(true)
|
||||||
|
.Options(CheckboxOptions().Tooltip(
|
||||||
|
"Enemies spawned by CrowdControl won't be considered for \"clear enemy rooms\", so they don't need to be killed to complete these rooms."));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace SohGui
|
} // namespace SohGui
|
||||||
|
|
|
@ -60,7 +60,7 @@ void EnAttackNiw_Init(Actor* thisx, PlayState* play) {
|
||||||
this->actionFunc = func_809B5670;
|
this->actionFunc = func_809B5670;
|
||||||
|
|
||||||
if (CVarGetInteger("gCrowdControl", 0) &&
|
if (CVarGetInteger("gCrowdControl", 0) &&
|
||||||
CVarGetInteger(CVAR_ENHANCEMENT("CrowdControl.SpawnedEnemiesIgnoredIngame"), 0)) {
|
CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("SpawnedEnemiesIgnoredIngame"), 0)) {
|
||||||
Actor_ChangeCategory(gPlayState, &gPlayState->actorCtx, this, ACTORCAT_NPC);
|
Actor_ChangeCategory(gPlayState, &gPlayState->actorCtx, this, ACTORCAT_NPC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue