Skip to content

Commit 7cf3eee

Browse files
committed
Fix build
1 parent c46d392 commit 7cf3eee

File tree

5 files changed

+44
-43
lines changed

5 files changed

+44
-43
lines changed

createqmod.ps1

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,10 @@
11
Param(
2+
[String]$qmodname="",
23
[Parameter(Mandatory=$false)]
3-
[String] $qmodName="",
4-
5-
[Parameter(Mandatory=$false)]
6-
[Switch] $help
4+
[Switch]$clean
75
)
86

9-
if ($help -eq $true) {
10-
Write-Output "`"createqmod`" - Creates a .qmod file with your compiled libraries and mod.json."
11-
Write-Output "`n-- Arguments --`n"
12-
13-
Write-Output "-QmodName `t The file name of your qmod"
14-
15-
exit
16-
}
17-
187
$mod = "./mod.json"
19-
20-
& $PSScriptRoot/validate-modjson.ps1
21-
if ($LASTEXITCODE -ne 0) {
22-
exit $LASTEXITCODE
23-
}
248
$modJson = Get-Content $mod -Raw | ConvertFrom-Json
259

2610
if ($qmodName -eq "") {
@@ -30,8 +14,11 @@ if ($qmodName -eq "") {
3014
$filelist = @($mod)
3115

3216
$cover = "./" + $modJson.coverImage
33-
if ((-not ($cover -eq "./")) -and (Test-Path $cover)) {
34-
$filelist += ,$cover
17+
$fileList = @($mod)
18+
19+
if ((-not ($cover -eq "./")) -and (Test-Path $cover))
20+
{
21+
$fileList += ,$cover
3522
}
3623

3724
foreach ($mod in $modJson.modFiles) {
@@ -61,5 +48,14 @@ foreach ($lib in $modJson.libraryFiles) {
6148
$zip = $qmodName + ".zip"
6249
$qmod = $qmodName + ".qmod"
6350

51+
if ($clean.IsPresent) {
52+
echo "Making Clean Qmod"
53+
}
54+
55+
if ((-not ($clean.IsPresent)) -and (Test-Path $qmod))
56+
{
57+
Move-Item $qmod $zip -Force
58+
}
59+
6460
Compress-Archive -Path $filelist -DestinationPath $zip -Update
65-
Move-Item $zip $qmod -Force
61+
Move-Item $zip $qmod -Force

shared/NTConfig.hpp

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66

77
namespace QBeatSaberPlus_NoteTweaker {
88

9-
using namespace UnityEngine;
9+
namespace _u
10+
{
11+
using namespace UnityEngine;
12+
}
1013

1114
class NTConfig : public CP_SDK::Config::JsonConfig
1215
{
@@ -17,30 +20,30 @@ namespace QBeatSaberPlus_NoteTweaker {
1720
{
1821
std::u16string Name = u"New profile";
1922

20-
float NotesScale = 0.9f;
21-
bool NotesShowPrecisonDots = true;
22-
float NotesPrecisonDotsScale = 0.40f;
23+
float NotesScale = 0.9f;
24+
bool NotesShowPrecisonDots = true;
25+
float NotesPrecisonDotsScale = 0.40f;
2326

24-
float ArrowsScale = 1.0f;
25-
float ArrowsIntensity = 1.0f;
26-
bool ArrowsOverrideColors = false;
27-
Color ArrowsLColor = Color(0.12f, 0.75f, 1.00f, 1.00f);
28-
Color ArrowsRColor = Color(0.12f, 0.75f, 1.00f, 1.00f);
27+
float ArrowsScale = 1.0f;
28+
float ArrowsIntensity = 1.0f;
29+
bool ArrowsOverrideColors = false;
30+
_u::Color ArrowsLColor = _u::Color(0.12f, 0.75f, 1.00f, 1.00f);
31+
_u::Color ArrowsRColor = _u::Color(0.12f, 0.75f, 1.00f, 1.00f);
2932

30-
float DotsScale = 0.85f;
31-
float DotsIntensity = 1.0f;
32-
bool DotsOverrideColors = false;
33-
Color DotsLColor = Color(0.12f, 0.75f, 1.00f, 1.00f);
34-
Color DotsRColor = Color(0.12f, 0.75f, 1.00f, 1.00f);
33+
float DotsScale = 0.85f;
34+
float DotsIntensity = 1.0f;
35+
bool DotsOverrideColors = false;
36+
_u::Color DotsLColor = _u::Color(0.12f, 0.75f, 1.00f, 1.00f);
37+
_u::Color DotsRColor = _u::Color(0.12f, 0.75f, 1.00f, 1.00f);
3538

36-
float BombsScale = 1.0f;
37-
bool BombsOverrideColor = false;
38-
Color BombsColor = Color(1.0000f, 0.0000f, 0.6469f, 1.0f);
39+
float BombsScale = 1.0f;
40+
bool BombsOverrideColor = false;
41+
_u::Color BombsColor = _u::Color(1.0000f, 0.0000f, 0.6469f, 1.0f);
3942

40-
float ArcsIntensity = 1.00f;
41-
bool ArcsHaptics = true;
43+
float ArcsIntensity = 1.00f;
44+
bool ArcsHaptics = true;
4245

43-
float BurstNotesDotsScale = 1.5f;
46+
float BurstNotesDotsScale = 1.5f;
4447

4548
static std::shared_ptr<_Profile> AsDefault();
4649

src/NTConfig.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
#include <CP_SDK/ChatPlexSDK.hpp>
44

5+
using namespace UnityEngine;
6+
57
namespace QBeatSaberPlus_NoteTweaker {
68

79
CP_SDK_CONFIG_JSONCONFIG_INSTANCE_IMPL(NTConfig);

src/Patches/PBombNoteController.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ namespace QBeatSaberPlus_NoteTweaker::Patches {
136136

137137
if (!PBombNoteController_WasInit)
138138
{
139-
CP_SDK::ChatPlexSDK::OnGenericSceneChange += [](CP_SDK::ChatPlexSDK::EGenericScene x) { if (x == CP_SDK::ChatPlexSDK::EGenericScene::Menu) PBombNoteController_Cache.clear(); };
139+
CP_SDK::ChatPlexSDK::OnGenericSceneChange += [](CP_SDK::EGenericScene x) { if (x == CP_SDK::EGenericScene::Menu) PBombNoteController_Cache.clear(); };
140140
PBombNoteController_WasInit = true;
141141
}
142142
}

src/Patches/PColorNoteVisuals.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ namespace QBeatSaberPlus_NoteTweaker::Patches {
154154

155155
if (!PColorNoteVisuals_WasInit)
156156
{
157-
CP_SDK::ChatPlexSDK::OnGenericSceneChange += [](CP_SDK::ChatPlexSDK::EGenericScene x) { if (x == CP_SDK::ChatPlexSDK::EGenericScene::Menu) PColorNoteVisuals_Cache.clear(); };
157+
CP_SDK::ChatPlexSDK::OnGenericSceneChange += [](CP_SDK::EGenericScene x) { if (x == CP_SDK::EGenericScene::Menu) PColorNoteVisuals_Cache.clear(); };
158158
PColorNoteVisuals_WasInit = true;
159159
}
160160
}

0 commit comments

Comments
 (0)