Fix transit tube overlay rendering

This commit is contained in:
Tad Hardesty 2019-11-16 19:27:00 -08:00
parent 8fc31897d2
commit 4d5973d6fb

View file

@ -468,7 +468,7 @@ impl<'a> GetVar<'a> for TypeRef<'a> {
///
/// Every atom has a default sprite, which may be disabled, and a list of
/// overlays.
#[derive(Default, Debug, Clone)]
#[derive(Debug, Clone)]
pub struct Sprite<'s> {
// filtering
pub category: u32, // type
@ -511,6 +511,22 @@ impl<'s> Sprite<'s> {
}
}
impl<'s> Default for Sprite<'s> {
fn default() -> Self {
Sprite {
category: 0,
icon: "",
icon_state: "",
dir: 0,
color: [255, 255, 255, 255],
ofs_x: 0,
ofs_y: 0,
plane: 0,
layer: 0,
}
}
}
fn category_of(path: &str) -> u32 {
if path.starts_with("/area") {
1