a room's endings is actually a hashmap of ending IDs, not whole endings
This commit is contained in:
parent
730e253e03
commit
753e1142c0
10
src/main.rs
10
src/main.rs
|
@ -86,12 +86,12 @@ struct Ending {
|
|||
#[derive(Debug, Eq, PartialEq)]
|
||||
struct Room {
|
||||
id: String,
|
||||
palette: String, /// id
|
||||
palette: String, // id
|
||||
name: Option<String>,
|
||||
tiles: Vec<String>, /// tile ids
|
||||
items: HashMap<Position, String>, /// item id
|
||||
tiles: Vec<String>, // tile ids
|
||||
items: HashMap<Position, String>, // item id
|
||||
exits: HashMap<Position, Exit>,
|
||||
endings: HashMap<Position, Ending>,
|
||||
endings: HashMap<Position, String>, // ending id
|
||||
}
|
||||
|
||||
#[derive(Debug, Eq, PartialEq)]
|
||||
|
@ -711,7 +711,7 @@ fn room_from_string(string: String) -> Room {
|
|||
let mut palette = "0".to_string();
|
||||
let mut items: HashMap<Position, String> = HashMap::new();
|
||||
let mut exits: HashMap<Position, Exit> = HashMap::new();
|
||||
let endings: HashMap<Position, Ending> = HashMap::new();
|
||||
let mut endings: HashMap<Position, String> = HashMap::new();
|
||||
|
||||
loop {
|
||||
let last_line = lines.pop().unwrap();
|
||||
|
|
Loading…
Reference in New Issue