Refactor floor items to use centralised items intmap
This commit is contained in:
@@ -29,7 +29,7 @@ worldSPic cfig u =
|
||||
<> foldup (shiftDraw _fsPos _fsDir (const _fsSPic)) (filtOn _fsPos _foregroundShapes)
|
||||
<> foldup (shiftDraw' _cpPos _cpDir _cpSPic) (filtOn _cpPos _corpses)
|
||||
<> foldup drawCreature (filtOn _crPos _creatures)
|
||||
<> foldup floorItemSPic (filtOn _flItPos (_floorItems))
|
||||
<> foldup (Prelude.uncurry floorItemSPic) (IM.intersectionWith (,) (u^.uvWorld.cWorld.lWorld.items) (filtOn _flItPos (_floorItems)))
|
||||
<> foldup btSPic (filtOn _btPos _buttons)
|
||||
<> foldup (mcSPic (u ^. uvWorld . cWorld . lWorld)) (filtOn _mcPos _machines)
|
||||
<> foldMap' drawChasm (u ^. uvWorld . cWorld . chasms)
|
||||
@@ -117,12 +117,12 @@ extraPics cfig u =
|
||||
ppDraw :: PressPlate -> Picture
|
||||
ppDraw c = uncurryV translate (_ppPos c) $ rotate (_ppRot c) (_ppPict c)
|
||||
|
||||
floorItemSPic :: FloorItem -> SPic
|
||||
floorItemSPic flit =
|
||||
floorItemSPic :: Item -> FloorItem -> SPic
|
||||
floorItemSPic itm flit =
|
||||
uncurryV translateSPxy (_flItPos flit) $
|
||||
rotateSP
|
||||
(_flItRot flit)
|
||||
(itemSPic $ _flIt flit)
|
||||
(itemSPic $ itm)
|
||||
|
||||
btSPic :: Button -> SPic
|
||||
btSPic bt =
|
||||
|
||||
Reference in New Issue
Block a user