Start refactor storing items in single intmap, done turrets

More checks required
This commit is contained in:
2025-08-24 11:53:21 +01:00
parent 7336177edf
commit c38d03165f
22 changed files with 642 additions and 269 deletions
+1
View File
@@ -35,6 +35,7 @@ damageSensor dt wdth mtrid ps = pContID ps (PutLS $ lsPosCol (V3 0 0 30) 0.1) $
)
)
defaultSensorWall
Nothing
)
damageTypeThreshold :: SensorType -> Int
+1
View File
@@ -34,6 +34,7 @@ putTerminalFull f col mc tm =
& mcCloseSound ?~ fridgeHumS
)
defaultSensorWall
Nothing
)
$ \mcpl -> Just $ pt0 (PutWorldUpdate $ const (setids tmpl btpl mcpl)) (\_ -> f tmpl btpl mcpl)
where
+4 -2
View File
@@ -19,6 +19,7 @@ putTurret itm rotSpeed =
& mcHP .~ 50000
)
defaultMachineWall
(Just itm)
putLasTurret :: Float -> Placement
putLasTurret rotSpeed =
@@ -31,14 +32,15 @@ putLasTurret rotSpeed =
& mcHP .~ 50000
)
defaultMachineWall
(Just laser)
turret :: Item -> MachineType
turret wp = lasTurret & mctTurret . tuWeapon .~ wp
turret _ = lasTurret
lasTurret :: MachineType
lasTurret = McTurret $
Turret
{ _tuWeapon = laser
{ _tuWeapon = 0
, _tuTurnSpeed = 0.1
, _tuFireTime = 0
, _tuDir = 0