From 833e44a019885249d02294bdce4353988778b397 Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Tue, 14 Apr 2020 00:40:29 +0100 Subject: [PATCH] update mocks --- src/mock.rs | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/src/mock.rs b/src/mock.rs index f6e3c8b..eddc7c7 100644 --- a/src/mock.rs +++ b/src/mock.rs @@ -62,8 +62,9 @@ pub fn avatar() -> Avatar { ] }, ], - room: "0".to_string(), - position: Position { x: 2, y: 5 } + room_id: 0, + position: Position { x: 2, y: 5 }, + colour_id: None, } } @@ -71,7 +72,7 @@ pub fn tile_default() -> Tile { Tile { id: 10, name: None, - wall: false, + wall: None, animation_frames: vec![ Image { pixels: vec![ @@ -85,7 +86,8 @@ pub fn tile_default() -> Tile { 1,1,1,1,1,1,1,1, ] } - ] + ], + colour_id: None } } @@ -108,11 +110,9 @@ pub fn sprite() -> Sprite { } ], dialogue_id: Some("SPR_0".to_string()), - room_id: 4, - position: Position { - x: 9, - y: 7 - } + room_id: Some(4), + position: Some(Position { x: 9, y: 7 }), + colour_id: None, } } @@ -134,7 +134,8 @@ pub fn item() -> Item { } ], name: Some("door".to_string()), - dialogue_id: Some("ITM_2".to_string()) + dialogue_id: Some("ITM_2".to_string()), + colour_id: None } } @@ -246,8 +247,9 @@ pub fn game_default() -> Game { ] } ], - room: "0".to_string(), - position: Position { x: 4, y: 4 } + room_id: 0, + position: Position { x: 4, y: 4 }, + colour_id: None, }, sprites: vec![ Sprite { @@ -268,8 +270,9 @@ pub fn game_default() -> Game { } ], dialogue_id: Some("SPR_0".to_string()), - room_id: 0, - position: Position { x: 8, y: 12 } + room_id: Some(0), + position: Some(Position { x: 8, y: 12 }), + colour_id: None, } ], items: vec![ @@ -290,7 +293,8 @@ pub fn game_default() -> Game { }, ], name: Some("tea".to_string()), - dialogue_id: Some("ITM_0".to_string()) + dialogue_id: Some("ITM_0".to_string()), + colour_id: None }, ], dialogues: vec![