Improve forcefield visuals
This commit is contained in:
@@ -9,6 +9,7 @@ import Dodge.Default.Wall
|
||||
import Dodge.Creature.Test
|
||||
import Dodge.Creature.HandPos
|
||||
import Dodge.Wall
|
||||
import Dodge.Wall.ForceField
|
||||
import Dodge.Magnet
|
||||
import Picture
|
||||
import Geometry
|
||||
@@ -80,7 +81,7 @@ wristArmour = defaultEquipment
|
||||
onEquipWristShield :: Item -> Creature -> World -> World
|
||||
onEquipWristShield itm cr w = w
|
||||
& creatures . ix (_crID cr) . crInv . ix (fromJust (_itInvPos itm)) . itUse . eqEq . eqParams .~ EquipID i
|
||||
& walls . at i ?~ (shieldWall (_crID cr)) {_wlDraw = True,_wlID = i}
|
||||
& walls . at i ?~ forceField {_wlID = i}
|
||||
& setWristShieldPos (itm & itUse . eqEq . eqParams .~ EquipID i) cr
|
||||
where
|
||||
i = IM.newKey (_walls w)
|
||||
|
||||
@@ -5,6 +5,7 @@ import Dodge.Data
|
||||
import Dodge.Wall.Reflect
|
||||
--import Dodge.Creature.HandPos
|
||||
import Dodge.WorldEvent
|
||||
import Dodge.Base.Collide
|
||||
--import Dodge.Default
|
||||
--import Dodge.Item.Weapon.InventoryDisplay
|
||||
--import Dodge.Item.Weapon.TriggerType
|
||||
@@ -27,7 +28,7 @@ reflectLaserAlong phasev seenWl sp ep w = case find (notseen seenWl)
|
||||
Just (p,Right wl)
|
||||
| _wlReflect wl -> second (p:) $ reflectLaserAlong phasev (wl:seenWl) p
|
||||
(p +.+ 800 *.* unitVectorAtAngle (reflDirWall sp p wl)) w
|
||||
| _wlOpacity wl == SeeThrough -> second (p:) $ reflectLaserAlong phasev (wl:seenWl) p
|
||||
| wlIsSeeThrough wl -> second (p:) $ reflectLaserAlong phasev (wl:seenWl) p
|
||||
(refract sp ep wl p) w
|
||||
| otherwise -> (Just (p,Right wl), [p])
|
||||
Just (p,obj) -> (Just (p,obj), [p])
|
||||
|
||||
Reference in New Issue
Block a user