Work on mapper item, simpler generation of items from console

This commit is contained in:
2025-01-02 11:16:04 +00:00
parent 03b25565f1
commit 725a59b9d0
20 changed files with 439 additions and 379 deletions
+3
View File
@@ -33,6 +33,7 @@ data ComposeLinkType
| UnderBarrelSlotLink
| UnderBarrelPlatformLink
| GrenadeHitEffectLink
| SFLink {_sfLink :: ItemStructuralFunction}
deriving (Eq, Ord, Show, Read)
data ItemStructuralFunction
@@ -62,6 +63,7 @@ data ItemStructuralFunction
| ProjectileStabiliserSF
| GrenadeHitEffectSF
| ToggleSF
| MapperSF
deriving (Eq, Ord, Show, Read)
type ComposedItem = (Item, ItemStructuralFunction, LinkTest)
@@ -87,5 +89,6 @@ data LinkUpdate = LUpdate
makeLenses ''ItemLink
makeLenses ''LinkTest
makeLenses ''LinkUpdate
makeLenses ''ComposeLinkType
deriveJSON defaultOptions ''ItemStructuralFunction
deriveJSON defaultOptions ''ComposeLinkType
+5
View File
@@ -28,6 +28,11 @@ data HUDElement
data SubInventory
= NoSubInventory
| ExamineInventory
| MapperInventory
{_mapInvOffset :: Point2
, _mapInvZoom :: Float
, _mapInvItmID :: NewInt ItmInt
}
| CombineInventory
{ _ciSections :: IntMap (SelectionSection CombinableItem)
, _ciSelection :: Maybe (Int, Int, IS.IntSet)
+1 -1
View File
@@ -24,6 +24,7 @@ data ItemType
| ITEMSCAN
| MAPPER
| INTROSCAN {_ibtIntroScanType :: IntroScanType}
| DETECTOR {_ibtDetector :: Detector}
deriving (Eq, Ord, Show, Read)
data IntroScanType
@@ -161,7 +162,6 @@ data HeldItemType
| TORCH
| FLATSHIELD
| KEYCARD Int
| DETECTOR Detector
| BLINKER
| BLINKERUNSAFE
deriving (Eq, Ord, Show, Read) --Generic, Flat)
+4
View File
@@ -15,6 +15,7 @@ module Dodge.Data.Item.Use (
module Dodge.Data.Item.BulletMod
) where
import qualified Data.Set as S
import Dodge.Data.Item.BulletMod
import Dodge.Data.Item.Scope
import Control.Lens
@@ -44,6 +45,9 @@ data ItemUse
| UseScope { _uScope :: Scope }
| UseBulletMod { _ubMod :: BulletMod }
| UseToggle {_useToggle :: Bool}
| UseMapper { _useMapperLines :: S.Set (Point2,Point2)
, _useMapperPoints :: S.Set Point2
}
deriving (Eq, Show, Read)
data HeldUseEffect