It is implied that if you're working without the slot argument you are
working with the active slot, therefore it's not needed for the message
to output that.
This option is separate from the item actions, since it may be
important for some users to still see where the actions are being
undone. Therefore, I've added this option to a new hierarchy named
"history", which is why I've imported serde into the crate.
I passed the file through rustfmt and rust-clippy in order to fulfill
some suggestions. Didn't do this before because I didn't have these
utilities in hand, but here we go!
Errors and messages will now be handled by a single module called
message.rs. This module has a new function called append_emoji(), which
will prefix emojis to each message. It also adds an enum named
EmojiType, which will contain each possible emoji prefix. Lastly, add
two new configs: "display_emoji" and "display_colors". "display_colors"
is yet to be implemented.
Since error refactoring was quite incomplete, I've added more errors for other parts of Vento. This should cover almost every error except slot errors, since those require their own formatting.
When undoing a slot switching command, it would show the message
normally show when running the command by itself, which is not supposed
to happen. This commit fixes that by adding a boolean argument that will
print the message when true.
Turns out the history didn't include undoing slot switching, so an
action could accidentally be undone in the wrong slot. I've fixed that
and also reorganized the source so undoing actions wouldn't be pegged to
the item module.