20 lines
540 B
Haskell
20 lines
540 B
Haskell
{-# LANGUAGE TypeSynonymInstances #-}
|
|
{-# LANGUAGE FlexibleInstances #-}
|
|
{-# LANGUAGE MultiParamTypeClasses #-}
|
|
module Object.ActionTime where
|
|
|
|
import Affection as A
|
|
|
|
-- internal imports
|
|
|
|
import Types
|
|
|
|
instance ActionTime ObjType ObjState where
|
|
actionTime ObjCopier "copying" = 5
|
|
actionTime ObjComputer "off" = 0
|
|
actionTime ObjComputer "on" = 20
|
|
actionTime ObjComputer "hack" = 20
|
|
actionTime ObjComputer "hack" = 20
|
|
actionTime ObjDoor "open" = 2
|
|
|
|
actionTime o s = A.log Error (show o ++ ": " ++ s ++ ": has not a time") 0
|