mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Only emit SpriteUnlocked outcome if the sprite interaction kind is Unlock. Also rustfmt decided to make a bunch of changes.
This commit is contained in:
parent
fe38b9b92b
commit
349d1726a6
@ -129,11 +129,13 @@ impl CharacterBehavior for Data {
|
||||
};
|
||||
output_events
|
||||
.emit_server(ServerEvent::InventoryManip(data.entity, inv_manip));
|
||||
output_events.emit_local(LocalEvent::CreateOutcome(
|
||||
Outcome::SpriteUnlocked {
|
||||
pos: self.static_data.sprite_pos,
|
||||
},
|
||||
));
|
||||
if matches!(self.static_data.sprite_kind, SpriteInteractKind::Unlock) {
|
||||
output_events.emit_local(LocalEvent::CreateOutcome(
|
||||
Outcome::SpriteUnlocked {
|
||||
pos: self.static_data.sprite_pos,
|
||||
},
|
||||
));
|
||||
}
|
||||
}
|
||||
// Done
|
||||
end_ability(data, &mut update);
|
||||
|
Loading…
Reference in New Issue
Block a user