Work on placements

This commit is contained in:
2025-09-25 17:32:02 +01:00
parent 23f61081cf
commit f5a3486f72
13 changed files with 155 additions and 157 deletions
-28
View File
@@ -1,28 +0,0 @@
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.Corpse where
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Geometry.Data
import ShapePicture.Data
--data CorpseResurrection = NoResurrection
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
--
--data Corpse = Corpse
-- { _cpID :: Int
-- , _cpPos :: Point2
-- , _cpDir :: Float
-- , _cpSPic :: SPic
-- , _cpRes :: CorpseResurrection
-- }
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
--makeLenses ''Corpse
--deriveJSON defaultOptions ''CorpseResurrection
--deriveJSON defaultOptions ''Corpse
+25
View File
@@ -8,6 +8,7 @@ module Dodge.Data.GenWorld (
module Dodge.Data.World,
) where
import ShortShow
import Color
import Control.Lens
import Control.Monad.State
@@ -62,6 +63,30 @@ data PSType
| PutID {_putID :: Int}
| PutChasm {_putChasmPoly :: [Point2]}
instance ShortShow PSType where
shortShow PutCrit {} = "PutCrit"
shortShow PutMachine {} = "PutMachine"
shortShow PutLS {} = "PutLS"
shortShow PutButton {} = "PutButton"
shortShow PutProp {} = "PutProp"
shortShow PutTerminal {} = "PutTerminal"
shortShow PutFlIt {} = "PutFlIt"
shortShow PutPPlate {} = "PutPPlate"
shortShow PutBlock {} = "PutBlock"
shortShow PutCoord {} = "PutCoord"
shortShow PutMod {} = "PutMod"
shortShow PutTrigger {} = "PutTrigger"
shortShow PutLineBlock {} = "PutLineBlock"
shortShow PutWall {} = "PutWall"
shortShow PutSlideDr {} = "PutSlideDr"
shortShow PutDoor {} = "PutDoor"
shortShow RandPS {} = "RandPS"
shortShow PutForeground {} = "PutForeground"
shortShow PutWorldUpdate {} = "PutWorldUpdate"
shortShow PutNothing = "PutNothing"
shortShow PutID {} = "PutID"
shortShow PutChasm {} = "PutChasm"
-- maybe there is a monadic implementation of this?
-- add room effect for any placement spot?
data PlacementSpot
-2
View File
@@ -11,7 +11,6 @@ module Dodge.Data.LWorld (
module Dodge.Data.Bullet,
module Dodge.Data.Button,
module Dodge.Data.Cloud,
module Dodge.Data.Corpse,
module Dodge.Data.CrGroupParams,
module Dodge.Data.Creature,
module Dodge.Data.Damage,
@@ -60,7 +59,6 @@ import Dodge.Data.Bounds
import Dodge.Data.Bullet
import Dodge.Data.Button
import Dodge.Data.Cloud
import Dodge.Data.Corpse
import Dodge.Data.CrGroupParams
import Dodge.Data.Creature
import Dodge.Data.Damage