Remove shrink gun
This commit is contained in:
+2
-20
@@ -1,10 +1,9 @@
|
||||
module Dodge.Luse where
|
||||
module Dodge.Luse
|
||||
where
|
||||
|
||||
import Dodge.Base
|
||||
import Dodge.Creature.Action
|
||||
import Dodge.Data.World
|
||||
--import MaybeHelp
|
||||
import Dodge.Default.Creature
|
||||
import Dodge.Item.Weapon.TriggerType
|
||||
import Geometry
|
||||
import qualified IntMapHelp as IM
|
||||
@@ -16,7 +15,6 @@ useL lu = case lu of
|
||||
LRewind -> useRewindGun
|
||||
LTimePause -> hammerCheckL useStopWatch
|
||||
LTimeScroll -> hammerCheckL useTimeScrollGun
|
||||
LShrink -> hammerCheckL useShrinkGun
|
||||
LBlink -> hammerCheckL (shootL $ const blinkActionMousePos)
|
||||
LUnsafeBlink -> hammerCheckL (shootL $ const unsafeBlinkAction)
|
||||
LBoost -> boostSelfL 10
|
||||
@@ -53,22 +51,6 @@ useRewindGun itm _ w = w
|
||||
-- & cwTime . rewindWorlds .~ ws
|
||||
-- _ -> w
|
||||
|
||||
-- be careful changing this around; potential problems include updating the
|
||||
-- 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 = case it ^? itParams . shrinkGunStatus of
|
||||
--Just FullSize -> tryResize 0.5 $ stripNoItems cr . f Shrunk UndroppableIdentified . dropExcept cr invid
|
||||
Just FullSize -> tryResize 0.5 $ f Shrunk UndroppableIdentified . dropExcept cr invid
|
||||
Just Shrunk -> tryResize 1 $ f FullSize Uncursed . setMinInvSize defaultInvSize cr
|
||||
Nothing -> error "useShrinkGun applied to item with incorrect ItParam"
|
||||
where
|
||||
invid = _ilInvID $ _itLocation it
|
||||
tryResize x g = maybe w g $ sizeSelf x cr w
|
||||
f isInUse cstatus =
|
||||
cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix invid
|
||||
%~ ((itParams . shrinkGunStatus .~ isInUse) . (itCurseStatus .~ cstatus))
|
||||
|
||||
boostSelfL ::
|
||||
-- | boost amount
|
||||
Float ->
|
||||
|
||||
Reference in New Issue
Block a user