Best I can do to simplify the check(fmt::format)crap is to make a little macro to do the format part.
This commit is contained in:
parent
6710469ee1
commit
f0b04107ab
28 changed files with 108 additions and 108 deletions
|
|
@ -306,7 +306,7 @@ void System::collision() {
|
|||
world.send<game::Event>(game::Event::COMBAT_START, entity, entity);
|
||||
}
|
||||
} else {
|
||||
dbc::log(fmt::format("UNKNOWN COLLISION TYPE {}", entity));
|
||||
dbc::log($F("UNKNOWN COLLISION TYPE {}", entity));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -375,7 +375,7 @@ void System::pickup() {
|
|||
|
||||
void System::device(World &world, Entity actor, Entity item) {
|
||||
auto& device = world.get<Device>(item);
|
||||
dbc::log(fmt::format("entity {} INTERACTED WITH DEVICE {}", actor, item));
|
||||
dbc::log($F("entity {} INTERACTED WITH DEVICE {}", actor, item));
|
||||
|
||||
for(auto event : device.events) {
|
||||
if(event == "STAIRS_DOWN") {
|
||||
|
|
@ -387,7 +387,7 @@ void System::device(World &world, Entity actor, Entity item) {
|
|||
} else if(event == "LOOT_CONTAINER") {
|
||||
world.send<game::Event>(game::Event::LOOT_CONTAINER, actor, device);
|
||||
} else {
|
||||
dbc::log(fmt::format(
|
||||
dbc::log($F(
|
||||
"INVALID EVENT {} for device {}",
|
||||
event, (std::string)device.config["name"]));
|
||||
}
|
||||
|
|
@ -621,13 +621,13 @@ bool System::use_item(const string& slot_name) {
|
|||
player_combat.hp = player_combat.max_hp;
|
||||
}
|
||||
|
||||
dbc::log(fmt::format("player health now {}",
|
||||
dbc::log($F("player health now {}",
|
||||
player_combat.hp));
|
||||
|
||||
world.remove<Curative>(what);
|
||||
return true;
|
||||
} else {
|
||||
dbc::log(fmt::format("no usable item at {}", what));
|
||||
dbc::log($F("no usable item at {}", what));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue