fixes message log wrapping - sort of

it's an improvement - messages will wrap if the added fragment is longer than the maximum width, but it still causes issues if an *individual* fragment is longer than the width. the proper solution here, i think, is to get rid of the whole fragment system and just log words and newlines, and not have to bother with any of this.
This commit is contained in:
Llywelwyn 2023-07-28 21:06:08 +01:00
parent 1e25d062db
commit 650afaf821
5 changed files with 48 additions and 25 deletions

View file

@ -238,18 +238,18 @@ impl<'a> System<'a> for ItemUseSystem {
for (item_entity, already_equipped, _name) in (&entities, &equipped, &names).join() {
if already_equipped.owner == target && already_equipped.slot == target_slot {
to_unequip.push(item_entity);
/*if target == *player_entity {
gamelog::Logger::new()
.append("You unequip the")
.item_name_n(&item_being_used.name)
.period()
.log();
}*/
}
}
for item in to_unequip.iter() {
equipped.remove(*item);
backpack.insert(*item, InBackpack { owner: target }).expect("Unable to insert backpack");
if target == *player_entity {
gamelog::Logger::new()
.append("You remove your")
.item_name_n(&item_being_used.name)
.period()
.log();
}
}
// Wield the item