Rename ItemAttachments
This commit is contained in:
@@ -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