Make distribution terminal handle its own sound

This commit is contained in:
2025-12-26 11:42:18 +00:00
parent ada80fb925
commit de5a5854bf
+3 -3
View File
@@ -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"