Commit before attempting to move some data into a "local" world type
This commit is contained in:
@@ -47,6 +47,7 @@ poisonSprayer = defaultAutoGun
|
||||
]
|
||||
& useAim . aimSpeed .~ 0.2
|
||||
& useAim . aimRange .~ 0
|
||||
& useAim . aimStance .~ TwoHandTwist
|
||||
, _wpRange = 8
|
||||
, _itFloorPict = flamerPic
|
||||
, _itZoom = defaultItZoom
|
||||
@@ -64,12 +65,14 @@ flamer = defaultAutoGun
|
||||
}
|
||||
, _itUse = ruseInstant (\_ -> randWalkAngle 0.2 0.01 aFlame) NoHammer
|
||||
[ ammoCheckI
|
||||
, useAmmo 1
|
||||
, withSidePushI 5
|
||||
--, withTempLight 1 100 (V3 1 0 0)
|
||||
, withSidePushAfterI 20
|
||||
]
|
||||
& useAim . aimSpeed .~ 0.5
|
||||
& useAim . aimZoom .~ defaultItZoom {_itZoomMax = 5, _itZoomMin = 1.5}
|
||||
& useAim . aimStance .~ TwoHandTwist
|
||||
, _wpSpread = 0
|
||||
, _wpRange = 8
|
||||
, _itFloorPict = flamerPic
|
||||
|
||||
@@ -60,7 +60,7 @@ shrinkGun = defaultGun
|
||||
, _wpLoadedAmmo = 100
|
||||
, _wpReloadTime = 20
|
||||
}
|
||||
, _itUse = defaultlUse {_lUse = hammerCheckL $ \cr invid -> useShrinkGun (_crInv cr IM.! invid) cr}
|
||||
, _itUse = defaultlUse {_lUse = hammerCheckL useShrinkGun}
|
||||
& useHammer .~ upHammer
|
||||
, _wpSpread = 0.05
|
||||
, _wpRange = 20
|
||||
@@ -73,13 +73,14 @@ shrinkGunPic _ = noPic $ colorSH violet $ upperPrismPoly 5 $ square 5
|
||||
|
||||
-- be careful changing this around; potential problems include updating the
|
||||
-- creature but using the old crInvSel value
|
||||
useShrinkGun :: Item -> Creature -> World -> World
|
||||
useShrinkGun it cr w = if _itBool $ _itAttachment it
|
||||
then tryResize 0.5 $ stripNoItems cr . f False UndroppableIdentified . dropUnselected cr
|
||||
useShrinkGun :: Creature -> Int -> World -> World
|
||||
useShrinkGun cr invid w = if _itBool $ _itAttachment it
|
||||
then tryResize 0.5 $ stripNoItems cr . f False UndroppableIdentified . dropExcept cr invid
|
||||
else tryResize 1 $ f True Uncursed . setMinInvSize defaultInvSize cr
|
||||
where
|
||||
it = _crInv cr IM.! invid
|
||||
tryResize x g = maybe w g $ sizeSelf x cr w
|
||||
f isInUse cstatus = creatures . ix (_crID cr) . crInv . ix (_crInvSel cr) %~
|
||||
f isInUse cstatus = creatures . ix (_crID cr) . crInv . ix invid %~
|
||||
( (itAttachment . itBool .~ isInUse) . (itCurseStatus .~ cstatus) )
|
||||
|
||||
blinkGun :: Item
|
||||
|
||||
Reference in New Issue
Block a user