Remove CreatureTargeting, start making shapes for crafts

This commit is contained in:
2024-12-21 12:08:45 +00:00
parent 1e77b45230
commit e35e056fcb
6 changed files with 153 additions and 108 deletions
+1 -3
View File
@@ -144,9 +144,7 @@ inventoryX c = case c of
, makeTypeCraftNum 2 PIPE
, makeTypeCraftNum 1 CREATURESENSOR
]
'C' ->
[ wristInvisibility
]
'C' -> map makeTypeCraft [minBound..maxBound]
'D' ->
[ blinker
, unsafeBlinker
+9 -9
View File
@@ -72,13 +72,13 @@ data Creature = Creature
}
--deriving (Eq, Show, Read) --Generic, Flat)
data CreatureTargeting = CreatureTargeting
{ _ctPos :: Maybe Point2
, _ctType :: Maybe TargetingType
, _ctID :: Maybe Int
, _ctActive :: Bool
}
--
--data CreatureTargeting = CreatureTargeting
-- { _ctPos :: Maybe Point2
-- , _ctType :: Maybe TargetingType
-- , _ctID :: Maybe Int
-- , _ctActive :: Bool
-- }
data CreatureCorpse = MakeDefaultCorpse
@@ -93,7 +93,7 @@ data Intention = Intention
--deriving (Eq, Show, Read) --Generic, Flat)
makeLenses ''Creature
makeLenses ''CreatureTargeting
--makeLenses ''CreatureTargeting
makeLenses ''Intention
concat
@@ -102,5 +102,5 @@ concat
[ ''CreatureCorpse
, ''Creature
, ''Intention
, ''CreatureTargeting
-- , ''CreatureTargeting
]
+1 -1
View File
@@ -68,7 +68,7 @@ data CraftType
| GASINJECTOR
| FLAKCRAFT
| FRAGCRAFT
deriving (Eq, Ord, Show, Read)
deriving (Eq, Ord, Show, Read, Enum, Bounded)
data AttachType
= ZOOMSCOPE
+2 -2
View File
@@ -59,8 +59,8 @@ defaultCreature =
-- , _crTargeting = defaultCreatureTargeting
}
defaultCreatureTargeting :: CreatureTargeting
defaultCreatureTargeting = CreatureTargeting Nothing Nothing Nothing False
--defaultCreatureTargeting :: CreatureTargeting
--defaultCreatureTargeting = CreatureTargeting Nothing Nothing Nothing False
defaultCreatureSkin :: CreatureType
defaultCreatureSkin = Humanoid (greyN 0.9) (lightx4 green) (greyN 0.3) InanimateAI
+49 -2
View File
@@ -33,7 +33,7 @@ itemRotTreeSPic par (il, t) = translateSP p . overPosSP (Q.rotate q) $ itemTreeS
itemSPic :: Item -> SPic
itemSPic it = case it ^. itType of
CRAFT _ -> defSPic
CRAFT ct -> noPic $ craftItemSPic ct
HELD ht -> heldItemSPic ht it
EQUIP et -> equipItemSPic et it
ATTACH{} -> defSPic
@@ -41,6 +41,54 @@ itemSPic it = case it ^. itType of
TARGETING{} -> defSPic
BULLETMOD{} -> defSPic
craftItemSPic :: CraftType -> Shape
craftItemSPic = \case
PIPE -> colorSH green $ xCylinderST 3 10
-- TUBE
-- HARDWARE
-- SPRING
-- HOSE
-- TAPE
-- CAN
-- TIN
-- STEELDRUM
-- PLANK
-- GLASSSHARD
-- SCRAPMETAL
-- PUMP
-- MOTOR
-- TRANSFORMER
-- PRISM
-- LIGHTER
-- MAGNET
-- ANTIMATTER
-- PLATE
-- TRANSMITTER
-- MICROCHIP
-- HARDDRIVE
-- RAM
-- AIUNIT
-- CAMERA
-- MINIDISPLAY -- visual display unit
-- LED
-- NAILBOX
-- IRONBAR
-- LIGHTSENSOR
-- SOUNDSENSOR
-- HEATSENSOR
-- MICROPHONE
-- THERMOMETER
-- CREATURESENSOR
-- WIRE
-- FUELCELL
-- PORTABLEFUSION
-- FRAGMODULE
-- FLASHMODULE
-- GASINJECTOR
-- FLAKCRAFT
-- FRAGCRAFT
_ -> mempty
ammoMagSPic :: Item -> AmmoMagType -> SPic
ammoMagSPic it = \case
TINMAG -> noPic $ upperPrismPolyTS 1 (rectNSWE 0 (- (am * 5)) (-1) 1)
@@ -186,7 +234,6 @@ heldItemSPic ht it = case ht of
AMR -> noPic baseAMRShape
AUTOAMR -> noPic baseAMRShape
SNIPERRIFLE -> noPic baseAMRShape -- <> addBullets it
-- MACHINEGUN -> noPic $ baseAMRShape <> addTinClip it
FLAMESPITTER -> flamerPic it
FLAMETHROWER -> flamerPic it
FLAMETORRENT -> flamerPic it