diff --git a/input/kh2/drops/bright.toml b/input/kh2/drops/bright.toml index 3748495..3ef32db 100644 --- a/input/kh2/drops/bright.toml +++ b/input/kh2/drops/bright.toml @@ -29,7 +29,7 @@ from = "Cannon Gun" chance = 3 [[stone]] -from = "Drilelr Mole" +from = "Driller Mole" chance = 4 [[stone]] diff --git a/input/kh2/drops/frost.toml b/input/kh2/drops/frost.toml index ce57cb1..3dac640 100644 --- a/input/kh2/drops/frost.toml +++ b/input/kh2/drops/frost.toml @@ -5,7 +5,7 @@ from = "Hook Bat" chance = 6 [[shard]] -from = "Lance Solider" +from = "Lance Soldier" chance = 10 [[stone]] diff --git a/src/kh2.rs b/src/kh2.rs index 2803dba..35d45c6 100644 --- a/src/kh2.rs +++ b/src/kh2.rs @@ -17,10 +17,10 @@ pub struct MaterialDrops { impl MaterialDrops { fn drops(&self, kind: &str) -> &[EnemyDrop] { match kind { - x if x == "shard" => &self.shard, - x if x == "stone" => &self.stone, - x if x == "gem" => &self.gem, - x if x == "crystal" => &self.crystal, + "shard" => &self.shard, + "stone" => &self.stone, + "gem" => &self.gem, + "crystal" => &self.crystal, _ => &self.shard, } } @@ -32,6 +32,12 @@ pub struct EnemyDrop { chance: u8, } +impl EnemyDrop { + fn texture(&self) -> String { + self.from.replace(" ", "_").to_lowercase() + } +} + #[derive(Template)] #[template(path = "pages/kh2/drops.html")] struct DropsTemplate { diff --git a/templates/macros/kh2/macros.html b/templates/macros/kh2/macros.html index a42f875..6eff7a3 100644 --- a/templates/macros/kh2/macros.html +++ b/templates/macros/kh2/macros.html @@ -10,12 +10,9 @@