make hacking not abortable by NPCs
This commit is contained in:
parent
6c54aabc94
commit
8d2aba5f7b
1 changed files with 18 additions and 15 deletions
|
@ -187,21 +187,24 @@ instance ObjectAction ObjType ObjState where
|
|||
}
|
||||
return e
|
||||
|
||||
objectTransition ObjComputer "hack" pa ent = do
|
||||
[e] <- efor (anEnt ent) $ do
|
||||
let nstat = AnimState
|
||||
(AnimId "computer" "off" N)
|
||||
0
|
||||
0
|
||||
ost <- query objStateTime
|
||||
return unchanged
|
||||
{ anim = Set nstat
|
||||
, objState = Set "off"
|
||||
, objPlayerActivated = Unset
|
||||
, objStateTime = Unset
|
||||
, objSolved = if pa then Set (ost < 0) else Keep
|
||||
}
|
||||
return e
|
||||
objectTransition ObjComputer "hack" pa ent =
|
||||
if pa
|
||||
then do
|
||||
[e] <- efor (anEnt ent) $ do
|
||||
let nstat = AnimState
|
||||
(AnimId "computer" "off" N)
|
||||
0
|
||||
0
|
||||
ost <- query objStateTime
|
||||
return unchanged
|
||||
{ anim = Set nstat
|
||||
, objState = Set "off"
|
||||
, objPlayerActivated = Unset
|
||||
, objStateTime = Unset
|
||||
, objSolved = if pa then Set (ost < 0) else Keep
|
||||
}
|
||||
return e
|
||||
else return unchanged
|
||||
|
||||
objectTransition _ _ _ _ = return unchanged
|
||||
|
||||
|
|
Loading…
Reference in a new issue