Conversation
amtep
left a comment
There was a problem hiding this comment.
Some issues in the last commit :) Otherwise good
| vd.req_field_one_of(&["blend_shape", "additive_animation"]); | ||
| vd.field_item("name", Item::GeneAttribute); | ||
| vd.field_item("additive_animation", Item::GeneAttribute); | ||
| vd.field("additive_animation"); // TODO: eu5 link to defined "additive_animation" |
There was a problem hiding this comment.
This is in code shared between games, so this change needs to be guarded with Game::is_eu5()
| gui.items.push(GuiItem::ActionTooltip(guiblock)); | ||
| } | ||
| _ => { | ||
| let msg = "action tooltip needs to be a block"; |
There was a problem hiding this comment.
You can use bv.expect_block() instead of matching.
If you do want to match to give a nicer error message, then the error key should not be WrongGame :) Probably Structure.
| use crate::datatype::{Datatype, validate_datatypes}; | ||
| use crate::everything::Everything; | ||
| #[cfg(feature = "ck3")] | ||
| #[cfg(any(feature = "ck3", feature = "eu5"))] |
There was a problem hiding this comment.
Shouldn't this be for all games now? Since Game::is_eu5() is used in unguarded code
| } | ||
| } | ||
| } | ||
| GuiValidation::ActionTooltip => match bv { |
There was a problem hiding this comment.
Same comment about being able to use bv.expect_block()
| BV::Block(block) => { | ||
| if !Game::is_eu5() { | ||
| let msg = "action tooltip is only for EU5"; | ||
| err(ErrorKey::Gui).msg(msg).loc(block).push(); |
There was a problem hiding this comment.
Error key should be WrongGame here
| err(ErrorKey::Gui).msg(msg).loc(value).push(); | ||
| } | ||
| BV::Block(block) => { | ||
| if !Game::is_eu5() { |
There was a problem hiding this comment.
Needs a TODO for the else branch, so we don't forget
| | colormap_coordinates | ||
| | contextmenu_enabled | ||
| | contextmenu_widget | ||
| | debug_text |
There was a problem hiding this comment.
It actually is eu5 only :) In vic3 it's not a field. I'll have to think about how to make tiger handle that. But it shouldn't be removed from this match branch.
No description provided.