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
|
output_events
|
||||||
.emit_server(ServerEvent::InventoryManip(data.entity, inv_manip));
|
.emit_server(ServerEvent::InventoryManip(data.entity, inv_manip));
|
||||||
output_events.emit_local(LocalEvent::CreateOutcome(
|
if matches!(self.static_data.sprite_kind, SpriteInteractKind::Unlock) {
|
||||||
Outcome::SpriteUnlocked {
|
output_events.emit_local(LocalEvent::CreateOutcome(
|
||||||
pos: self.static_data.sprite_pos,
|
Outcome::SpriteUnlocked {
|
||||||
},
|
pos: self.static_data.sprite_pos,
|
||||||
));
|
},
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Done
|
// Done
|
||||||
end_ability(data, &mut update);
|
end_ability(data, &mut update);
|
||||||
|
Loading…
Reference in New Issue
Block a user