diff --git a/distribution/openrct2.d.ts b/distribution/openrct2.d.ts index 892b4cce63..3954ce5b9b 100644 --- a/distribution/openrct2.d.ts +++ b/distribution/openrct2.d.ts @@ -4474,7 +4474,7 @@ declare global { readonly category: RideResearchCategory; /** - * The ride type. Each vehicle can have a seperate invention for each ride type. + * The ride type. Each vehicle can have a separate invention for each ride type. */ readonly rideType: number; @@ -5056,7 +5056,7 @@ declare global { column: number; } - type ListViewItem = ListViewItemSeperator | string[] | string; + type ListViewItem = ListViewItemSeparator | string[] | string; interface ListViewWidget extends WidgetBase { type: "listview"; @@ -5183,8 +5183,8 @@ declare global { textAlign?: TextAlignment; } - interface ListViewItemSeperator { - type: "seperator"; + interface ListViewItemSeparator { + type: "separator"; text?: string; } diff --git a/scripts/format-changelog.js b/scripts/format-changelog.js index e2949079c4..f790a10ffd 100644 --- a/scripts/format-changelog.js +++ b/scripts/format-changelog.js @@ -6,7 +6,7 @@ const ChangeTypes = ["Headline feature", "Feature", "Improved", "Change", "Remov const ChangeTypeSubstitutions = { "Improve": "Improved", }; -const HeaderSeperator = "------------------------------------------------------------------------"; +const HeaderSeparator = "------------------------------------------------------------------------"; function reportError(ctx, message) { console.error(`Error on line ${ctx.lineIndex}: ${message}`); @@ -42,10 +42,10 @@ function readVersionHeader(ctx) { reportLineError(versionLine, "Expected a version number"); } - // Check the version seperator - const versionSeperator = consumeLine(ctx); - if (versionSeperator.text != HeaderSeperator) { - reportLineError(versionSeperator, "Expected version seperator"); + // Check the version separator + const versionSeparator = consumeLine(ctx); + if (versionSeparator.text != HeaderSeparator) { + reportLineError(versionSeparator, "Expected version separator"); } // Check for optional headline, this means the there is text not starting with - and an empty line before @@ -263,7 +263,7 @@ function cleanupVersions(versions) { function printChangelog(versions) { for (const version of versions) { console.log(`${version.version} (${version.date})`); - console.log(HeaderSeperator); + console.log(HeaderSeparator); if (version.headline != "") { console.log(version.headline); console.log(); diff --git a/src/openrct2-ui/scripting/CustomListView.cpp b/src/openrct2-ui/scripting/CustomListView.cpp index 69a279a692..b2e75fdff5 100644 --- a/src/openrct2-ui/scripting/CustomListView.cpp +++ b/src/openrct2-ui/scripting/CustomListView.cpp @@ -125,7 +125,8 @@ namespace OpenRCT2::Scripting else if (d.type() == DukValue::Type::OBJECT) { auto type = ProcessString(d["type"]); - if (type == "seperator") + // This type was misspelt between 2020 and 2025. + if (type == "separator" || type == "separator") { auto text = ProcessString(d["text"]); result = ListViewItem(text); @@ -584,7 +585,7 @@ void CustomListView::Paint(WindowBase* w, RenderTarget& rt, const ScrollArea* sc { const auto& text = item.Cells[0]; ScreenSize cellSize = { LastKnownSize.width, kListRowHeight }; - PaintSeperator(rt, { 0, y }, cellSize, text.c_str()); + PaintSeparator(rt, { 0, y }, cellSize, text.c_str()); } else { @@ -703,7 +704,7 @@ void CustomListView::PaintHeading( } } -void CustomListView::PaintSeperator(RenderTarget& rt, const ScreenCoordsXY& pos, const ScreenSize& size, const char* text) const +void CustomListView::PaintSeparator(RenderTarget& rt, const ScreenCoordsXY& pos, const ScreenSize& size, const char* text) const { auto hasText = text != nullptr && text[0] != '\0'; auto left = pos.x + 4; diff --git a/src/openrct2-ui/scripting/CustomListView.h b/src/openrct2-ui/scripting/CustomListView.h index db5578a32f..ab00a4a21f 100644 --- a/src/openrct2-ui/scripting/CustomListView.h +++ b/src/openrct2-ui/scripting/CustomListView.h @@ -144,7 +144,7 @@ namespace OpenRCT2::Ui::Windows void PaintHeading( WindowBase* w, RenderTarget& rt, const ScreenCoordsXY& pos, const ScreenSize& size, const std::string& text, ColumnSortOrder sortOrder, bool isPressed) const; - void PaintSeperator(RenderTarget& rt, const ScreenCoordsXY& pos, const ScreenSize& size, const char* text) const; + void PaintSeparator(RenderTarget& rt, const ScreenCoordsXY& pos, const ScreenSize& size, const char* text) const; void PaintCell( RenderTarget& rt, const ScreenCoordsXY& pos, const ScreenSize& size, const char* text, bool isHighlighted) const; std::optional GetItemIndexAt(const ScreenCoordsXY& pos); diff --git a/src/openrct2/scripting/bindings/world/ScTileElement.cpp b/src/openrct2/scripting/bindings/world/ScTileElement.cpp index c782d4f550..16029eaba8 100644 --- a/src/openrct2/scripting/bindings/world/ScTileElement.cpp +++ b/src/openrct2/scripting/bindings/world/ScTileElement.cpp @@ -1584,7 +1584,7 @@ namespace OpenRCT2::Scripting } } - // Deprecated in favor of seperate 'edges' and 'corners' properties, + // Deprecated in favor of separate 'edges' and 'corners' properties, // left here to maintain compatibility with older plugins. /** @deprecated */ uint8_t ScTileElement::edgesAndCorners_get() const diff --git a/src/openrct2/scripting/bindings/world/ScTileElement.hpp b/src/openrct2/scripting/bindings/world/ScTileElement.hpp index 8e0953277d..bb1f6ab22d 100644 --- a/src/openrct2/scripting/bindings/world/ScTileElement.hpp +++ b/src/openrct2/scripting/bindings/world/ScTileElement.hpp @@ -145,7 +145,7 @@ namespace OpenRCT2::Scripting DukValue bannerIndex_get() const; void bannerIndex_set(const DukValue& value); - // Deprecated in favor of seperate 'edges' and 'corners' properties, + // Deprecated in favor of separate 'edges' and 'corners' properties, // left here to maintain compatibility with older plugins. /** @deprecated */ uint8_t edgesAndCorners_get() const;