Rename ItemAttachments
This commit is contained in:
@@ -73,7 +73,7 @@ autoGun = defaultAutoGun
|
||||
-- , _itFloorPict = autoGunPic
|
||||
-- , _itZoom = defaultItZoom
|
||||
, _itEquipPict = pictureWeaponOnAim
|
||||
, _itAttachment = ItCharMode $ Seq.fromList "MS"
|
||||
, _itAttachment = AttachCharMode $ Seq.fromList "MS"
|
||||
, _itParams = BulletShooter
|
||||
{ _muzVel = 1
|
||||
, _rifling = 0.9
|
||||
|
||||
@@ -111,7 +111,7 @@ throwGrenade thePayload cr w = setWp $ removePict $ over props addG w
|
||||
dir = argV v
|
||||
setWp :: World -> World
|
||||
setWp w' = w' & creatures . ix n . crInv . ix j . itEffect .~ throwArmReset 20
|
||||
fuseTime = _itFuseTime $ _itAttachment $ _crInv cr IM.! j
|
||||
fuseTime = _atFuseTime $ _itAttachment $ _crInv cr IM.! j
|
||||
|
||||
throwArmReset :: Int -> ItEffect
|
||||
throwArmReset x = ItInvEffect {_ieInv = f ,_ieCounter = x }
|
||||
|
||||
@@ -68,7 +68,7 @@ shrinkGun = defaultGun
|
||||
, _itUse = defaultlUse {_lUse = hammerCheckL useShrinkGun}
|
||||
& useHammer .~ upHammer
|
||||
-- , _itFloorPict = shrinkGunPic
|
||||
, _itAttachment = ItBool True
|
||||
, _itAttachment = AttachBool True
|
||||
}
|
||||
& itType . iyBase .~ SHRINKER
|
||||
|
||||
@@ -79,14 +79,14 @@ shrinkGunPic _ = noPic $ colorSH violet $ upperPrismPoly 5 $ square 5
|
||||
-- creature but using the old crInvSel value
|
||||
-- 22.05.23 this has been changed from using invids to items
|
||||
useShrinkGun :: Item -> Creature -> World -> World
|
||||
useShrinkGun it cr w = if _itBool $ _itAttachment it
|
||||
useShrinkGun it cr w = if _atBool $ _itAttachment it
|
||||
then tryResize 0.5 $ stripNoItems cr . f False UndroppableIdentified . dropExcept cr invid
|
||||
else tryResize 1 $ f True Uncursed . setMinInvSize defaultInvSize cr
|
||||
where
|
||||
invid = fromJust $ _itInvPos it
|
||||
tryResize x g = maybe w g $ sizeSelf x cr w
|
||||
f isInUse cstatus = creatures . ix (_crID cr) . crInv . ix invid %~
|
||||
( (itAttachment . itBool .~ isInUse) . (itCurseStatus .~ cstatus) )
|
||||
( (itAttachment . atBool .~ isInUse) . (itCurseStatus .~ cstatus) )
|
||||
|
||||
blinkGun :: Item
|
||||
blinkGun = defaultGun
|
||||
|
||||
Reference in New Issue
Block a user