Another update for unloaded smokers
This commit is contained in:
parent
627fa71a4e
commit
a3560e8e65
Binary file not shown.
Binary file not shown.
@ -12,10 +12,17 @@ Event OnEffectStart(Actor akTarget, Actor akCaster)
|
|||||||
; Debug.Trace(self + ": OnEffectStart, " + akTarget)
|
; Debug.Trace(self + ": OnEffectStart, " + akTarget)
|
||||||
|
|
||||||
Target = akTarget
|
Target = akTarget
|
||||||
|
GotoState("Smoking")
|
||||||
|
EndEvent
|
||||||
|
|
||||||
|
state Smoking
|
||||||
|
|
||||||
|
event OnBeginState()
|
||||||
|
; Debug.Trace(self + ": Registering for updates, " + Target)
|
||||||
AnimationStage = 0
|
AnimationStage = 0
|
||||||
RegisterForSingleUpdate(1.5)
|
RegisterForSingleUpdate(1.5)
|
||||||
RegisterForSleep()
|
RegisterForSleep()
|
||||||
EndEvent
|
endevent
|
||||||
|
|
||||||
Event OnUpdate()
|
Event OnUpdate()
|
||||||
_LockAnimationUpdates()
|
_LockAnimationUpdates()
|
||||||
@ -43,25 +50,6 @@ Event OnUpdate()
|
|||||||
_UnlockAnimationUpdates()
|
_UnlockAnimationUpdates()
|
||||||
EndEvent
|
EndEvent
|
||||||
|
|
||||||
Event OnPackageChange(Package akOldPackage)
|
|
||||||
; Debug.Trace(self + ": OnPackageChange, " + Target + ", old package " + akOldPackage)
|
|
||||||
|
|
||||||
; Failsafe auto-stop smoking on package change
|
|
||||||
Target.RemoveSpell(_00E_Smoking_CrossLeggedMarkerSP)
|
|
||||||
EndEvent
|
|
||||||
|
|
||||||
Event OnCellAttach()
|
|
||||||
If ! bIsFinished
|
|
||||||
RegisterForSingleUpdate(1.0)
|
|
||||||
RegisterForSleep()
|
|
||||||
endif
|
|
||||||
endEvent
|
|
||||||
|
|
||||||
Event OnCellDetach()
|
|
||||||
UnregisterForUpdate()
|
|
||||||
UnregisterForSleep()
|
|
||||||
endEvent
|
|
||||||
|
|
||||||
Event OnSleepStart(float afSleepStartTime, float afDesiredSleepEndTime)
|
Event OnSleepStart(float afSleepStartTime, float afDesiredSleepEndTime)
|
||||||
; Debug.Trace(self + ": OnSleepStart, " + Target)
|
; Debug.Trace(self + ": OnSleepStart, " + Target)
|
||||||
|
|
||||||
@ -78,6 +66,31 @@ Event OnSleepStart(float afSleepStartTime, float afDesiredSleepEndTime)
|
|||||||
_UnlockAnimationUpdates()
|
_UnlockAnimationUpdates()
|
||||||
EndEvent
|
EndEvent
|
||||||
|
|
||||||
|
Event OnCellDetach()
|
||||||
|
GotoState("")
|
||||||
|
endEvent
|
||||||
|
|
||||||
|
event OnEndState()
|
||||||
|
; Debug.Trace(self + ": Unregistering for updates, " + Target)
|
||||||
|
UnregisterForUpdate()
|
||||||
|
UnregisterForSleep()
|
||||||
|
endevent
|
||||||
|
|
||||||
|
endstate
|
||||||
|
|
||||||
|
Event OnCellAttach()
|
||||||
|
If ! bIsFinished
|
||||||
|
GotoState("Smoking")
|
||||||
|
endif
|
||||||
|
endEvent
|
||||||
|
|
||||||
|
Event OnPackageChange(Package akOldPackage)
|
||||||
|
; Debug.Trace(self + ": OnPackageChange, " + Target + ", old package " + akOldPackage)
|
||||||
|
|
||||||
|
; Failsafe auto-stop smoking on package change
|
||||||
|
Target.RemoveSpell(_00E_Smoking_CrossLeggedMarkerSP)
|
||||||
|
EndEvent
|
||||||
|
|
||||||
Event OnEffectFinish(Actor akTarget, Actor akCaster)
|
Event OnEffectFinish(Actor akTarget, Actor akCaster)
|
||||||
; Debug.Trace(self + ": OnEffectFinish, " + Target)
|
; Debug.Trace(self + ": OnEffectFinish, " + Target)
|
||||||
|
|
||||||
|
@ -37,7 +37,9 @@ EVENT onActivate(objectReference actronaut)
|
|||||||
UnlockMeMSG.show()
|
UnlockMeMSG.show()
|
||||||
endif
|
endif
|
||||||
; either way, play a nice ker-chunk sound to feedback why door isn't opening
|
; either way, play a nice ker-chunk sound to feedback why door isn't opening
|
||||||
|
if barredSFX
|
||||||
barredSFX.play(self)
|
barredSFX.play(self)
|
||||||
|
endif
|
||||||
; add a tiny rumble bump for good measure
|
; add a tiny rumble bump for good measure
|
||||||
game.shakeController(0.1, 0.1, 0.1)
|
game.shakeController(0.1, 0.1, 0.1)
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user