Move towards scrapping separate GenWorld, merging into World

This commit is contained in:
2022-06-02 18:17:38 +01:00
parent c4fc044845
commit 66d098cfef
7 changed files with 19 additions and 16 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ damageSensor
damageSensor dt wdth upf ps = pContID ps (PutLS $ lsPosCol (V3 0 0 30) 0.1)
$ \lsid -> Just $ spNoID ps $ PutUsingGenParams
$ \gw -> (,) gw $ PutMachine yellow (reverse $ square wdth) defaultMachine
{ _mcDraw = sensorSPic wdth $ _sensorCoding (_gParams gw) M.! dt
{ _mcDraw = sensorSPic wdth $ _sensorCoding (_genParams $ _gWorld gw) M.! dt
, _mcUpdate = \mc -> upf mc . sensorUpdate dt mc
, _mcSensor = SensorToggleAmount False 0
, _mcLSs = [lsid]
+2 -2
View File
@@ -33,8 +33,8 @@ import Data.Bifunctor
-- to the placement
placeSpot :: (GenWorld,Room) -> Placement -> ( (GenWorld,Room), [Placement] )
placeSpot (w,rm) plmnt = case plmnt of
pl@Placement{_plGenUpdate = Just f} -> let (gp,pl') = f (_gParams w) pl
in placeSpot (w & gParams .~ gp,rm) pl'
pl@Placement{_plGenUpdate = Just f} -> let (gp,pl') = f (_genParams $ _gWorld w) pl
in placeSpot (w & gWorld . genParams .~ gp,rm) pl'
Placement{_plSpot = PSRoomRand i f} -> placeSpotRoomRand rm i f plmnt w
Placement{_plSpot = PSPos extract eff fallback} -> placeSpotUsingLink w rm plmnt extract eff fallback
Placement{} -> placePlainPSSpot w rm plmnt shift
+2 -1
View File
@@ -1,6 +1,7 @@
module Dodge.Placement.TopDecoration where
import Dodge.Data
import Dodge.Room.Foreground
import Dodge.LevelGen.Data
--import Dodge.LevelGen.Data
import Shape
import Geometry
import Color