Skip to content

Commit 0c27f95

Browse files
committed
fix(require): fix broken requires
BREAKING CHANGE - Remove parent folder name from a few require paths. - Fix early returns in YRV3 nightclub data initialization function not setting a boolean flag which causes YRV3 to stay in a loading state forever. - Append breaking change notice to the changelog body when applicable. - Remove unused files.
1 parent 6e85d57 commit 0c27f95

6 files changed

Lines changed: 32 additions & 314 deletions

File tree

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,10 @@ indent_size = 4
66
end_of_line = crlf
77
insert_final_newline = true
88
charset = utf-8
9+
10+
[*.yml]
11+
indent_style = space
12+
indent_size = 4
13+
end_of_line = crlf
14+
insert_final_newline = true
15+
charset = utf-8

.github/workflows/zip-release.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ jobs:
107107
});
108108
109109
let changelog = "";
110+
let breaking = false;
111+
let breakingMsg = ">[!Important]\n>**This is a breaking change**\n>To install this update, please remove the previous version completely and then install the new version.\n\n";
112+
113+
function isBreakingChange(str) {
114+
return str.toLowerCase().includes("breaking change");
115+
}
110116
111117
const mergedPRs = pulls.filter(pr => pr.merged_at && new Date(pr.merged_at) > lastTagDate);
112118
const extractField = (body, fieldName) => {
@@ -120,15 +126,11 @@ jobs:
120126
121127
if (mergedPRs.length > 0) {
122128
for (const pr of mergedPRs) {
123-
changelog += `## PR #${pr.number}: ${pr.title}\n`;
124-
const body = pr.body
129+
changelog += `### PR #${pr.number}: ${pr.title}\n`;
130+
const body = pr.body;
125131
if (body) {
126-
const lines = body.split('\n').map(line => line.trim());
127-
for (const line of lines) {
128-
if (line)
129-
changelog += `${line}\n`;
130-
}
131-
changelog += "\n";
132+
breaking = breaking || isBreakingChange(body);
133+
changelog += `${body.trim()}\n\n`;
132134
}
133135
}
134136
} else {
@@ -141,17 +143,25 @@ jobs:
141143
142144
const commits = compared.data.commits;
143145
for (const commit of commits) {
144-
const msg = commit.commit.message;
146+
const msg = commit.commit.message || "";
145147
const body = commit.commit.body;
148+
146149
if (msg.toLowerCase().startsWith("merge pull"))
147150
continue;
148151
152+
breaking = breaking || isBreakingChange(msg);
149153
changelog += `## ${msg}\n\n`;
150-
if (body)
151-
changelog += `${body}\n\n`;
154+
155+
if (body) {
156+
breaking = breaking || isBreakingChange(body);
157+
changelog += `${body.trim()}\n\n`;
158+
}
152159
}
153160
}
154161
162+
if (breaking) {
163+
changelog = `${breakingMsg}${changelog}`
164+
}
155165
core.setOutput("changelog", changelog);
156166
157167
- name: Bump Version

SSV2/includes/features/YimResupplierV3.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
local SGSL = require("includes.services.SGSL")
1111
local Warehouse = require("includes.modules.businesses.Warehouse")
12-
local Factory = require("SSV2.includes.modules.businesses.Factory")
12+
local Factory = require("includes.modules.businesses.Factory")
1313
local Nightclub = require("includes.modules.businesses.Nightclub")
1414
local Clubhouse = require("includes.modules.businesses.Clubhouse")
1515
local CashSafe = require("includes.modules.businesses.CashSafe")
@@ -414,13 +414,15 @@ end
414414

415415
function YRV3:PopulateNightclub()
416416
if (self.m_businesses.nightclub) then
417+
self.m_data_initialized = true
417418
return
418419
end
419420

420421
ThreadManager:Run(function()
421422
local nc_index = stats.get_int("MPX_NIGHTCLUB_OWNED")
422423
local ref = self.m_raw_data.Nightclubs[nc_index]
423424
if (nc_index == 0 or not ref) then
425+
self.m_data_initialized = true
424426
return
425427
end
426428

SSV2/includes/frontend/salvage_ui.lua

Lines changed: 0 additions & 126 deletions
This file was deleted.

0 commit comments

Comments
 (0)