make hacking not abortable by NPCs

This commit is contained in:
nek0 2018-09-01 18:27:18 +02:00
parent 6c54aabc94
commit 8d2aba5f7b

View file

@ -187,7 +187,9 @@ instance ObjectAction ObjType ObjState where
}
return e
objectTransition ObjComputer "hack" pa ent = do
objectTransition ObjComputer "hack" pa ent =
if pa
then do
[e] <- efor (anEnt ent) $ do
let nstat = AnimState
(AnimId "computer" "off" N)
@ -202,6 +204,7 @@ instance ObjectAction ObjType ObjState where
, objSolved = if pa then Set (ost < 0) else Keep
}
return e
else return unchanged
objectTransition _ _ _ _ = return unchanged