implement ToBase36 for u64; room id to u64; sprite id to u64; tile id to u64; sprite.dialogue -> sprite.dialogue_id
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::{Exit, ExitInstance, Instance, mock, Position, from_base36, to_base36};
|
||||
use crate::{Exit, ExitInstance, Instance, mock, Position, from_base36, ToBase36};
|
||||
|
||||
#[derive(Debug, Eq, PartialEq)]
|
||||
pub struct Room {
|
||||
@@ -123,13 +123,13 @@ impl ToString for Room {
|
||||
|
||||
format!(
|
||||
"ROOM {}\n{}{}{}{}{}\nPAL {}",
|
||||
to_base36(self.id),
|
||||
self.id.to_base36(),
|
||||
tiles,
|
||||
if self.name.as_ref().is_some() { format!("\nNAME {}", self.name.as_ref().unwrap()) } else { "".to_string() },
|
||||
items,
|
||||
exits,
|
||||
endings,
|
||||
to_base36(self.palette_id)
|
||||
self.palette_id.to_base36()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user