tracer/src/Object.hs

27 lines
582 B
Haskell
Raw Normal View History

{-# 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
}