convert int IDs to strings
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
use crate::{from_base36, optional_data_line, AnimationFrames, Image, ToBase36};
|
||||
use crate::{optional_data_line, AnimationFrames, Image};
|
||||
use crate::image::animation_frames_from_string;
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct Item {
|
||||
pub id: u64,
|
||||
pub id: String,
|
||||
pub animation_frames: Vec<Image>,
|
||||
pub name: Option<String>,
|
||||
pub dialogue_id: Option<String>,
|
||||
@@ -32,7 +32,7 @@ impl From<String> for Item {
|
||||
fn from(string: String) -> Item {
|
||||
let mut lines: Vec<&str> = string.lines().collect();
|
||||
|
||||
let id = from_base36(&lines[0].replace("ITM ", ""));
|
||||
let id = lines[0].replace("ITM ", "");
|
||||
let mut name = None;
|
||||
let mut dialogue_id = None;
|
||||
let mut colour_id: Option<u64> = None;
|
||||
@@ -71,7 +71,7 @@ impl ToString for Item {
|
||||
fn to_string(&self) -> String {
|
||||
format!(
|
||||
"ITM {}\n{}{}{}{}",
|
||||
self.id.to_base36(),
|
||||
self.id,
|
||||
self.animation_frames.to_string(),
|
||||
self.name_line(),
|
||||
self.dialogue_line(),
|
||||
|
||||
Reference in New Issue
Block a user