Implement pulse rifle with explodable pulse balls
This commit is contained in:
@@ -34,7 +34,7 @@ mcTypeUpdate mc = case mc ^. mcType of
|
||||
|
||||
terminalScreenGlow :: Machine -> World -> World
|
||||
terminalScreenGlow mc w = fromMaybe w $ do
|
||||
tid <- mc ^? mcMounts . ix ObTerminal
|
||||
tid <- mc ^? mcMounts . ix OTTerminal
|
||||
term <- w ^? cWorld . lWorld . terminals . ix tid
|
||||
V4 x y z _ <- termScreenColor term
|
||||
return $
|
||||
@@ -92,7 +92,7 @@ mcUseItem mc = fromMaybe id $ do
|
||||
|
||||
mcSensorTriggerUpdate :: Sensor -> Machine -> World -> World
|
||||
mcSensorTriggerUpdate se mc = fromMaybe id $ do
|
||||
trid <- mc ^? mcMounts . ix ObTrigger
|
||||
trid <- mc ^? mcMounts . ix OTTrigger
|
||||
bval <- mcTriggerVal se
|
||||
return $ cWorld . lWorld . triggers . ix trid ||~ bval
|
||||
|
||||
@@ -172,7 +172,7 @@ senseDamage threshold dt mc =
|
||||
x = sum . map _dmAmount $ filter f (_mcDamage mc)
|
||||
ni = fromIntegral (mc ^?! mcType . _McSensor . sensAmount) / fromIntegral threshold
|
||||
updatels = fromMaybe id $ do
|
||||
lsid <- mc ^? mcMounts . ix ObLightSource
|
||||
lsid <- mc ^? mcMounts . ix OTLightSource
|
||||
return $ cWorld . lWorld . lightSources . ix lsid . lsParam . lsCol .~ V3 ni ni ni
|
||||
|
||||
sensorTypeDamages :: SensorType -> Damage -> Bool
|
||||
|
||||
Reference in New Issue
Block a user