Commit Graph

9 Commits

Author SHA1 Message Date
Lux Aliaga 1506dc811c item: Don't display slot if not stated explicitly
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.
2023-08-26 10:54:53 -04:00
Lux Aliaga 63777e6f61 history: Add config to disable displaying dirs
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.
2023-08-26 10:51:20 -04:00
Lux Aliaga 52a830331c src: Linting and formatting
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!
2023-08-20 12:36:45 -04:00
Lux Aliaga 17217173f4 src: Revamp message displaying
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.
2023-08-19 18:54:43 -04:00
Lux Aliaga 27b42e963e
error: Add more error types
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.
2023-02-19 14:42:26 -03:00
Lux Aliaga 791cdf3193
src: Supress clippy warnings
Most of them were related to unnecessary borrows, although one was
because I pointlessly added a format! inside a println!. Whoops.
2023-02-09 21:35:12 -03:00
Lux Aliaga 1cbfc5a568
history: Nicer messages for undo result
It includes more details such as:
- What action was undone
- What item was affected in the action
- What that action involved
2022-11-03 21:06:28 -03:00
Lux Aliaga 19aa1955c8
inv: Add "message" arg to slot switching
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.
2022-11-03 19:42:39 -03:00
Lux Aliaga c1533e6b41
inv: Include slot switching in undoable actions
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.
2022-11-03 19:26:15 -03:00