From 0da933a0146a0689546b21231e14f2dfc2bc14e8 Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 23 Feb 2022 23:36:37 +0100 Subject: Switched to use ContentBundle's GetText --- Stars45/RadioHandler.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'Stars45/RadioHandler.cpp') diff --git a/Stars45/RadioHandler.cpp b/Stars45/RadioHandler.cpp index e7ff7f8..00dadce 100644 --- a/Stars45/RadioHandler.cpp +++ b/Stars45/RadioHandler.cpp @@ -34,6 +34,7 @@ #include "Text.h" #include "Game.h" +#include "ContentBundle.h" // +----------------------------------------------------------------------+ @@ -393,16 +394,16 @@ RadioHandler::Inbound(RadioMessage* msg, Ship* ship) if (!deck || !same_rgn || squadron < 0 || slot < 0) { RadioMessage* wave_off = new(__FILE__,__LINE__) RadioMessage(inbound, ship, RadioMessage::NACK); if (!hangar) - wave_off->SetInfo(Game::GetInstance()->GetText("RadioHandler.no-hangar")); + wave_off->SetInfo(ContentBundle::GetInstance()->GetText("RadioHandler.no-hangar")); else if (!same_rgn) { char info[256]; - sprintf_s(info, Game::GetInstance()->GetText("RadioHandler.too-far-away").data(), ship->GetRegion()->Name()); + sprintf_s(info, ContentBundle::GetInstance()->GetText("RadioHandler.too-far-away").data(), ship->GetRegion()->Name()); wave_off->SetInfo(info); } else - wave_off->SetInfo(Game::GetInstance()->GetText("RadioHandler.all-full")); + wave_off->SetInfo(ContentBundle::GetInstance()->GetText("RadioHandler.all-full")); RadioTraffic::Transmit(wave_off); return false; @@ -425,12 +426,12 @@ RadioHandler::Inbound(RadioMessage* msg, Ship* ship) if (inbound_slot->Cleared()) { char info[256]; - sprintf_s(info, Game::GetInstance()->GetText("RadioHandler.cleared").data(), deck->Name()); + sprintf_s(info, ContentBundle::GetInstance()->GetText("RadioHandler.cleared").data(), deck->Name()); approach->SetInfo(info); } else if (sequence) { char info[256]; - sprintf_s(info, Game::GetInstance()->GetText("RadioHandler.sequenced").data(), sequence, deck->Name()); + sprintf_s(info, ContentBundle::GetInstance()->GetText("RadioHandler.sequenced").data(), sequence, deck->Name()); approach->SetInfo(info); } @@ -521,7 +522,7 @@ RadioHandler::Support(RadioMessage* msg, Ship* ship) escort->TargetList().append(msg->Sender()); RadioTraffic::Transmit(escort); - Text ok = Game::GetInstance()->GetText("RadioHandler.help-enroute"); + Text ok = ContentBundle::GetInstance()->GetText("RadioHandler.help-enroute"); Ship* sender = (Ship*) msg->Sender(); // cast-away const RadioMessage* response = new(__FILE__,__LINE__) RadioMessage(sender, ship, RadioMessage::ACK); response->SetInfo(ok); @@ -530,7 +531,7 @@ RadioHandler::Support(RadioMessage* msg, Ship* ship) // no help in sight: else { - Text nope = Game::GetInstance()->GetText("RadioHandler.no-help-for-you"); + Text nope = ContentBundle::GetInstance()->GetText("RadioHandler.no-help-for-you"); Ship* sender = (Ship*) msg->Sender(); // cast-away const RadioMessage* response = new(__FILE__,__LINE__) RadioMessage(sender, ship, RadioMessage::NACK); response->SetInfo(nope); -- cgit v1.1