Skip to content

Commit 709d0af

Browse files
authored
Merge pull request YimMenu-Lua#132 from YimMenu-Lua/classes_utils_fixes
fix: miscellaneous fixes + code cleanup
2 parents 606a05d + fb5fb90 commit 709d0af

55 files changed

Lines changed: 2113 additions & 1981 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/translations.yml

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

33
on:
44
push:
5+
branches:
6+
- main
57
paths:
68
- "dev/scripts/translations/**"
79
- "SSV2/includes/lib/translations/en-US.lua"

.github/workflows/zip-release.yml

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,9 @@ jobs:
110110
let breaking = false;
111111
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";
112112
113-
function isBreakingChange(str) {
114-
return str.toLowerCase().includes("breaking change");
115-
}
113+
function isBreakingChange(str) { return str.toLowerCase().includes("breaking change"); }
116114
117115
const mergedPRs = pulls.filter(pr => pr.merged_at && new Date(pr.merged_at) > lastTagDate);
118-
119116
if (mergedPRs.length > 0) {
120117
for (const pr of mergedPRs) {
121118
changelog += `### PR #${pr.number}: ${pr.title}\n`;
@@ -125,29 +122,27 @@ jobs:
125122
changelog += `${body.trim()}\n\n`;
126123
}
127124
}
128-
} else {
129-
const compared = await github.rest.repos.compareCommits({
130-
owner,
131-
repo,
132-
base: lastTag,
133-
head: "main"
134-
});
135-
136-
const commits = compared.data.commits;
137-
for (const commit of commits) {
138-
const msg = commit.commit.message || "";
139-
const body = commit.commit.body;
140-
141-
if (msg.toLowerCase().startsWith("merge pull"))
142-
continue;
143-
144-
breaking = breaking || isBreakingChange(msg);
145-
changelog += `## ${msg}\n\n`;
125+
}
146126
147-
if (body) {
148-
breaking = breaking || isBreakingChange(body);
149-
changelog += `${body.trim()}\n\n`;
150-
}
127+
const compared = await github.rest.repos.compareCommits({
128+
owner,
129+
repo,
130+
base: lastTag,
131+
head: "main"
132+
});
133+
const commits = compared.data.commits;
134+
for (const commit of commits) {
135+
const msg = commit.commit.message || "";
136+
const body = commit.commit.body;
137+
const msgLower = msg.toLowerCase();
138+
if (msgLower.startsWith("merge ") || msgLower.startsWith("[noci]"))
139+
continue;
140+
141+
breaking = breaking || isBreakingChange(msg);
142+
changelog += `## ${msg}\n\n`;
143+
if (body) {
144+
breaking = breaking || isBreakingChange(body);
145+
changelog += `${body.trim()}\n\n`;
151146
}
152147
}
153148

SSV2/includes/classes/gta/CBaseSubHandlingData.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
-- this code as long as you respect these conditions:
66
-- * Credit the owner and contributors.
77
-- * Provide a copy of or a link to the original license (GPL-3.0 or later); see LICENSE.md or <https://www.gnu.org/licenses/>.
8+
--
9+
-- Converted from Yimura's C++ GTA V Classes: https://github.com/Yimura/GTAV-Classes (forked here: https://github.com/Mr-X-GTA/GTAV-Classes-1)
810

911

1012
local CStructView = require("includes.classes.gta.CStructView")

SSV2/includes/classes/gta/CBikeHandlingData.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
-- * Provide a copy of or a link to the original license (GPL-3.0 or later); see LICENSE.md or <https://www.gnu.org/licenses/>.
88

99

10-
local CStructView = require("includes.classes.gta.CStructView")
1110
local CBaseSubHandlingData = require("includes.classes.gta.CBaseSubHandlingData")
1211

1312

SSV2/includes/classes/gta/CBoatHandlingData.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
-- * Provide a copy of or a link to the original license (GPL-3.0 or later); see LICENSE.md or <https://www.gnu.org/licenses/>.
88

99

10-
local CStructView = require("includes.classes.gta.CStructView")
1110
local CBaseSubHandlingData = require("includes.classes.gta.CBaseSubHandlingData")
1211

1312

SSV2/includes/classes/gta/CCarHandlingData.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
-- this code as long as you respect these conditions:
66
-- * Credit the owner and contributors.
77
-- * Provide a copy of or a link to the original license (GPL-3.0 or later); see LICENSE.md or <https://www.gnu.org/licenses/>.
8+
--
9+
-- Converted from Yimura's C++ GTA V Classes: https://github.com/Yimura/GTAV-Classes (forked here: https://github.com/Mr-X-GTA/GTAV-Classes-1)
810

911

1012
local atArray = require("includes.classes.gta.atArray")

SSV2/includes/classes/gta/CEntity.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
-- this code as long as you respect these conditions:
66
-- * Credit the owner and contributors.
77
-- * Provide a copy of or a link to the original license (GPL-3.0 or later); see LICENSE.md or <https://www.gnu.org/licenses/>.
8+
--
9+
-- Converted from Yimura's C++ GTA V Classes: https://github.com/Yimura/GTAV-Classes (forked here: https://github.com/Mr-X-GTA/GTAV-Classes-1)
810

911

1012
local fwDrawData = require("includes.classes.gta.fwDrawData")
1113

12-
1314
---@class CBaseModelInfo
1415
---@class CAttackers
1516

SSV2/includes/classes/gta/CFiringPatternAlias.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
-- this code as long as you respect these conditions:
66
-- * Credit the owner and contributors.
77
-- * Provide a copy of or a link to the original license (GPL-3.0 or later); see LICENSE.md or <https://www.gnu.org/licenses/>.
8+
--
9+
-- Converted from Yimura's C++ GTA V Classes: https://github.com/Yimura/GTAV-Classes (forked here: https://github.com/Mr-X-GTA/GTAV-Classes-1)
810

911

1012
local CStructView = require("includes.classes.gta.CStructView")

SSV2/includes/classes/gta/CHandlingData.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
-- this code as long as you respect these conditions:
66
-- * Credit the owner and contributors.
77
-- * Provide a copy of or a link to the original license (GPL-3.0 or later); see LICENSE.md or <https://www.gnu.org/licenses/>.
8+
--
9+
-- Converted from Yimura's C++ GTA V Classes: https://github.com/Yimura/GTAV-Classes (forked here: https://github.com/Mr-X-GTA/GTAV-Classes-1)
810

911

1012
local atArray = require("includes.classes.gta.atArray")

SSV2/includes/classes/gta/CPed.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
-- this code as long as you respect these conditions:
66
-- * Credit the owner and contributors.
77
-- * Provide a copy of or a link to the original license (GPL-3.0 or later); see LICENSE.md or <https://www.gnu.org/licenses/>.
8+
--
9+
-- Converted from Yimura's C++ GTA V Classes: https://github.com/Yimura/GTAV-Classes (forked here: https://github.com/Mr-X-GTA/GTAV-Classes-1)
810

911

1012
local CEntity = require("includes.classes.gta.CEntity")

0 commit comments

Comments
 (0)