inventory system messages to config
This commit is contained in:
parent
306c1e4d53
commit
76c74df028
6 changed files with 20 additions and 13 deletions
|
|
@ -13,6 +13,7 @@ use crate::{
|
|||
WantsToPickupItem,
|
||||
};
|
||||
use specs::prelude::*;
|
||||
use crate::config::messages;
|
||||
|
||||
pub struct ItemCollectionSystem {}
|
||||
|
||||
|
|
@ -57,7 +58,7 @@ impl<'a> System<'a> for ItemCollectionSystem {
|
|||
if pickup.collected_by == *player_entity {
|
||||
gamelog::Logger
|
||||
::new()
|
||||
.append("You pick up the")
|
||||
.append(messages::YOU_PICKUP_ITEM)
|
||||
.item_name_n(
|
||||
format!(
|
||||
"{}",
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ use crate::{
|
|||
WantsToDropItem,
|
||||
};
|
||||
use specs::prelude::*;
|
||||
use crate::config::messages;
|
||||
|
||||
pub struct ItemDropSystem {}
|
||||
|
||||
|
|
@ -65,7 +66,7 @@ impl<'a> System<'a> for ItemDropSystem {
|
|||
if entity == *player_entity {
|
||||
gamelog::Logger
|
||||
::new()
|
||||
.append("You drop the")
|
||||
.append(messages::YOU_DROP_ITEM)
|
||||
.item_name_n(
|
||||
format!(
|
||||
"{}",
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ use crate::{
|
|||
BUC,
|
||||
};
|
||||
use specs::prelude::*;
|
||||
use crate::config::messages;
|
||||
|
||||
pub struct ItemEquipSystem {}
|
||||
|
||||
|
|
@ -71,7 +72,7 @@ impl<'a> System<'a> for ItemEquipSystem {
|
|||
if beatitude.buc == BUC::Cursed {
|
||||
can_equip = false;
|
||||
logger = logger
|
||||
.append("You can't remove the")
|
||||
.append(messages::YOU_REMOVE_ITEM_CURSED)
|
||||
.colour(item_colour(item_entity, &beatitudes))
|
||||
.append_n(
|
||||
obfuscate_name(
|
||||
|
|
@ -103,7 +104,7 @@ impl<'a> System<'a> for ItemEquipSystem {
|
|||
backpack.insert(*item, InBackpack { owner: target }).expect("Unable to insert backpack");
|
||||
if target == *player_entity {
|
||||
logger = logger
|
||||
.append("You remove your")
|
||||
.append(messages::YOU_REMOVE_ITEM)
|
||||
.colour(item_colour(*item, &beatitudes))
|
||||
.append_n(
|
||||
obfuscate_name(*item, &names, &magic_items, &obfuscated_names, &beatitudes, &dm, None).0
|
||||
|
|
@ -120,7 +121,7 @@ impl<'a> System<'a> for ItemEquipSystem {
|
|||
backpack.remove(wants_to_use_item.item);
|
||||
if target == *player_entity {
|
||||
logger = logger
|
||||
.append("You equip the")
|
||||
.append(messages::YOU_EQUIP_ITEM)
|
||||
.colour(item_colour(wants_to_use_item.item, &beatitudes))
|
||||
.append_n(
|
||||
obfuscate_name(
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ use crate::{
|
|||
};
|
||||
use rltk::prelude::*;
|
||||
use specs::prelude::*;
|
||||
use crate::config::messages;
|
||||
|
||||
pub struct ItemRemoveSystem {}
|
||||
|
||||
|
|
@ -53,7 +54,7 @@ impl<'a> System<'a> for ItemRemoveSystem {
|
|||
can_remove = false;
|
||||
gamelog::Logger
|
||||
::new()
|
||||
.append("You can't remove the")
|
||||
.append(messages::YOU_REMOVE_ITEM_CURSED)
|
||||
.colour(item_colour(to_remove.item, &beatitudes))
|
||||
.append_n(
|
||||
obfuscate_name(
|
||||
|
|
@ -80,7 +81,7 @@ impl<'a> System<'a> for ItemRemoveSystem {
|
|||
if entity == *player_entity {
|
||||
gamelog::Logger
|
||||
::new()
|
||||
.append("You unequip the")
|
||||
.append(messages::YOU_REMOVE_ITEM)
|
||||
.colour(item_colour(to_remove.item, &beatitudes))
|
||||
.append_n(
|
||||
obfuscate_name(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue