Move towards using item structural function when using items

This commit is contained in:
2024-10-05 20:53:50 +01:00
parent 7c324a03f6
commit 3b54f00cc7
16 changed files with 142 additions and 111 deletions
+10 -8
View File
@@ -25,17 +25,19 @@ targetingScope tt= case tt of
TARGETLASER -> defaultHeldItem
& itType .~ TARGETING tt
& itAmmoSlots .~ singleAmmo ElectricalAmmo
& itUse .~ UseTargeting
{ _tgPos = Nothing
, _tgID = Nothing
, _tgActive = False
& itUse .~ UseCraft
& itTargeting .~ ItTargeting
{ _itTgPos = Nothing
, _itTgID = Nothing
, _itTgActive = False
}
_ -> defaultHeldItem
& itType .~ TARGETING tt
& itUse .~ UseTargeting
{ _tgPos = Nothing
, _tgID = Nothing
, _tgActive = False
& itUse .~ UseCraft
& itTargeting .~ ItTargeting
{ _itTgPos = Nothing
, _itTgID = Nothing
, _itTgActive = False
}
homingModule :: Item