summaryrefslogtreecommitdiffhomepage
path: root/Stars45/Power.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-02-18 23:54:30 +0100
committerAki <please@ignore.pl>2022-02-18 23:54:30 +0100
commit0052edae47d1e6ae613497c524719eff5838f52a (patch)
tree3ba92a7846374ba274cba38d924e65f7c2ceb344 /Stars45/Power.cpp
parent2ae135bbe43065978a4659278d18d9533d8a3b27 (diff)
downloadstarshatter-0052edae47d1e6ae613497c524719eff5838f52a.zip
starshatter-0052edae47d1e6ae613497c524719eff5838f52a.tar.gz
starshatter-0052edae47d1e6ae613497c524719eff5838f52a.tar.bz2
Switched to use GetIntance for Game instead of static methods
Diffstat (limited to 'Stars45/Power.cpp')
-rw-r--r--Stars45/Power.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Stars45/Power.cpp b/Stars45/Power.cpp
index 34dda34..a4b95c1 100644
--- a/Stars45/Power.cpp
+++ b/Stars45/Power.cpp
@@ -33,8 +33,8 @@ PowerSource::PowerSource(SUBTYPE s, double max_out, double f_ratio)
max_output((float) max_out), fuel_ratio((float) f_ratio),
route_changed(false), requested_power_level(1.0f)
{
- name = Game::GetText(source_type[s]);
- abrv = Game::GetText(Text(source_type[s]) + ".abrv");
+ name = Game::GetInstance()->GetText(source_type[s]);
+ abrv = Game::GetInstance()->GetText(Text(source_type[s]) + ".abrv");
if (fuel_ratio < 1) {
switch (subtype) { // enough to last for [n] hours at full power
@@ -208,7 +208,7 @@ PowerSource::ExecFrame(double seconds)
}
}
- if (IsPowerOn() && capacity > 0 && !Game::Paused()) {
+ if (IsPowerOn() && capacity > 0 && !Game::GetInstance()->Paused()) {
// reactors always burn at least 10% of max (to maintain operating temp):
if (subtype != BATTERY) {
double baseline = 0.1 * max_output * seconds;