Refactor, try to limit dependencies
This commit is contained in:
+19
-15
@@ -1,19 +1,23 @@
|
||||
module Dodge.Creature.Lamp
|
||||
( lamp
|
||||
, colorLamp
|
||||
) where
|
||||
import Dodge.Data
|
||||
module Dodge.Creature.Lamp (
|
||||
lamp,
|
||||
colorLamp,
|
||||
) where
|
||||
|
||||
import Dodge.Data.Creature
|
||||
import Dodge.Default
|
||||
import Geometry.Data
|
||||
colorLamp
|
||||
:: Point3 -- color of lamp
|
||||
-> Float -- height of lamp
|
||||
-> Creature
|
||||
colorLamp col h = defaultInanimate
|
||||
{ _crHP = 100
|
||||
, _crType = Lampoid h col Nothing
|
||||
, _crRad = 3
|
||||
, _crMass = 3
|
||||
}
|
||||
|
||||
colorLamp ::
|
||||
Point3 -> -- color of lamp
|
||||
Float -> -- height of lamp
|
||||
Creature
|
||||
colorLamp col h =
|
||||
defaultInanimate
|
||||
{ _crHP = 100
|
||||
, _crType = Lampoid h col Nothing
|
||||
, _crRad = 3
|
||||
, _crMass = 3
|
||||
}
|
||||
|
||||
lamp :: Float -> Creature
|
||||
lamp = colorLamp 0.75
|
||||
|
||||
Reference in New Issue
Block a user