Fix volleyGun
This commit is contained in:
@@ -6,18 +6,18 @@ module Dodge.Item.BackgroundEffect (
|
||||
removeShieldWall,
|
||||
) where
|
||||
|
||||
import Dodge.Creature.Radius
|
||||
import Color
|
||||
import Dodge.Default.Wall
|
||||
import Dodge.Wall.Delete
|
||||
import Dodge.Item.HeldOffset
|
||||
import Dodge.Creature.Test
|
||||
import Geometry.Vector
|
||||
import Dodge.Wall.Move
|
||||
import Dodge.Wall.Create
|
||||
import Dodge.Item.Location
|
||||
import Dodge.Data.World
|
||||
import Control.Lens
|
||||
import Dodge.Creature.Radius
|
||||
import Dodge.Creature.Test
|
||||
import Dodge.Data.World
|
||||
import Dodge.Default.Wall
|
||||
import Dodge.Item.HeldOffset
|
||||
import Dodge.Item.Location
|
||||
import Dodge.Wall.Create
|
||||
import Dodge.Wall.Delete
|
||||
import Dodge.Wall.Move
|
||||
import Geometry.Vector
|
||||
|
||||
cancelExamineInventory :: World -> World
|
||||
cancelExamineInventory = hud . hudElement . subInventory %~ f
|
||||
@@ -39,7 +39,7 @@ rootNotrootEff f g it
|
||||
createShieldWall :: Item -> Creature -> World -> World
|
||||
createShieldWall it cr w = case it ^? itParams . flatShieldWlMIX . _Just of
|
||||
Nothing ->
|
||||
let (wlid, w') = createWall ((shieldWall' crid){_wlLine = wlline, _wlID = wlid}) w
|
||||
let (wlid, w') = createWall ((shieldWall crid){_wlLine = wlline, _wlID = wlid}) w
|
||||
in w' & pointerToItem it . itParams .~ FlatShieldParams (Just wlid)
|
||||
Just wid -> moveWallID wid wlline w
|
||||
where
|
||||
@@ -67,14 +67,15 @@ itEffectOnPickup _ _ = id
|
||||
itEffectOnDrop :: Item -> Creature -> World -> World
|
||||
itEffectOnDrop itm cr w = case itm ^. itType of
|
||||
HELD MINIGUNX{} -> w & pointerToItemID (_itID itm) . itParams . wTime .~ 0
|
||||
HELD MACHINEPISTOL{} -> w & pointerToItemID (_itID itm) . itParams
|
||||
.~ WarmTime 0 False Nothing
|
||||
HELD MACHINEPISTOL{} ->
|
||||
w & pointerToItemID (_itID itm) . itParams
|
||||
.~ WarmTime 0 False Nothing
|
||||
ITEMSCAN -> cancelExamineInventory w
|
||||
HELD FLATSHIELD -> removeShieldWall itm cr w
|
||||
_ -> w
|
||||
|
||||
shieldWall' :: Int -> Wall
|
||||
shieldWall' crid =
|
||||
shieldWall :: Int -> Wall
|
||||
shieldWall crid =
|
||||
defaultWall
|
||||
{ _wlColor = yellow
|
||||
, _wlOpacity = SeeAbove
|
||||
|
||||
Reference in New Issue
Block a user