Skip to content

Commit

Permalink
Compile fix after I messed up a few things with merging.
Browse files Browse the repository at this point in the history
  • Loading branch information
daid committed Apr 9, 2020
1 parent 8c4aba5 commit a363016
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/scienceDatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void ScienceDatabase::setLongDescription(string text)
longDescription = text;
}

string directionLabel(float direction)
static string directionLabel(float direction)
{
string name = "?";
if (std::abs(sf::angleDifference(0.0f, direction)) <= 45)
Expand Down Expand Up @@ -160,8 +160,11 @@ void fillDefaultDatabaseData()
if (ship_template->beams[n].getRange() > 0)
{
entry->addKeyValue(
tr("{direction} beam weapon").format({{"direction": directionLabel(ship_template->beams[n].getDirection()}}),
tr("database", "{damage} Dmg / {interval} sec").format({{"damage", string(ship_template->beams[n].getDamage(), 1)}, {"interval", string(ship_template->beams[n].getCycleTime(), 1)}})
tr("{direction} beam weapon").format({{"direction", directionLabel(ship_template->beams[n].getDirection())}}),
tr("database", "{damage} Dmg / {interval} sec").format({
{"damage", string(ship_template->beams[n].getDamage(), 1)},
{"interval", string(ship_template->beams[n].getCycleTime(), 1)}
})
);
}
}
Expand All @@ -177,7 +180,7 @@ void fillDefaultDatabaseData()
key = tr("database", "{direction} large tube");
}
entry->addKeyValue(
key.format({{"direction", directionLabel(ship_template->weapon_tube[n].direction)},
key.format({{"direction", directionLabel(ship_template->weapon_tube[n].direction)}}),
tr("database", "{loadtime} sec").format({{"loadtime", string(int(ship_template->weapon_tube[n].load_time))}})
);
}
Expand Down

0 comments on commit a363016

Please sign in to comment.