{-# LANGUAGE MultiParamTypeClasses #-} module Object where import Affection import Data.Ecstasy import Types instance ObjectAction UserData ObjType where objectAction ObjCopier ent = do ud <- getAffection (nws, _) <- liftIO $ yieldSystemT (worldState ud) $ do emap (anEnt ent) $ do with anim liftIO $ logIO Debug "copying!" let nstat = AnimState (AnimId "copier" "copy" N) 0 0 return unchanged { anim = Set nstat } putAffection ud { worldState = nws } objectAction _ _ = return ()