Make items recoverable from base type
This commit is contained in:
+17
-12
@@ -1,7 +1,23 @@
|
||||
module Dodge.Item.Equipment where
|
||||
module Dodge.Item.Equipment
|
||||
( module Dodge.Item.Equipment.Booster
|
||||
, magShield
|
||||
, powerLegs
|
||||
, flatShield
|
||||
, wristInvisibility
|
||||
, wristArmour
|
||||
, brainHat
|
||||
, frontArmour
|
||||
, headLamp
|
||||
, headLamp1
|
||||
, jetPack
|
||||
, speedLegs
|
||||
, jumpLegs
|
||||
, flameShield
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Dodge.Item.Draw
|
||||
import Dodge.Item.Equipment.Shape
|
||||
import Dodge.Item.Equipment.Booster
|
||||
import Dodge.LightSource
|
||||
import Dodge.Default
|
||||
import Dodge.Default.Wall
|
||||
@@ -134,17 +150,6 @@ flatShieldEquipSPic _ =
|
||||
( colorSH yellow $ upperPrismPoly 10 (rectWH 2 10)
|
||||
, mempty
|
||||
)
|
||||
effectOnEquip :: (Creature -> Item -> World -> World) -> ItEffect
|
||||
effectOnEquip f = ItInvEffectID
|
||||
{ _ieInv = g f
|
||||
, _ieMID = Nothing
|
||||
}
|
||||
where
|
||||
g f' itm cr w
|
||||
| _crInvSel cr == invid = f' cr (_crInv (_creatures w IM.! _crID cr) IM.! invid) w
|
||||
| otherwise = w
|
||||
where
|
||||
invid = fromJust $ _itInvPos itm
|
||||
|
||||
shieldWall :: Int -> Wall
|
||||
shieldWall crid = defaultWall
|
||||
|
||||
Reference in New Issue
Block a user