Make distribution terminal handle its own sound
This commit is contained in:
@@ -127,13 +127,13 @@ tmDistributeAmmo tm w = fromMaybe w $ do
|
|||||||
& cWorld . lWorld . terminals . ix (tm ^. tmID) . tmFutureLines .~
|
& cWorld . lWorld . terminals . ix (tm ^. tmID) . tmFutureLines .~
|
||||||
[TLine 1 [TerminalLineConst (g (aamount - newaamount)) white] TmWdId
|
[TLine 1 [TerminalLineConst (g (aamount - newaamount)) white] TmWdId
|
||||||
,TLine 1 [TerminalLineConst (shortShow newaamount <>" "<>show atype<>" AVAILABLE") white] TmWdId
|
,TLine 1 [TerminalLineConst (shortShow newaamount <>" "<>show atype<>" AVAILABLE") white] TmWdId
|
||||||
|
,TLine 1 [] (TmWdWdTermSound (getsid (aamount - newaamount)))
|
||||||
,TLine 1 [TerminalLineConst "" yellow] (TmTmSetStatus (TerminalPressTo ""))
|
,TLine 1 [TerminalLineConst "" yellow] (TmTmSetStatus (TerminalPressTo ""))
|
||||||
,TLine 1 [TerminalLineConst "" white] TmWdWdPowerDownTerminal
|
,TLine 1 [TerminalLineConst "" white] TmWdWdPowerDownTerminal
|
||||||
]
|
]
|
||||||
& dosound (aamount - newaamount) p
|
|
||||||
where
|
where
|
||||||
dosound x p | x > 0 = soundStart TerminalSound p reloadS Nothing
|
getsid x | x > 0 = reloadS
|
||||||
| otherwise = soundStart TerminalSound p dedumS Nothing
|
| otherwise = dedumS
|
||||||
g 0 = "NO SUITABLE RECIPIENTS"
|
g 0 = "NO SUITABLE RECIPIENTS"
|
||||||
g _ = "SUCCESFUL"
|
g _ = "SUCCESFUL"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user