make copying not abortable

This commit is contained in:
nek0 2018-08-11 09:11:54 +02:00
parent f78b69b6f0
commit 35337651a0

View file

@ -50,16 +50,20 @@ instance ObjectAction ObjType ObjState where
objectTransition ObjCopier "copying" _ ent = do
[e] <- efor (anEnt ent) $ do
let nstat = AnimState
(AnimId "copier" "open" N)
0
0
return unchanged
{ anim = Set nstat
, objState = Set "idle"
, objStateTime = Unset
, objPlayerActivated = Unset
}
ttl <- query objStateTime
if ttl < 0
then do
let nstat = AnimState
(AnimId "copier" "open" N)
0
0
return unchanged
{ anim = Set nstat
, objState = Set "idle"
, objStateTime = Unset
, objPlayerActivated = Unset
}
else return unchanged
return e
objectTransition _ _ _ _ = return unchanged