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),
Ice,
MovableBlock,
Teleporter,
}
#[derive(Debug)]
@ -844,6 +845,7 @@ impl From<level::Item> for EntityType {
level::Item::Ice => EntityType::Ice,
level::Item::MovableBlock => EntityType::MovableBlock,
level::Item::Glove => EntityType::Item(Item::Glove),
level::Item::Teleporter => EntityType::Teleporter,
}
}
}

View file

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

View file

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