Rethink item ammo to item consumables, start item type datatype

This commit is contained in:
2021-11-29 16:22:31 +00:00
parent 3a605b8156
commit f40d486d68
31 changed files with 238 additions and 193 deletions
+3 -3
View File
@@ -37,7 +37,7 @@ launcher :: Item
launcher = defaultGun
{ _itName = "ROCKO"
, _itIdentity = Launcher
, _wpAmmo = defaultAmmo
, _itConsumption = defaultAmmo
{ _aoType = defaultShellAmmo
{ _amPayload = makeExplosionAt
, _amString = ""
@@ -140,7 +140,7 @@ aRocketWithItemParams
-> World
aRocketWithItemParams it cr w = over props (IM.insert i theShell) w
where
am = _wpAmmo it
am = _itConsumption it
i = IM.newKey $ _props w
pos = _crPos cr +.+ ((_crRad cr +1) *.* unitVectorAtAngle dir)
dir = _crDir cr
@@ -240,7 +240,7 @@ remoteLauncher :: Item
remoteLauncher = defaultGun
{ _itName = "ROCKO-REM"
, _itIdentity = RemoteLauncher
, _wpAmmo = defaultAmmo
, _itConsumption = defaultAmmo
{ _aoType = defaultShellAmmo
{ _amPayload = makeExplosionAt
, _amString = ""