Stop weapon fire after using up consumables

This commit is contained in:
2022-03-22 11:38:30 +00:00
parent 0d5182e8db
commit 873abea79f
5 changed files with 27 additions and 17 deletions
+5 -1
View File
@@ -60,7 +60,9 @@ analyser' starts sucs fails afters upf pslight psmc = extTrigLitPos pslight $ \t
(\mc -> buttons . ix btid . btTerminalParams .~
TerminalParams
{ _termDisplayedLines = []
, _termFutureLines = map simpleline starts
, _termFutureLines =
map simpleline topflush
++ map simpleline starts
++ [testline' (_mcID mc)]
++ map simpleline afters
, _termMaxLines = 7
@@ -69,6 +71,8 @@ analyser' starts sucs fails afters upf pslight psmc = extTrigLitPos pslight $ \t
)
(\mc -> upf mc . (triggers . ix (fromJust $ _plMID tp) .~ const (_sensToggle $ _mcSensor mc))
)
allstrings = sucs : fails : afters ++ starts
topflush = [replicate i ' ' ++ "*" | i <- [0,3 .. maximum (map length allstrings)]]
simpleline str = TerminalLineDisplay {_tlPause = 0, _tlString = const (str,white)}
testline' mcid = TerminalLineDisplay 0 (testline mcid)
testline mcid w = case w ^? machines . ix mcid . mcSensor . sensToggle of