add teleporter entity type

This commit is contained in:
Corwin 2023-08-29 21:24:30 +01:00
parent a7cbb60b20
commit 07c5afb990
No known key found for this signature in database
3 changed files with 7 additions and 0 deletions

View file

@ -568,6 +568,7 @@ pub enum EntityType {
Spikes(Switchable), Spikes(Switchable),
Ice, Ice,
MovableBlock, MovableBlock,
Teleporter,
} }
#[derive(Debug)] #[derive(Debug)]
@ -844,6 +845,7 @@ impl From<level::Item> for EntityType {
level::Item::Ice => EntityType::Ice, level::Item::Ice => EntityType::Ice,
level::Item::MovableBlock => EntityType::MovableBlock, level::Item::MovableBlock => EntityType::MovableBlock,
level::Item::Glove => EntityType::Item(Item::Glove), level::Item::Glove => EntityType::Item(Item::Glove),
level::Item::Teleporter => EntityType::Teleporter,
} }
} }
} }

View file

@ -21,6 +21,7 @@ pub enum Item {
Ice, Ice,
MovableBlock, MovableBlock,
Glove, Glove,
Teleporter,
} }
impl Item { impl Item {
@ -43,6 +44,7 @@ impl Item {
Item::Ice => resources::ICE, Item::Ice => resources::ICE,
Item::MovableBlock => resources::ROCK_SHADOW, Item::MovableBlock => resources::ROCK_SHADOW,
Item::Glove => resources::POW_GLOVE_SHADOW, Item::Glove => resources::POW_GLOVE_SHADOW,
Item::Teleporter => resources::TELEPORTER,
} }
} }
@ -65,6 +67,7 @@ impl Item {
Item::Ice => resources::ICE, Item::Ice => resources::ICE,
Item::MovableBlock => resources::ROCK, Item::MovableBlock => resources::ROCK,
Item::Glove => resources::POW_GLOVE, Item::Glove => resources::POW_GLOVE,
Item::Teleporter => resources::TELEPORTER,
} }
} }
@ -90,6 +93,7 @@ impl Item {
Item::Ice => ZERO, Item::Ice => ZERO,
Item::MovableBlock => ZERO, Item::MovableBlock => ZERO,
Item::Glove => STANDARD, Item::Glove => STANDARD,
Item::Teleporter => ZERO,
} }
} }
} }

View file

@ -54,6 +54,7 @@ named_tag!(
ROCK_SHADOW, ROCK_SHADOW,
POW_GLOVE, POW_GLOVE,
POW_GLOVE_SHADOW, POW_GLOVE_SHADOW,
TELEPORTER,
] ]
); );