mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Receive server message on give_item cmd success
This commit is contained in:
parent
2a3ed498d0
commit
c64bddee68
@ -14,6 +14,7 @@ command-give-inventory-full = Player inventory full. Gave { $given ->
|
||||
[1] only one
|
||||
*[other] { $given }
|
||||
} of { $total } items.
|
||||
command-give-inventory-success = Added { $total } x { $item } to the inventory.
|
||||
command-invalid-item = Invalid item: { $item }
|
||||
command-invalid-block-kind = Invalid block kind: { $kind }
|
||||
command-nof-entities-at-least = Number of entities should be at least 1
|
||||
|
@ -38,7 +38,7 @@ use common::{
|
||||
invite::InviteKind,
|
||||
misc::PortalData,
|
||||
AdminRole, Aura, AuraKind, BuffCategory, ChatType, Content, Inventory, Item, LightEmitter,
|
||||
WaypointArea,
|
||||
LocalizationArg, WaypointArea,
|
||||
},
|
||||
depot,
|
||||
effect::Effect,
|
||||
@ -515,7 +515,7 @@ fn handle_drop_all(
|
||||
|
||||
fn handle_give_item(
|
||||
server: &mut Server,
|
||||
_client: EcsEntity,
|
||||
client: EcsEntity,
|
||||
target: EcsEntity,
|
||||
args: Vec<String>,
|
||||
action: &ServerChatCommand,
|
||||
@ -572,6 +572,17 @@ fn handle_give_item(
|
||||
});
|
||||
}
|
||||
|
||||
if res.is_ok() {
|
||||
let msg = ServerGeneral::server_msg(
|
||||
ChatType::CommandInfo,
|
||||
Content::localized_with_args("command-give-inventory-success", [
|
||||
("total", LocalizationArg::from(give_amount as u64)),
|
||||
("item", LocalizationArg::from(item_name)),
|
||||
]),
|
||||
);
|
||||
server.notify_client(client, msg);
|
||||
}
|
||||
|
||||
let mut inventory_update = server
|
||||
.state
|
||||
.ecs_mut()
|
||||
|
Loading…
Reference in New Issue
Block a user