about summary refs log tree commit diff
path: root/src/game.rs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2019-07-20T01·55-0400
committerGriffin Smith <root@gws.fyi>2019-07-20T01·55-0400
commit29c80ac8ba0d733c6c452d8fd39e9561553495b0 (patch)
treef8384229d84b0d281c2fbbe976aeb5ebc21bdc24 /src/game.rs
parent4e9138aa6ff72e34392e3467c40d5ddf095f0027 (diff)
Add the beginning of item entities
Add a new Item raw type and entity type, with preliminary, basic support
for food. There's a really frustrating toml-rs bug that prevents writing
these nicely as toml right now, so I also added support for mixing JSON
and TOML in a single config dir
Diffstat (limited to 'src/game.rs')
-rw-r--r--src/game.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game.rs b/src/game.rs
index af9b0ac938dd..c4fc6d2be10a 100644
--- a/src/game.rs
+++ b/src/game.rs
@@ -1,5 +1,7 @@
 use crate::display::{self, Viewport};
-use crate::entities::{Character, Creature, Entity, EntityID, Identified};
+use crate::entities::{
+    Character, Creature, Entity, EntityID, Identified, Item,
+};
 use crate::messages::message;
 use crate::settings::Settings;
 use crate::types::command::Command;
@@ -80,6 +82,9 @@ impl<'a> Game<'a> {
                 "gormlak",
                 pos(10, 0),
             )));
+
+            entities
+                .insert(Box::new(Item::new_from_raw("noodles", pos(0, 10))));
         }
 
         Game {