Rethink item ammo to item consumables, start item type datatype
This commit is contained in:
@@ -79,10 +79,10 @@ itemLaserScopeEffect
|
||||
--glowPoint = case listToMaybe $ thingsHitLongLine sp xp w of
|
||||
-- Just (pos,E3x2 wl) -> pos +.+ 2 *.* wallNormal wl
|
||||
-- _ -> ep -.- 2 *.* unitVectorAtAngle d
|
||||
it = (cr ^. crInv) IM.! invid
|
||||
wpammo = _itConsumption $ (cr ^. crInv) IM.! invid
|
||||
reloadFrac
|
||||
| _wpLoadedAmmo (_wpAmmo it) == 0 = 1
|
||||
| otherwise = fromIntegral (_wpReloadState (_wpAmmo it)) / fromIntegral (_wpReloadTime (_wpAmmo it))
|
||||
| _wpLoadedAmmo wpammo == 0 = 1
|
||||
| otherwise = fromIntegral (_wpReloadState wpammo) / fromIntegral (_wpReloadTime wpammo)
|
||||
--col = mixColors reloadFrac (1-reloadFrac) red green
|
||||
{- | Automatically send out radar pulses that detect walls. -}
|
||||
autoRadarEffect :: ItEffect
|
||||
|
||||
Reference in New Issue
Block a user