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 .~
|
||||
[TLine 1 [TerminalLineConst (g (aamount - newaamount)) 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 "" white] TmWdWdPowerDownTerminal
|
||||
]
|
||||
& dosound (aamount - newaamount) p
|
||||
where
|
||||
dosound x p | x > 0 = soundStart TerminalSound p reloadS Nothing
|
||||
| otherwise = soundStart TerminalSound p dedumS Nothing
|
||||
getsid x | x > 0 = reloadS
|
||||
| otherwise = dedumS
|
||||
g 0 = "NO SUITABLE RECIPIENTS"
|
||||
g _ = "SUCCESFUL"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user