diff options
author | Griffin Smith <root@gws.fyi> | 2020-02-17T18·14-0500 |
---|---|---|
committer | Griffin Smith <root@gws.fyi> | 2020-02-17T18·14-0500 |
commit | f6eeccbb0fd833b5d6d710e87e9c41d432341b9a (patch) | |
tree | 88d5a3bdfe477cf9586ef8e9d03c34d4c89c377a /src/Xanthous/Entities | |
parent | 25a1c5ade32ee0dca41b8057f053972e4ab816d7 (diff) |
Add Staircase to the list of all entities
Forgot to do this when I added staircases - this is necessary for loading saved games.
Diffstat (limited to 'src/Xanthous/Entities')
-rw-r--r-- | src/Xanthous/Entities/Entities.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Xanthous/Entities/Entities.hs b/src/Xanthous/Entities/Entities.hs index 55991fc28428..62e6e15c9853 100644 --- a/src/Xanthous/Entities/Entities.hs +++ b/src/Xanthous/Entities/Entities.hs @@ -26,6 +26,7 @@ instance Arbitrary SomeEntity where , SomeEntity <$> arbitrary @Wall , SomeEntity <$> arbitrary @Door , SomeEntity <$> arbitrary @GroundMessage + , SomeEntity <$> arbitrary @Staircase ] instance FromJSON SomeEntity where @@ -38,6 +39,7 @@ instance FromJSON SomeEntity where "Wall" -> SomeEntity @Wall <$> obj .: "data" "Door" -> SomeEntity @Door <$> obj .: "data" "GroundMessage" -> SomeEntity @GroundMessage <$> obj .: "data" + "Staircase" -> SomeEntity @Staircase <$> obj .: "data" _ -> fail . unpack $ "Invalid entity type \"" <> entityType <> "\"" deriving via WithOptions '[ FieldLabelModifier '[Drop 1] ] GameLevel |