1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-31 02:35:46 +01:00

Make news item fields lowerCamelCase

This commit is contained in:
Gymnasiast
2025-05-23 21:16:30 +02:00
parent 323a3c9119
commit 47bb449e34
11 changed files with 113 additions and 113 deletions

View File

@@ -370,11 +370,11 @@ namespace OpenRCT2::Scripting
// End the lists by setting next item to null
if (index < News::ItemHistoryStart)
{
gameState.newsItems[index].Type = News::ItemType::Null;
gameState.newsItems[index].type = News::ItemType::Null;
}
if (archiveIndex < News::MaxItems)
{
gameState.newsItems[archiveIndex].Type = News::ItemType::Null;
gameState.newsItems[archiveIndex].type = News::ItemType::Null;
}
}

View File

@@ -56,7 +56,7 @@ namespace OpenRCT2::Scripting
auto msg = GetMessage();
if (msg != nullptr)
{
return msg->MonthYear;
return msg->monthYear;
}
return 0;
}
@@ -67,7 +67,7 @@ namespace OpenRCT2::Scripting
auto msg = GetMessage();
if (msg != nullptr)
{
msg->MonthYear = value;
msg->monthYear = value;
}
}
@@ -76,7 +76,7 @@ namespace OpenRCT2::Scripting
auto msg = GetMessage();
if (msg != nullptr)
{
return msg->Day;
return msg->day;
}
return 0;
}
@@ -87,7 +87,7 @@ namespace OpenRCT2::Scripting
auto msg = GetMessage();
if (msg != nullptr)
{
msg->Day = value;
msg->day = value;
}
}
@@ -96,7 +96,7 @@ namespace OpenRCT2::Scripting
auto msg = GetMessage();
if (msg != nullptr)
{
return msg->Ticks;
return msg->ticks;
}
return 0;
}
@@ -107,7 +107,7 @@ namespace OpenRCT2::Scripting
auto msg = GetMessage();
if (msg != nullptr)
{
msg->Ticks = value;
msg->ticks = value;
}
}
@@ -116,7 +116,7 @@ namespace OpenRCT2::Scripting
auto msg = GetMessage();
if (msg != nullptr)
{
return GetParkMessageType(msg->Type);
return GetParkMessageType(msg->type);
}
return {};
}
@@ -127,7 +127,7 @@ namespace OpenRCT2::Scripting
auto msg = GetMessage();
if (msg != nullptr)
{
msg->Type = GetParkMessageType(value);
msg->type = GetParkMessageType(value);
}
}
@@ -136,7 +136,7 @@ namespace OpenRCT2::Scripting
auto msg = GetMessage();
if (msg != nullptr)
{
return msg->Assoc;
return msg->assoc;
}
return 0;
}
@@ -147,7 +147,7 @@ namespace OpenRCT2::Scripting
auto msg = GetMessage();
if (msg != nullptr)
{
msg->Assoc = value;
msg->assoc = value;
}
}
@@ -156,7 +156,7 @@ namespace OpenRCT2::Scripting
auto msg = GetMessage();
if (msg != nullptr)
{
return msg->Text;
return msg->text;
}
return {};
}
@@ -167,7 +167,7 @@ namespace OpenRCT2::Scripting
auto msg = GetMessage();
if (msg != nullptr)
{
msg->Text = value;
msg->text = value;
}
}

View File

@@ -52,12 +52,12 @@ namespace OpenRCT2::Scripting
inline News::Item FromDuk(const DukValue& value)
{
News::Item result{};
result.Type = GetParkMessageType(value["type"].as_string());
result.Assoc = value["subject"].as_uint();
result.Ticks = value["tickCount"].as_uint();
result.MonthYear = value["month"].as_uint();
result.Day = value["day"].as_uint();
result.Text = value["text"].as_string();
result.type = GetParkMessageType(value["type"].as_string());
result.assoc = value["subject"].as_uint();
result.ticks = value["tickCount"].as_uint();
result.monthYear = value["month"].as_uint();
result.day = value["day"].as_uint();
result.text = value["text"].as_string();
return result;
}