Remove internal ammo
This commit is contained in:
+186
-5
@@ -1,3 +1,180 @@
|
|||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Display.hs:11:1-26: warning: [-Wunused-imports]
|
||||||
|
The import of ‘Control.Applicative’ is redundant
|
||||||
|
|
|
||||||
|
11 | import Control.Applicative
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Display.hs:12:1-20: warning: [-Wunused-imports]
|
||||||
|
The import of ‘Control.Monad’ is redundant
|
||||||
|
|
|
||||||
|
12 | import Control.Monad
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Display.hs:15:1-22: warning: [-Wunused-imports]
|
||||||
|
The import of ‘Dodge.Item.Info’ is redundant
|
||||||
|
|
|
||||||
|
15 | import Dodge.Item.Info
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Display.hs:87:16-17: warning: [-Wname-shadowing]
|
||||||
|
This binding for ‘at’ shadows the existing binding
|
||||||
|
imported from ‘LensHelp’ at /home/justin/Haskell/loop/src/Dodge/Item/Display.hs:18:1-15
|
||||||
|
(and originally defined in ‘Control.Lens.At’)
|
||||||
|
|
|
||||||
|
87 | showAttachItem at = case at of
|
||||||
|
| ^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Display.hs:132:21-22: warning: [-Wunused-matches]
|
||||||
|
Defined but not used: ‘cr’
|
||||||
|
|
|
||||||
|
132 | showEquipmentNumber cr itm = case _eeUse ee of
|
||||||
|
| ^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Display.hs:155:20-21: warning: [-Wunused-matches]
|
||||||
|
Defined but not used: ‘cr’
|
||||||
|
|
|
||||||
|
155 | showReloadProgress cr itm = fromMaybe [] $ do
|
||||||
|
| ^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:10:1-39: warning: [-Wunused-imports]
|
||||||
|
The import of ‘Dodge.Item.Weapon.FractionLoaded’ is redundant
|
||||||
|
|
|
||||||
|
10 | import Dodge.Item.Weapon.FractionLoaded
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:68:1-12: warning: [-Wunused-top-binds]
|
||||||
|
Defined but not used: ‘ammoPosition’
|
||||||
|
|
|
||||||
|
68 | ammoPosition itm hit = case hit of
|
||||||
|
| ^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:119:1-16: warning: [-Wunused-top-binds]
|
||||||
|
Defined but not used: ‘bangStickAmmoPos’
|
||||||
|
|
|
||||||
|
119 | bangStickAmmoPos _ itm =
|
||||||
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:125:1-16: warning: [-Wunused-top-binds]
|
||||||
|
Defined but not used: ‘volleygunAmmoPos’
|
||||||
|
|
|
||||||
|
125 | volleygunAmmoPos i =
|
||||||
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:132:1-15: warning: [-Wunused-top-binds]
|
||||||
|
Defined but not used: ‘multigunAmmoPos’
|
||||||
|
|
|
||||||
|
132 | multigunAmmoPos i =
|
||||||
|
| ^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:259:1-10: warning: [-Wunused-top-binds]
|
||||||
|
Defined but not used: ‘drawBullet’
|
||||||
|
|
|
||||||
|
259 | drawBullet itm p q =
|
||||||
|
| ^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:337:1-17: warning: [-Wunused-top-binds]
|
||||||
|
Defined but not used: ‘bulletEffectColor’
|
||||||
|
|
|
||||||
|
337 | bulletEffectColor x = case x of
|
||||||
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:343:1-15: warning: [-Wunused-top-binds]
|
||||||
|
Defined but not used: ‘bulletTrajColor’
|
||||||
|
|
|
||||||
|
343 | bulletTrajColor x = case x of
|
||||||
|
| ^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:350:1-18: warning: [-Wunused-top-binds]
|
||||||
|
Defined but not used: ‘bulletPayloadColor’
|
||||||
|
|
|
||||||
|
350 | bulletPayloadColor x = case x of
|
||||||
|
| ^^^^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:358:1-15: warning: [-Wunused-top-binds]
|
||||||
|
Defined but not used: ‘energyBallColor’
|
||||||
|
|
|
||||||
|
358 | energyBallColor ebt = case ebt of
|
||||||
|
| ^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:407:11-12: warning: [-Wunused-matches]
|
||||||
|
Defined but not used: ‘it’
|
||||||
|
|
|
||||||
|
407 | flamerPic it =
|
||||||
|
| ^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:448:11-12: warning: [-Wunused-matches]
|
||||||
|
Defined but not used: ‘it’
|
||||||
|
|
|
||||||
|
448 | lasGunPic it =
|
||||||
|
| ^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Weapon/FractionLoaded.hs:6:1-19: warning: [-Wunused-imports]
|
||||||
|
The import of ‘Control.Lens’ is redundant
|
||||||
|
|
|
||||||
|
6 | import Control.Lens
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Weapon/FractionLoaded.hs:7:1-17: warning: [-Wunused-imports]
|
||||||
|
The import of ‘Data.Maybe’ is redundant
|
||||||
|
|
|
||||||
|
7 | import Data.Maybe
|
||||||
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Weapon/FractionLoaded.hs:8:1-22: warning: [-Wunused-imports]
|
||||||
|
The import of ‘Dodge.Data.Item’ is redundant
|
||||||
|
|
|
||||||
|
8 | import Dodge.Data.Item
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Euse.hs:4:1-20: warning: [-Wunused-imports]
|
||||||
|
The import of ‘Control.Monad’ is redundant
|
||||||
|
|
|
||||||
|
4 | import Control.Monad
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Euse.hs:47:15-17: warning: [-Wunused-matches]
|
||||||
|
Defined but not used: ‘itm’
|
||||||
|
|
|
||||||
|
47 | trySiphonFuel itm cr = id
|
||||||
|
| ^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Euse.hs:47:19-20: warning: [-Wunused-matches]
|
||||||
|
Defined but not used: ‘cr’
|
||||||
|
|
|
||||||
|
47 | trySiphonFuel itm cr = id
|
||||||
|
| ^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/HeldUse.hs:488:22-23: warning: [-Wunused-matches]
|
||||||
|
Defined but not used: ‘it’
|
||||||
|
|
|
||||||
|
488 | caneStickSoundChoice it = tap3S
|
||||||
|
| ^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Weapon/TriggerType.hs:657:55: warning: [-Wtype-defaults]
|
||||||
|
• Defaulting the following constraints to type ‘Integer’
|
||||||
|
(Num a0)
|
||||||
|
arising from the literal ‘1’
|
||||||
|
at /home/justin/Haskell/loop/src/Dodge/Item/Weapon/TriggerType.hs:657:55
|
||||||
|
(Enum a0)
|
||||||
|
arising from the arithmetic sequence ‘1 .. ’
|
||||||
|
at /home/justin/Haskell/loop/src/Dodge/Item/Weapon/TriggerType.hs:657:54-60
|
||||||
|
• In the expression: 1
|
||||||
|
In the second argument of ‘take’, namely ‘[1 .. ]’
|
||||||
|
In the third argument of ‘foldr’, namely ‘(take numbul [1 .. ])’
|
||||||
|
|
|
||||||
|
657 | duplicateLoaded eff it cr w = foldr f w (take numbul [1 .. ])
|
||||||
|
| ^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Held/BatteryGuns.hs:10:1-29: warning: [-Wunused-imports]
|
||||||
|
The import of ‘Dodge.Reloading.Action’ is redundant
|
||||||
|
|
|
||||||
|
10 | import Dodge.Reloading.Action
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Held/Cone.hs:6:1-29: warning: [-Wunused-imports]
|
||||||
|
The import of ‘Dodge.Reloading.Action’ is redundant
|
||||||
|
|
|
||||||
|
6 | import Dodge.Reloading.Action
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Held/Launcher.hs:4:1-29: warning: [-Wunused-imports]
|
||||||
|
The import of ‘Dodge.Reloading.Action’ is redundant
|
||||||
|
|
|
||||||
|
4 | import Dodge.Reloading.Action
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Held/SprayGuns.hs:12:1-29: warning: [-Wunused-imports]
|
||||||
|
The import of ‘Dodge.Reloading.Action’ is redundant
|
||||||
|
|
|
||||||
|
12 | import Dodge.Reloading.Action
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Held/Rod.hs:13:1-29: warning: [-Wunused-imports]
|
||||||
|
The import of ‘Dodge.Reloading.Action’ is redundant
|
||||||
|
|
|
||||||
|
13 | import Dodge.Reloading.Action
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Info.hs:(62,16)-(107,62): warning: [-Wincomplete-patterns]
|
||||||
|
Pattern match(es) are non-exhaustive
|
||||||
|
In a case alternative: Patterns not matched: MULTIGUN _
|
||||||
|
|
|
||||||
|
62 | heldInfo hit = case hit of
|
||||||
|
| ^^^^^^^^^^^...
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Item/Held/Cane.hs:14:1-29: warning: [-Wunused-imports]
|
||||||
|
The import of ‘Dodge.Reloading.Action’ is redundant
|
||||||
|
|
|
||||||
|
14 | import Dodge.Reloading.Action
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
/home/justin/Haskell/loop/src/Dodge/Base/You.hs:45:19-20: warning: [-Wunused-matches]
|
/home/justin/Haskell/loop/src/Dodge/Base/You.hs:45:19-20: warning: [-Wunused-matches]
|
||||||
Defined but not used: ‘cr’
|
Defined but not used: ‘cr’
|
||||||
|
|
|
|
||||||
@@ -13,9 +190,13 @@
|
|||||||
|
|
|
|
||||||
45 | upDownAttachments cr i j s = s
|
45 | upDownAttachments cr i j s = s
|
||||||
| ^
|
| ^
|
||||||
/home/justin/Haskell/loop/src/Dodge/Item/Info.hs:(62,16)-(109,62): warning: [-Wincomplete-patterns]
|
/home/justin/Haskell/loop/src/Dodge/Item/Held/Stick.hs:12:1-29: warning: [-Wunused-imports]
|
||||||
Pattern match(es) are non-exhaustive
|
The import of ‘Dodge.Reloading.Action’ is redundant
|
||||||
In a case alternative: Patterns not matched: MULTIGUN _
|
|
||||||
|
|
|
|
||||||
62 | heldInfo hit = case hit of
|
12 | import Dodge.Reloading.Action
|
||||||
| ^^^^^^^^^^^...
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
/home/justin/Haskell/loop/src/Dodge/Default/Item/Use/Consumption.hs:6:1-29: warning: [-Wunused-imports]
|
||||||
|
The import of ‘Dodge.Reloading.Action’ is redundant
|
||||||
|
|
|
||||||
|
6 | import Dodge.Reloading.Action
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|||||||
+141
-160
@@ -34,82 +34,78 @@ digraph {
|
|||||||
46 [shape=box
|
46 [shape=box
|
||||||
,label="HELD {_ibtHeld = MACHINEPISTOL}"];
|
,label="HELD {_ibtHeld = MACHINEPISTOL}"];
|
||||||
48 [shape=box
|
48 [shape=box
|
||||||
,label="HELD {_ibtHeld = REVOLVER}"];
|
|
||||||
51 [shape=box
|
|
||||||
,label="HELD {_ibtHeld = REVOLVERX {_xNum = 1}}"];
|
|
||||||
53 [shape=box
|
|
||||||
,label="HELD {_ibtHeld = BANGCONE}"];
|
,label="HELD {_ibtHeld = BANGCONE}"];
|
||||||
55 [shape=box
|
51 [shape=box
|
||||||
,label="HELD {_ibtHeld = BLUNDERBUSS}"];
|
,label="HELD {_ibtHeld = BLUNDERBUSS}"];
|
||||||
57 [shape=box
|
53 [shape=box
|
||||||
,label="HELD {_ibtHeld = GRAPECANNON {_xNum = 1}}"];
|
,label="HELD {_ibtHeld = GRAPECANNON {_xNum = 1}}"];
|
||||||
59 [shape=box
|
55 [shape=box
|
||||||
,label="HELD {_ibtHeld = RIFLE}"];
|
,label="HELD {_ibtHeld = RIFLE}"];
|
||||||
61 [shape=box
|
57 [shape=box
|
||||||
,label="HELD {_ibtHeld = VOLLEYGUN {_xNum = 3}}"];
|
,label="HELD {_ibtHeld = VOLLEYGUN {_xNum = 3}}"];
|
||||||
63 [shape=box
|
59 [shape=box
|
||||||
,label="HELD {_ibtHeld = REPEATER}"];
|
,label="HELD {_ibtHeld = REPEATER}"];
|
||||||
65 [shape=box
|
61 [shape=box
|
||||||
,label="HELD {_ibtHeld = AUTORIFLE}"];
|
,label="HELD {_ibtHeld = AUTORIFLE}"];
|
||||||
67 [shape=box
|
63 [shape=box
|
||||||
,label="HELD {_ibtHeld = BURSTRIFLE}"];
|
,label="HELD {_ibtHeld = BURSTRIFLE}"];
|
||||||
69 [shape=box
|
65 [shape=box
|
||||||
,label="HELD {_ibtHeld = MINIGUNX {_xNum = 3}}"];
|
,label="HELD {_ibtHeld = MINIGUNX {_xNum = 3}}"];
|
||||||
72 [shape=box
|
68 [shape=box
|
||||||
,label="HELD {_ibtHeld = SNIPERRIFLE}"];
|
,label="HELD {_ibtHeld = SNIPERRIFLE}"];
|
||||||
73 [shape=box
|
69 [shape=box
|
||||||
,label="HELD {_ibtHeld = AMR}"];
|
,label="HELD {_ibtHeld = AMR}"];
|
||||||
76 [shape=box
|
72 [shape=box
|
||||||
,label="HELD {_ibtHeld = AUTOAMR}"];
|
,label="HELD {_ibtHeld = AUTOAMR}"];
|
||||||
78 [shape=box
|
74 [shape=box
|
||||||
,label="HELD {_ibtHeld = MACHINEGUN}"];
|
,label="HELD {_ibtHeld = MACHINEGUN}"];
|
||||||
80 [shape=box
|
76 [shape=box
|
||||||
,label="HELD {_ibtHeld = LAUNCHER}"];
|
,label="HELD {_ibtHeld = LAUNCHER}"];
|
||||||
83 [shape=box
|
79 [shape=box
|
||||||
,label="HELD {_ibtHeld = LAUNCHERX {_xNum = 2}}"];
|
,label="HELD {_ibtHeld = LAUNCHERX {_xNum = 2}}"];
|
||||||
87 [shape=box
|
83 [shape=box
|
||||||
,label="HELD {_ibtHeld = FLAMESPITTER}"];
|
,label="HELD {_ibtHeld = FLAMESPITTER}"];
|
||||||
91 [shape=box
|
87 [shape=box
|
||||||
,label="HELD {_ibtHeld = BLOWTORCH}"];
|
,label="HELD {_ibtHeld = BLOWTORCH}"];
|
||||||
93 [shape=box
|
89 [shape=box
|
||||||
,label="HELD {_ibtHeld = FLAMETHROWER}"];
|
,label="HELD {_ibtHeld = FLAMETHROWER}"];
|
||||||
95 [shape=box
|
91 [shape=box
|
||||||
,label="HELD {_ibtHeld = FLAMEWALL}"];
|
,label="HELD {_ibtHeld = FLAMEWALL}"];
|
||||||
97 [shape=box
|
93 [shape=box
|
||||||
,label="HELD {_ibtHeld = FLAMETORRENT}"];
|
,label="HELD {_ibtHeld = FLAMETORRENT}"];
|
||||||
99 [shape=box
|
95 [shape=box
|
||||||
,label="HELD {_ibtHeld = LASGUN}"];
|
,label="HELD {_ibtHeld = LASGUN}"];
|
||||||
103 [shape=box
|
99 [shape=box
|
||||||
,label="HELD {_ibtHeld = DUALBEAM}"];
|
,label="HELD {_ibtHeld = DUALBEAM}"];
|
||||||
105 [shape=box
|
101 [shape=box
|
||||||
,label="HELD {_ibtHeld = LASWIDE {_xNum = 2}}"];
|
,label="HELD {_ibtHeld = LASWIDE {_xNum = 2}}"];
|
||||||
107 [shape=box
|
103 [shape=box
|
||||||
,label="HELD {_ibtHeld = LASCIRCLE}"];
|
,label="HELD {_ibtHeld = LASCIRCLE}"];
|
||||||
109 [shape=box
|
105 [shape=box
|
||||||
,label="HELD {_ibtHeld = SPARKGUN}"];
|
,label="HELD {_ibtHeld = SPARKGUN}"];
|
||||||
111 [shape=box
|
107 [shape=box
|
||||||
,label="HELD {_ibtHeld = TESLAGUN}"];
|
,label="HELD {_ibtHeld = TESLAGUN}"];
|
||||||
113 [shape=box
|
109 [shape=box
|
||||||
,label="LEFT {_ibtLeft = BLINKER}"];
|
,label="LEFT {_ibtLeft = BLINKER}"];
|
||||||
116 [shape=box
|
112 [shape=box
|
||||||
,label="LEFT {_ibtLeft = BLINKERUNSAFE}"];
|
,label="LEFT {_ibtLeft = BLINKERUNSAFE}"];
|
||||||
118 [shape=box
|
114 [shape=box
|
||||||
,label="EQUIP {_ibtEquip = MAGSHIELD}"];
|
,label="EQUIP {_ibtEquip = MAGSHIELD}"];
|
||||||
121 [shape=box
|
117 [shape=box
|
||||||
,label="EQUIP {_ibtEquip = POWERLEGS}"];
|
,label="EQUIP {_ibtEquip = POWERLEGS}"];
|
||||||
127 [shape=box
|
123 [shape=box
|
||||||
,label="HELD {_ibtHeld = FLATSHIELD}"];
|
,label="HELD {_ibtHeld = FLATSHIELD}"];
|
||||||
137 [shape=box
|
133 [shape=box
|
||||||
,label="EQUIP {_ibtEquip = AUTODETECTOR ITEMDETECTOR}"];
|
,label="EQUIP {_ibtEquip = AUTODETECTOR ITEMDETECTOR}"];
|
||||||
140 [shape=box
|
136 [shape=box
|
||||||
,label="EQUIP {_ibtEquip = AUTODETECTOR WALLDETECTOR}"];
|
,label="EQUIP {_ibtEquip = AUTODETECTOR WALLDETECTOR}"];
|
||||||
142 [shape=box
|
138 [shape=box
|
||||||
,label="EQUIP {_ibtEquip = AUTODETECTOR CREATUREDETECTOR}"];
|
,label="EQUIP {_ibtEquip = AUTODETECTOR CREATUREDETECTOR}"];
|
||||||
144 [shape=box
|
140 [shape=box
|
||||||
,label="HELD {_ibtHeld = TORCH}"];
|
,label="HELD {_ibtHeld = TORCH}"];
|
||||||
148 [shape=box
|
144 [shape=box
|
||||||
,label="EQUIP {_ibtEquip = HEADLAMP}"];
|
,label="EQUIP {_ibtEquip = HEADLAMP}"];
|
||||||
156 [shape=box
|
152 [shape=box
|
||||||
,label="HELD {_ibtHeld = BANGSTICK {_xNum = 2}}"];
|
,label="HELD {_ibtHeld = BANGSTICK {_xNum = 2}}"];
|
||||||
}
|
}
|
||||||
subgraph 2 {
|
subgraph 2 {
|
||||||
@@ -137,41 +133,41 @@ digraph {
|
|||||||
60 [shape=point];
|
60 [shape=point];
|
||||||
62 [shape=point];
|
62 [shape=point];
|
||||||
64 [shape=point];
|
64 [shape=point];
|
||||||
66 [shape=point];
|
67 [shape=point];
|
||||||
68 [shape=point];
|
70 [shape=point];
|
||||||
71 [shape=point];
|
71 [shape=point];
|
||||||
74 [shape=point];
|
73 [shape=point];
|
||||||
75 [shape=point];
|
75 [shape=point];
|
||||||
77 [shape=point];
|
78 [shape=point];
|
||||||
79 [shape=point];
|
80 [shape=point];
|
||||||
82 [shape=point];
|
82 [shape=point];
|
||||||
84 [shape=point];
|
|
||||||
86 [shape=point];
|
86 [shape=point];
|
||||||
|
88 [shape=point];
|
||||||
90 [shape=point];
|
90 [shape=point];
|
||||||
92 [shape=point];
|
92 [shape=point];
|
||||||
94 [shape=point];
|
94 [shape=point];
|
||||||
96 [shape=point];
|
|
||||||
98 [shape=point];
|
98 [shape=point];
|
||||||
|
100 [shape=point];
|
||||||
102 [shape=point];
|
102 [shape=point];
|
||||||
104 [shape=point];
|
104 [shape=point];
|
||||||
106 [shape=point];
|
106 [shape=point];
|
||||||
108 [shape=point];
|
108 [shape=point];
|
||||||
110 [shape=point];
|
111 [shape=point];
|
||||||
112 [shape=point];
|
113 [shape=point];
|
||||||
115 [shape=point];
|
116 [shape=point];
|
||||||
117 [shape=point];
|
119 [shape=point];
|
||||||
120 [shape=point];
|
120 [shape=point];
|
||||||
123 [shape=point];
|
121 [shape=point];
|
||||||
|
122 [shape=point];
|
||||||
124 [shape=point];
|
124 [shape=point];
|
||||||
125 [shape=point];
|
|
||||||
126 [shape=point];
|
126 [shape=point];
|
||||||
128 [shape=point];
|
129 [shape=point];
|
||||||
130 [shape=point];
|
132 [shape=point];
|
||||||
133 [shape=point];
|
135 [shape=point];
|
||||||
136 [shape=point];
|
137 [shape=point];
|
||||||
139 [shape=point];
|
139 [shape=point];
|
||||||
141 [shape=point];
|
|
||||||
143 [shape=point];
|
143 [shape=point];
|
||||||
|
145 [shape=point];
|
||||||
147 [shape=point];
|
147 [shape=point];
|
||||||
149 [shape=point];
|
149 [shape=point];
|
||||||
151 [shape=point];
|
151 [shape=point];
|
||||||
@@ -179,9 +175,6 @@ digraph {
|
|||||||
155 [shape=point];
|
155 [shape=point];
|
||||||
157 [shape=point];
|
157 [shape=point];
|
||||||
159 [shape=point];
|
159 [shape=point];
|
||||||
161 [shape=point];
|
|
||||||
163 [shape=point];
|
|
||||||
165 [shape=point];
|
|
||||||
}
|
}
|
||||||
0 -> 1 [xlabel="",tailport=e];
|
0 -> 1 [xlabel="",tailport=e];
|
||||||
2 -> 0 [xlabel=1
|
2 -> 0 [xlabel=1
|
||||||
@@ -209,7 +202,7 @@ digraph {
|
|||||||
16 -> 27 [xlabel=1
|
16 -> 27 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
16 -> 147 [xlabel=1
|
16 -> 143 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
18 -> 19 [xlabel="",tailport=e];
|
18 -> 19 [xlabel="",tailport=e];
|
||||||
@@ -221,28 +214,25 @@ digraph {
|
|||||||
35 -> 38 [xlabel=1
|
35 -> 38 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
35 -> 47 [xlabel=1
|
35 -> 54 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
35 -> 58 [xlabel=1
|
35 -> 56 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
35 -> 60 [xlabel=1
|
35 -> 56 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
35 -> 60 [xlabel=1
|
35 -> 56 [xlabel=1
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
35 -> 60 [xlabel=1
|
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
|
35 -> 151 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
35 -> 155 [xlabel=1
|
35 -> 155 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
35 -> 161 [xlabel=1
|
35 -> 157 [xlabel=1
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
35 -> 163 [xlabel=1
|
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
38 -> 39 [xlabel="",tailport=e];
|
38 -> 39 [xlabel="",tailport=e];
|
||||||
@@ -263,150 +253,141 @@ digraph {
|
|||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
50 -> 51 [xlabel="",tailport=e];
|
50 -> 51 [xlabel="",tailport=e];
|
||||||
51 -> 159 [xlabel=1
|
51 -> 52 [xlabel=1
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
52 -> 53 [xlabel="",tailport=e];
|
|
||||||
53 -> 54 [xlabel=1
|
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
|
52 -> 53 [xlabel="",tailport=e];
|
||||||
|
53 -> 159 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
54 -> 55 [xlabel="",tailport=e];
|
54 -> 55 [xlabel="",tailport=e];
|
||||||
55 -> 56 [xlabel=1
|
55 -> 58 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
55 -> 70 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
56 -> 57 [xlabel="",tailport=e];
|
56 -> 57 [xlabel="",tailport=e];
|
||||||
57 -> 165 [xlabel=1
|
57 -> 64 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
57 -> 155 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
58 -> 59 [xlabel="",tailport=e];
|
58 -> 59 [xlabel="",tailport=e];
|
||||||
|
59 -> 60 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
59 -> 62 [xlabel=1
|
59 -> 62 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
59 -> 74 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
60 -> 61 [xlabel="",tailport=e];
|
60 -> 61 [xlabel="",tailport=e];
|
||||||
61 -> 68 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
61 -> 161 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
62 -> 63 [xlabel="",tailport=e];
|
62 -> 63 [xlabel="",tailport=e];
|
||||||
63 -> 64 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
63 -> 66 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
64 -> 65 [xlabel="",tailport=e];
|
64 -> 65 [xlabel="",tailport=e];
|
||||||
66 -> 67 [xlabel="",tailport=e];
|
65 -> 157 [xlabel=1
|
||||||
68 -> 69 [xlabel="",tailport=e];
|
|
||||||
69 -> 163 [xlabel=1
|
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
|
67 -> 68 [xlabel="",tailport=e];
|
||||||
|
69 -> 67 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
69 -> 71 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
69 -> 73 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
70 -> 69 [xlabel="",tailport=e];
|
||||||
71 -> 72 [xlabel="",tailport=e];
|
71 -> 72 [xlabel="",tailport=e];
|
||||||
73 -> 71 [xlabel=1
|
73 -> 74 [xlabel="",tailport=e];
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
73 -> 75 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
73 -> 77 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
74 -> 73 [xlabel="",tailport=e];
|
|
||||||
75 -> 76 [xlabel="",tailport=e];
|
75 -> 76 [xlabel="",tailport=e];
|
||||||
77 -> 78 [xlabel="",tailport=e];
|
76 -> 78 [xlabel=1
|
||||||
79 -> 80 [xlabel="",tailport=e];
|
,arrowhead=onone
|
||||||
80 -> 82 [xlabel=1
|
,headport=w];
|
||||||
|
78 -> 79 [xlabel="",tailport=e];
|
||||||
|
79 -> 80 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
82 -> 83 [xlabel="",tailport=e];
|
82 -> 83 [xlabel="",tailport=e];
|
||||||
83 -> 84 [xlabel=1
|
83 -> 86 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
83 -> 88 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
86 -> 87 [xlabel="",tailport=e];
|
86 -> 87 [xlabel="",tailport=e];
|
||||||
87 -> 90 [xlabel=1
|
88 -> 89 [xlabel="",tailport=e];
|
||||||
|
89 -> 90 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
87 -> 92 [xlabel=1
|
89 -> 92 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
90 -> 91 [xlabel="",tailport=e];
|
90 -> 91 [xlabel="",tailport=e];
|
||||||
92 -> 93 [xlabel="",tailport=e];
|
92 -> 93 [xlabel="",tailport=e];
|
||||||
93 -> 94 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
93 -> 96 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
94 -> 95 [xlabel="",tailport=e];
|
94 -> 95 [xlabel="",tailport=e];
|
||||||
96 -> 97 [xlabel="",tailport=e];
|
95 -> 98 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
95 -> 98 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
95 -> 100 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
95 -> 102 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
95 -> 102 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
95 -> 102 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
98 -> 99 [xlabel="",tailport=e];
|
98 -> 99 [xlabel="",tailport=e];
|
||||||
99 -> 102 [xlabel=1
|
100 -> 101 [xlabel=""
|
||||||
,arrowhead=onone
|
,tailport=e];
|
||||||
,headport=w];
|
101 -> 149 [xlabel=1
|
||||||
99 -> 102 [xlabel=1
|
,arrowhead=onone
|
||||||
,arrowhead=onone
|
,headport=w];
|
||||||
,headport=w];
|
|
||||||
99 -> 104 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
99 -> 106 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
99 -> 106 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
99 -> 106 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
102 -> 103 [xlabel=""
|
102 -> 103 [xlabel=""
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
104 -> 105 [xlabel=""
|
104 -> 105 [xlabel=""
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
105 -> 153 [xlabel=1
|
105 -> 106 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
106 -> 107 [xlabel=""
|
106 -> 107 [xlabel=""
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
108 -> 109 [xlabel=""
|
108 -> 109 [xlabel=""
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
109 -> 110 [xlabel=1
|
109 -> 111 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
110 -> 111 [xlabel=""
|
111 -> 112 [xlabel=""
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
112 -> 113 [xlabel=""
|
113 -> 114 [xlabel=""
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
113 -> 115 [xlabel=1
|
116 -> 117 [xlabel=""
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
115 -> 116 [xlabel=""
|
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
117 -> 118 [xlabel=""
|
122 -> 123 [xlabel=""
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
120 -> 121 [xlabel=""
|
132 -> 133 [xlabel=""
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
126 -> 127 [xlabel=""
|
135 -> 136 [xlabel=""
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
136 -> 137 [xlabel=""
|
137 -> 138 [xlabel=""
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
139 -> 140 [xlabel=""
|
139 -> 140 [xlabel=""
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
141 -> 142 [xlabel=""
|
140 -> 143 [xlabel=1
|
||||||
,tailport=e];
|
|
||||||
143 -> 144 [xlabel=""
|
|
||||||
,tailport=e];
|
|
||||||
144 -> 147 [xlabel=1
|
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
147 -> 148 [xlabel=""
|
143 -> 144 [xlabel=""
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
155 -> 156 [xlabel=""
|
151 -> 152 [xlabel=""
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
156 -> 157 [xlabel=1
|
152 -> 153 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
}
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -54,8 +54,6 @@ itemCombinations =
|
|||||||
, po [HELD PISTOL, CRAFT SPRING] autoPistol
|
, po [HELD PISTOL, CRAFT SPRING] autoPistol
|
||||||
, po [HELD AUTOPISTOL, cr PLANK] smg
|
, po [HELD AUTOPISTOL, cr PLANK] smg
|
||||||
, po [HELD AUTOPISTOL, cr SPRING] machinePistol
|
, po [HELD AUTOPISTOL, cr SPRING] machinePistol
|
||||||
, po [HELD (BANGSTICK 1), cr CAN] revolver
|
|
||||||
, po [HELD REVOLVER, cr SPRING] $ revolverX 1
|
|
||||||
, po [cr CAN, cr HARDWARE] bangCone
|
, po [cr CAN, cr HARDWARE] bangCone
|
||||||
, po [HELD BANGCONE, cr PLANK] blunderbuss
|
, po [HELD BANGCONE, cr PLANK] blunderbuss
|
||||||
, po [HELD BLUNDERBUSS, cr STEELDRUM] (grapeCannon 1)
|
, po [HELD BLUNDERBUSS, cr STEELDRUM] (grapeCannon 1)
|
||||||
@@ -107,7 +105,6 @@ itemCombinations =
|
|||||||
]
|
]
|
||||||
++ map (\i -> po [HELD (LASWIDE i), cr TRANSFORMER] $ lasWide (i + 1)) [2 .. 9]
|
++ map (\i -> po [HELD (LASWIDE i), cr TRANSFORMER] $ lasWide (i + 1)) [2 .. 9]
|
||||||
++ map (\i -> po [cr PIPE, HELD (BANGSTICK i)] $ bangStick (i + 1)) [1 .. 8]
|
++ map (\i -> po [cr PIPE, HELD (BANGSTICK i)] $ bangStick (i + 1)) [1 .. 8]
|
||||||
++ map (\i -> po [hd (REVOLVERX i), cr CAN] $ revolverX (i + 1)) [1 .. 5]
|
|
||||||
++ map (\i -> po [hd (VOLLEYGUN i), HELD (BANGSTICK 1)] $ volleyGun (i + 1)) [3 .. 5]
|
++ map (\i -> po [hd (VOLLEYGUN i), HELD (BANGSTICK 1)] $ volleyGun (i + 1)) [3 .. 5]
|
||||||
++ map (\i -> po [hd (MINIGUNX i), HELD (BANGSTICK 1)] $ miniGunX (i + 1)) [3 .. 15]
|
++ map (\i -> po [hd (MINIGUNX i), HELD (BANGSTICK 1)] $ miniGunX (i + 1)) [3 .. 15]
|
||||||
++ map (\i -> po [hd (GRAPECANNON i), cr STEELDRUM] $ grapeCannon (i + 1)) [1, 2, 3]
|
++ map (\i -> po [hd (GRAPECANNON i), cr STEELDRUM] $ grapeCannon (i + 1)) [1, 2, 3]
|
||||||
@@ -210,13 +207,7 @@ moduleCombinations =
|
|||||||
[ amod [cr MICROCHIP, cr TRANSMITTER] LAUNCHHOME
|
[ amod [cr MICROCHIP, cr TRANSMITTER] LAUNCHHOME
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
,
|
|
||||||
( ModBattery
|
|
||||||
, batteryGuns
|
|
||||||
,
|
|
||||||
[ amod [cr BATTERY] EXTRABATTERY
|
|
||||||
]
|
|
||||||
)
|
|
||||||
]
|
]
|
||||||
where
|
where
|
||||||
amod = (,)
|
amod = (,)
|
||||||
@@ -241,14 +232,12 @@ bulletWeapons :: [Item]
|
|||||||
bulletWeapons =
|
bulletWeapons =
|
||||||
[bangStick i | i <- [1 .. 9]]
|
[bangStick i | i <- [1 .. 9]]
|
||||||
++ [volleyGun i | i <- [3 .. 6]]
|
++ [volleyGun i | i <- [3 .. 6]]
|
||||||
++ [revolverX i | i <- [1 .. 5]]
|
|
||||||
++ [miniGunX i | i <- [3 .. 16]]
|
++ [miniGunX i | i <- [3 .. 16]]
|
||||||
++ [grapeCannon i | i <- [1, 2, 3, 4]]
|
++ [grapeCannon i | i <- [1, 2, 3, 4]]
|
||||||
++ [ pistol
|
++ [ pistol
|
||||||
, autoPistol
|
, autoPistol
|
||||||
, smg
|
, smg
|
||||||
, machinePistol
|
, machinePistol
|
||||||
, revolver
|
|
||||||
, rifle
|
, rifle
|
||||||
, repeater
|
, repeater
|
||||||
, autoRifle
|
, autoRifle
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ bulletCombinations = filter
|
|||||||
maxShowX :: ItemBaseType -> Maybe Int
|
maxShowX :: ItemBaseType -> Maybe Int
|
||||||
maxShowX bt = case bt of
|
maxShowX bt = case bt of
|
||||||
HELD (BANGSTICK _) -> Just 2
|
HELD (BANGSTICK _) -> Just 2
|
||||||
HELD (REVOLVERX _) -> Just 1
|
|
||||||
HELD (VOLLEYGUN _) -> Just 3
|
HELD (VOLLEYGUN _) -> Just 3
|
||||||
HELD (MINIGUNX _) -> Just 3
|
HELD (MINIGUNX _) -> Just 3
|
||||||
HELD (GRAPECANNON _) -> Just 1
|
HELD (GRAPECANNON _) -> Just 1
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ moduleModification imt = case imt of
|
|||||||
. (itParams . subParams ?~ teslaParams)
|
. (itParams . subParams ?~ teslaParams)
|
||||||
WEPTELE -> makeDirectedTele
|
WEPTELE -> makeDirectedTele
|
||||||
LAUNCHHOME -> itUse . heldConsumption . laAmmoType . amPjCreation .~ CreateTrackingShell
|
LAUNCHHOME -> itUse . heldConsumption . laAmmoType . amPjCreation .~ CreateTrackingShell
|
||||||
EXTRABATTERY -> itUse . heldConsumption . laSource . _InternalSource . iaMax +~ 1000
|
|
||||||
ATTACHTORCH -> id
|
ATTACHTORCH -> id
|
||||||
where
|
where
|
||||||
makeDirectedTele it =
|
makeDirectedTele it =
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ useItemLeftClick cr w = fromMaybe w $ do
|
|||||||
invid <- cr ^? crManipulation . manObject . inInventory . ispItem
|
invid <- cr ^? crManipulation . manObject . inInventory . ispItem
|
||||||
ituse <- cr ^? crInv . ix invid . itUse
|
ituse <- cr ^? crInv . ix invid . itUse
|
||||||
case ituse of
|
case ituse of
|
||||||
HeldUse{} -> return $ hammerTest (cWorld . lWorld . creatures . ix (_crID cr) %~ crUpdateLoadSource)
|
HeldUse{} -> return $ hammerTest (cWorld . lWorld . creatures . ix (_crID cr) %~ crReload)
|
||||||
ConsumeUse{} -> return $ useItemRightClick cr w
|
ConsumeUse{} -> return $ useItemRightClick cr w
|
||||||
EquipUse{} -> return $ useItemRightClick cr w
|
EquipUse{} -> return $ useItemRightClick cr w
|
||||||
LeftUse{} -> return $ useItemRightClick cr w
|
LeftUse{} -> return $ useItemRightClick cr w
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ reloadOverride :: Creature -> Creature
|
|||||||
reloadOverride cr = fromMaybe cr $ do
|
reloadOverride cr = fromMaybe cr $ do
|
||||||
guard $ cr ^. crStance . posture == Aiming
|
guard $ cr ^. crStance . posture == Aiming
|
||||||
itRef <- cr ^? crManipulation . manObject . inInventory . ispItem
|
itRef <- cr ^? crManipulation . manObject . inInventory . ispItem
|
||||||
guard $ cr ^? crInv . ix itRef . itUse . heldConsumption . laSource . _InternalSource . iaLoaded == Just 0
|
guard $ cr ^? crInv . ix (itRef + 1) . itUse . attachParams . ammoAttachParams . iaLoaded == Just 0
|
||||||
return $ cr & crActionPlan . apStrategy .~ StrategyActions Reload reloadActions
|
return $ cr & crActionPlan . apStrategy .~ StrategyActions Reload reloadActions
|
||||||
where
|
where
|
||||||
reloadActions =
|
reloadActions =
|
||||||
|
|||||||
@@ -38,24 +38,12 @@ crIsReloading cr = case cr ^? crManipulation . manObject . inInventory . iselAct
|
|||||||
Just ReloadAction{} -> True
|
Just ReloadAction{} -> True
|
||||||
_ -> False
|
_ -> False
|
||||||
|
|
||||||
|
-- Assumes the ammotype below the selected item is correct
|
||||||
crWeaponReady :: Creature -> Bool
|
crWeaponReady :: Creature -> Bool
|
||||||
crWeaponReady cr = fromMaybe False $ do
|
crWeaponReady cr = fromMaybe False $ do
|
||||||
i <- cr ^? crManipulation . manObject . inInventory . ispItem
|
i <- cr ^? crManipulation . manObject . inInventory . ispItem
|
||||||
asource <- cr ^? crInv . ix i . itUse . heldConsumption . laSource
|
x <- cr ^? crInv . ix (i + 1) . itUse . attachParams . ammoAttachParams . iaLoaded
|
||||||
case asource of
|
return (x > 0)
|
||||||
InternalSource ia -> return (_iaLoaded ia > 0 && _iaPrimed ia)
|
|
||||||
AboveSource -> do
|
|
||||||
x <- cr ^? crInv . ix (i - 1) . itUse . equipEffect . eeUse . euseAmmoAmount
|
|
||||||
return (x > 0)
|
|
||||||
BelowSource -> do
|
|
||||||
x <- cr ^? crInv . ix (i + 1) . itUse . equipEffect . eeUse . euseAmmoAmount
|
|
||||||
return (x > 0)
|
|
||||||
EitherSource -> return $
|
|
||||||
justIsPositive (cr ^? crInv . ix (i - 1) . itUse . equipEffect . eeUse . euseAmmoAmount)
|
|
||||||
|| justIsPositive (cr ^? crInv . ix (i + 1) . itUse . equipEffect . eeUse . euseAmmoAmount)
|
|
||||||
where
|
|
||||||
justIsPositive Nothing = False
|
|
||||||
justIsPositive (Just x) = x > 0
|
|
||||||
|
|
||||||
crCanSeeCr :: Creature -> (World, Creature) -> Bool
|
crCanSeeCr :: Creature -> (World, Creature) -> Bool
|
||||||
crCanSeeCr tcr (w, cr) = hasLOS (_crPos cr) (_crPos tcr) w
|
crCanSeeCr tcr (w, cr) = hasLOS (_crPos cr) (_crPos tcr) w
|
||||||
|
|||||||
@@ -157,8 +157,6 @@ data LeftItemType
|
|||||||
data HeldItemType
|
data HeldItemType
|
||||||
= BANGSTICK {_xNum :: Int}
|
= BANGSTICK {_xNum :: Int}
|
||||||
| PISTOL
|
| PISTOL
|
||||||
| REVOLVER
|
|
||||||
| REVOLVERX {_xNum :: Int}
|
|
||||||
| MACHINEPISTOL
|
| MACHINEPISTOL
|
||||||
| AUTOPISTOL
|
| AUTOPISTOL
|
||||||
| SMG
|
| SMG
|
||||||
@@ -215,7 +213,6 @@ data ItemModuleType
|
|||||||
| STATICLAS
|
| STATICLAS
|
||||||
| WEPTELE
|
| WEPTELE
|
||||||
| LAUNCHHOME
|
| LAUNCHHOME
|
||||||
| EXTRABATTERY
|
|
||||||
| ATTACHTORCH
|
| ATTACHTORCH
|
||||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import Dodge.Data.Item.Use.Consumption.LoadAction
|
|||||||
data HeldConsumption
|
data HeldConsumption
|
||||||
= LoadableAmmo
|
= LoadableAmmo
|
||||||
{ _laAmmoType :: AmmoType
|
{ _laAmmoType :: AmmoType
|
||||||
, _laSource :: AmmoSource
|
|
||||||
, _laSourceType :: AmmoSourceType
|
, _laSourceType :: AmmoSourceType
|
||||||
}
|
}
|
||||||
| NoConsumption
|
| NoConsumption
|
||||||
|
|||||||
@@ -9,14 +9,6 @@ defaultLoadable :: HeldConsumption
|
|||||||
defaultLoadable =
|
defaultLoadable =
|
||||||
LoadableAmmo
|
LoadableAmmo
|
||||||
{ _laAmmoType = GenericAmmo
|
{ _laAmmoType = GenericAmmo
|
||||||
, _laSource =
|
|
||||||
InternalSource InternalAmmo
|
|
||||||
{ _iaMax = 15
|
|
||||||
, _iaLoaded = 0
|
|
||||||
, _iaPrimed = True
|
|
||||||
, _iaCycle = [loadEject 10, loadInsert 10, loadPrime 10]
|
|
||||||
, _iaProgress = Nothing
|
|
||||||
}
|
|
||||||
, _laSourceType = BulletSource
|
, _laSourceType = BulletSource
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+18
-16
@@ -32,7 +32,8 @@ useE eo = case eo of
|
|||||||
EonWristShield -> onEquipWristShield
|
EonWristShield -> onEquipWristShield
|
||||||
EoffWristShield -> onRemoveWristShield
|
EoffWristShield -> onRemoveWristShield
|
||||||
EFuelSource 0 _ -> const . const id
|
EFuelSource 0 _ -> const . const id
|
||||||
EFuelSource{} -> trySiphonFuel
|
--EFuelSource{} -> trySiphonFuel
|
||||||
|
EFuelSource{} -> const . const id
|
||||||
EBatterySource{} -> tryChargeBattery
|
EBatterySource{} -> tryChargeBattery
|
||||||
EAmmoSource{} -> tryAttachBulletBelt
|
EAmmoSource{} -> tryAttachBulletBelt
|
||||||
|
|
||||||
@@ -43,21 +44,22 @@ tryChargeBattery :: Item -> Creature -> World -> World
|
|||||||
tryChargeBattery _ _ w = w
|
tryChargeBattery _ _ w = w
|
||||||
|
|
||||||
trySiphonFuel :: Item -> Creature -> World -> World
|
trySiphonFuel :: Item -> Creature -> World -> World
|
||||||
trySiphonFuel itm cr w = fromMaybe w $ do
|
trySiphonFuel itm cr = id
|
||||||
eix <- itm ^? itLocation . ipInvID
|
--trySiphonFuel itm cr w = fromMaybe w $ do
|
||||||
hix <- cr ^? crManipulation . manObject . inInventory . ispItem
|
-- eix <- itm ^? itLocation . ipInvID
|
||||||
guard (cr ^? crManipulation . manObject . inInventory . iselAction == Just NoInvSelAction)
|
-- hix <- cr ^? crManipulation . manObject . inInventory . ispItem
|
||||||
la <- cr ^? crInv . ix hix . itUse . heldConsumption
|
-- guard (cr ^? crManipulation . manObject . inInventory . iselAction == Just NoInvSelAction)
|
||||||
atype <- la ^? laAmmoType
|
-- la <- cr ^? crInv . ix hix . itUse . heldConsumption
|
||||||
guard (isGas atype)
|
-- atype <- la ^? laAmmoType
|
||||||
amax <- la ^? laSource . _InternalSource . iaMax
|
-- guard (isGas atype)
|
||||||
acur <- la ^? laSource . _InternalSource . iaLoaded
|
-- amax <- la ^? laSource . _InternalSource . iaMax
|
||||||
guard (amax > acur)
|
-- acur <- la ^? laSource . _InternalSource . iaLoaded
|
||||||
return $
|
-- guard (amax > acur)
|
||||||
w & cWorld . lWorld . creatures . ix (_crID cr) . crInv
|
-- return $
|
||||||
%~ ( (ix hix . itUse . heldConsumption . laSource . _InternalSource . iaLoaded +~ 1)
|
-- w & cWorld . lWorld . creatures . ix (_crID cr) . crInv
|
||||||
. (ix eix . itUse . equipEffect . eeUse . euseFuelAmount -~ 1)
|
-- %~ ( (ix hix . itUse . heldConsumption . laSource . _InternalSource . iaLoaded +~ 1)
|
||||||
)
|
-- . (ix eix . itUse . equipEffect . eeUse . euseFuelAmount -~ 1)
|
||||||
|
-- )
|
||||||
|
|
||||||
isGas :: AmmoType -> Bool
|
isGas :: AmmoType -> Bool
|
||||||
isGas a = case a of
|
isGas a = case a of
|
||||||
|
|||||||
@@ -83,10 +83,10 @@ useMod hm = case hm of
|
|||||||
[ useAmmoAmount 1
|
[ useAmmoAmount 1
|
||||||
, withItem $ \it ->
|
, withItem $ \it ->
|
||||||
duplicateNumBarrels
|
duplicateNumBarrels
|
||||||
( min
|
-- ( min
|
||||||
(it ^?! itUse . heldConsumption . laSource . _InternalSource . iaLoaded)
|
-- (it ^?! itUse . heldConsumption . laSource . _InternalSource . iaLoaded)
|
||||||
(it ^?! itParams . lasCycle `div` lasWideRate)
|
(it ^?! itParams . lasCycle `div` lasWideRate)
|
||||||
)
|
-- )
|
||||||
, withItem $ \it -> withCrPos $ flareCircleAt (_lasColor $ _itParams it) 0.8
|
, withItem $ \it -> withCrPos $ flareCircleAt (_lasColor $ _itParams it) 0.8
|
||||||
, withItem $ \it -> withTempLight 1 100 (xyzV4 (_lasColor $ _itParams it))
|
, withItem $ \it -> withTempLight 1 100 (xyzV4 (_lasColor $ _itParams it))
|
||||||
, withSoundForI tone440sawtoothquietS 2
|
, withSoundForI tone440sawtoothquietS 2
|
||||||
@@ -485,9 +485,9 @@ fireRemoteShell it cr w =
|
|||||||
j = cr ^?! crManipulation . manObject . inInventory . ispItem -- unsafe!! TODO change
|
j = cr ^?! crManipulation . manObject . inInventory . ispItem -- unsafe!! TODO change
|
||||||
|
|
||||||
caneStickSoundChoice :: Item -> SoundID
|
caneStickSoundChoice :: Item -> SoundID
|
||||||
caneStickSoundChoice it
|
caneStickSoundChoice it = tap3S
|
||||||
| (it ^?! itUse . heldConsumption . laSource . _InternalSource . iaLoaded) < 2 = tap3S
|
-- -- | (it ^?! itUse . heldConsumption . laSource . _InternalSource . iaLoaded) < 2 = tap3S
|
||||||
| otherwise = shotgunS
|
-- -- | otherwise = shotgunS
|
||||||
|
|
||||||
bangStickSoundChoice :: Item -> SoundID
|
bangStickSoundChoice :: Item -> SoundID
|
||||||
bangStickSoundChoice = caneStickSoundChoice
|
bangStickSoundChoice = caneStickSoundChoice
|
||||||
|
|||||||
+44
-31
@@ -81,7 +81,13 @@ itemBaseName it = case _iyBase $ _itType it of
|
|||||||
LEFT lit -> show lit
|
LEFT lit -> show lit
|
||||||
EQUIP eit -> showEquipItem eit
|
EQUIP eit -> showEquipItem eit
|
||||||
CONSUMABLE cit -> show cit
|
CONSUMABLE cit -> show cit
|
||||||
ATTACH ait -> show ait
|
ATTACH ait -> showAttachItem ait
|
||||||
|
|
||||||
|
showAttachItem :: AttachType -> String
|
||||||
|
showAttachItem at = case at of
|
||||||
|
SCROLLATTACH x -> show x
|
||||||
|
AMMOATTACH x -> show x
|
||||||
|
TARGETATTACH x -> show x
|
||||||
|
|
||||||
showEquipItem :: EquipItemType -> String
|
showEquipItem :: EquipItemType -> String
|
||||||
showEquipItem eit = case eit of
|
showEquipItem eit = case eit of
|
||||||
@@ -111,60 +117,67 @@ showAutoRechargeProgress lc = case lc of
|
|||||||
|
|
||||||
itemNumberDisplay :: Creature -> Item -> [String]
|
itemNumberDisplay :: Creature -> Item -> [String]
|
||||||
itemNumberDisplay cr itm = case iu of
|
itemNumberDisplay cr itm = case iu of
|
||||||
HeldUse{} -> [showReloadProgress cr itm]
|
--HeldUse{} -> [showReloadProgress cr itm]
|
||||||
|
HeldUse{} -> []
|
||||||
LeftUse{} -> [showAutoRechargeProgress (_leftConsumption iu)]
|
LeftUse{} -> [showAutoRechargeProgress (_leftConsumption iu)]
|
||||||
EquipUse{} -> showEquipmentNumber cr itm
|
EquipUse{} -> showEquipmentNumber cr itm
|
||||||
CraftUse x -> [show $ x ^. getItAmount]
|
CraftUse x -> [show $ x ^. getItAmount]
|
||||||
ConsumeUse {_useAmount = x} -> [show $ x ^. getItAmount]
|
ConsumeUse {_useAmount = x} -> [show $ x ^. getItAmount]
|
||||||
AttachUse {} -> []
|
AttachUse {} -> [showReloadProgress cr itm]
|
||||||
|
-- this could be cleaner here...
|
||||||
where
|
where
|
||||||
iu = itm ^?! itUse
|
iu = itm ^?! itUse
|
||||||
|
|
||||||
showEquipmentNumber :: Creature -> Item -> [String]
|
showEquipmentNumber :: Creature -> Item -> [String]
|
||||||
showEquipmentNumber cr itm = case _eeUse ee of
|
showEquipmentNumber cr itm = case _eeUse ee of
|
||||||
EFuelSource x _ -> [show x]
|
EFuelSource x _ -> [show x]
|
||||||
EAmmoSource{} -> showAmmoSource cr itm
|
EAmmoSource{_euseAmmoAmount = x} -> [show x]--showAmmoSource cr itm
|
||||||
EBatterySource{_euseBatteryAmount = x} -> [show x]
|
EBatterySource{_euseBatteryAmount = x} -> [show x]
|
||||||
_ -> [""]
|
_ -> [""]
|
||||||
where
|
where
|
||||||
ee = itm ^?! itUse . equipEffect
|
ee = itm ^?! itUse . equipEffect
|
||||||
|
|
||||||
showAmmoSource :: Creature -> Item -> [String]
|
--showAmmoSource :: Creature -> Item -> [String]
|
||||||
showAmmoSource cr itm = fromMaybe ["FAIL"] $ do
|
--showAmmoSource cr itm = fromMaybe ["FAIL"] $ do
|
||||||
eu <- itm ^? itUse . equipEffect . eeUse
|
-- eu <- itm ^? itUse . equipEffect . eeUse
|
||||||
atype <- eu ^? euseAmmoSourceType
|
-- atype <- eu ^? euseAmmoSourceType
|
||||||
x <- fmap showIntKMG' $ eu ^? euseAmmoAmount
|
-- x <- fmap showIntKMG' $ eu ^? euseAmmoAmount
|
||||||
i <- itm ^? itLocation . ipInvID
|
-- i <- itm ^? itLocation . ipInvID
|
||||||
( do
|
-- ( do
|
||||||
at' <- cr ^? crInv . ix (i + 1) . itUse . heldConsumption . laSourceType
|
-- at' <- cr ^? crInv . ix (i + 1) . itUse . heldConsumption . laSourceType
|
||||||
as <- cr ^? crInv . ix (i + 1) . itUse . heldConsumption . laSource
|
-- as <- cr ^? crInv . ix (i + 1) . itUse . heldConsumption . laSource
|
||||||
guard (at' == atype && as == AboveSource)
|
-- guard (at' == atype && as == AboveSource)
|
||||||
return ["vvvv", x]
|
-- return ["vvvv", x]
|
||||||
)
|
-- )
|
||||||
<|> Just [x]
|
-- <|> Just [x]
|
||||||
|
|
||||||
showReloadProgress :: Creature -> Item -> String
|
showReloadProgress :: Creature -> Item -> String
|
||||||
showReloadProgress cr itm = case ic ^? laSource of
|
showReloadProgress cr itm = fromMaybe [] $ do
|
||||||
Just (InternalSource ia) -> case ia ^? iaProgress . _Just . ix 0 of
|
ia <- itm ^? itUse . attachParams . ammoAttachParams
|
||||||
Nothing -> maybe "" show $ ic ^? laSource . _InternalSource . iaLoaded
|
return $ case ia ^? iaProgress . _Just . ix 0 of
|
||||||
Just la -> showLoadActionType la (_laSource ic)
|
Nothing -> maybe "" show $ ia ^? iaLoaded
|
||||||
Just AboveSource -> fromMaybe "^^^^" $ do
|
Just la -> showLoadActionType la ia
|
||||||
i <- fmap (subtract 1) $ itm ^? itLocation . ipInvID
|
--showReloadProgress :: Creature -> Item -> String
|
||||||
_ <- cr ^? crInv . ix i . itUse . equipEffect . eeUse . euseAmmoAmount
|
--showReloadProgress cr itm = case ic ^? laSource of
|
||||||
return ""
|
-- Just (InternalSource ia) -> case ia ^? iaProgress . _Just . ix 0 of
|
||||||
_ -> ""
|
-- Nothing -> maybe "" show $ ic ^? laSource . _InternalSource . iaLoaded
|
||||||
where
|
-- Just la -> showLoadActionType la (_laSource ic)
|
||||||
ic = itm ^?! itUse . heldConsumption
|
-- Just AboveSource -> fromMaybe "^^^^" $ do
|
||||||
|
-- i <- fmap (subtract 1) $ itm ^? itLocation . ipInvID
|
||||||
|
-- _ <- cr ^? crInv . ix i . itUse . equipEffect . eeUse . euseAmmoAmount
|
||||||
|
-- return ""
|
||||||
|
-- _ -> ""
|
||||||
|
-- where
|
||||||
|
-- ic = itm ^?! itUse . heldConsumption
|
||||||
|
|
||||||
showLoadActionType :: LoadAction -> AmmoSource -> String
|
showLoadActionType :: LoadAction -> InternalAmmo -> String
|
||||||
showLoadActionType la as = case la of
|
showLoadActionType la as = case la of
|
||||||
LoadEject{} -> "E"
|
LoadEject{} -> "E"
|
||||||
LoadInsert{} -> "L"
|
LoadInsert{} -> "L"
|
||||||
LoadAdd{} -> "A" ++ x
|
LoadAdd{} -> "A" ++ x
|
||||||
LoadPrime{} -> "P"
|
LoadPrime{} -> "P"
|
||||||
where
|
where
|
||||||
x = maybe "" show $ as ^? _InternalSource . iaLoaded
|
x = maybe "" show $ as ^? iaLoaded
|
||||||
|
|
||||||
maybeWarmupStatus :: Item -> Maybe String
|
maybeWarmupStatus :: Item -> Maybe String
|
||||||
maybeWarmupStatus it = case it ^? itUse . heldDelay . warmMax of
|
maybeWarmupStatus it = case it ^? itUse . heldDelay . warmMax of
|
||||||
|
|||||||
+70
-69
@@ -71,8 +71,6 @@ ammoPosition itm hit = case hit of
|
|||||||
TORCH -> NoAmmoPosition
|
TORCH -> NoAmmoPosition
|
||||||
BANGSTICK i -> bangStickAmmoPos i itm
|
BANGSTICK i -> bangStickAmmoPos i itm
|
||||||
PISTOL -> Magazine (V3 5 2 0) lhs
|
PISTOL -> Magazine (V3 5 2 0) lhs
|
||||||
REVOLVER -> revolverAmmoPos
|
|
||||||
REVOLVERX _ -> revolverAmmoPos
|
|
||||||
MACHINEPISTOL -> Magazine (V3 5 2 0) lhs
|
MACHINEPISTOL -> Magazine (V3 5 2 0) lhs
|
||||||
AUTOPISTOL -> Magazine (V3 5 2 0) lhs
|
AUTOPISTOL -> Magazine (V3 5 2 0) lhs
|
||||||
SMG -> Magazine (V3 7 (-2) 0) rhs
|
SMG -> Magazine (V3 7 (-2) 0) rhs
|
||||||
@@ -137,23 +135,21 @@ multigunAmmoPos i =
|
|||||||
where
|
where
|
||||||
f n = fromIntegral n * 5 - ((fromIntegral i - 1) * 2.5)
|
f n = fromIntegral n * 5 - ((fromIntegral i - 1) * 2.5)
|
||||||
|
|
||||||
revolverAmmoPos :: AmmoPosition
|
--revolverAmmoPos :: AmmoPosition
|
||||||
revolverAmmoPos =
|
--revolverAmmoPos =
|
||||||
Bullets
|
-- Bullets
|
||||||
[(V3 5 0 1 + Q.rotate q (V3 0 0 2), q) | q <- qs]
|
-- [(V3 5 0 1 + Q.rotate q (V3 0 0 2), q) | q <- qs]
|
||||||
where
|
-- where
|
||||||
qs = [Q.axisAngle (V3 1 0 0) (f i) | i <- [1 .. 6 :: Int]]
|
-- qs = [Q.axisAngle (V3 1 0 0) (f i) | i <- [1 .. 6 :: Int]]
|
||||||
f i = fromIntegral i * pi / 3 + pi / 6
|
-- f i = fromIntegral i * pi / 3 + pi / 6
|
||||||
|
|
||||||
heldItemSPic :: HeldItemType -> Item -> SPic
|
heldItemSPic :: HeldItemType -> Item -> SPic
|
||||||
heldItemSPic ht it = case ht of
|
heldItemSPic ht it = case ht of
|
||||||
FLATSHIELD -> flatShieldEquipSPic
|
FLATSHIELD -> flatShieldEquipSPic
|
||||||
FORCEFIELDGUN -> defSPic
|
FORCEFIELDGUN -> defSPic
|
||||||
TORCH -> noPic torchShape
|
TORCH -> noPic torchShape
|
||||||
BANGSTICK i -> noPic $ baseStickShapeX it i <> addBullets it
|
BANGSTICK i -> noPic $ baseStickShapeX it i -- <> addBullets it
|
||||||
PISTOL -> noPic $ baseStickShape <> addTinClip it
|
PISTOL -> noPic $ baseStickShape <> addTinClip it
|
||||||
REVOLVER -> noPic $ baseStickShape <> addBullets it
|
|
||||||
REVOLVERX _ -> noPic $ baseStickShape <> addBullets it
|
|
||||||
MACHINEPISTOL -> noPic $ baseStickShape <> addTinClip it
|
MACHINEPISTOL -> noPic $ baseStickShape <> addTinClip it
|
||||||
AUTOPISTOL -> noPic $ baseStickShape <> addTinClip it
|
AUTOPISTOL -> noPic $ baseStickShape <> addTinClip it
|
||||||
SMG -> noPic $ baseSMGShape <> addTinClip it
|
SMG -> noPic $ baseSMGShape <> addTinClip it
|
||||||
@@ -161,17 +157,17 @@ heldItemSPic ht it = case ht of
|
|||||||
BLUNDERBUSS -> noPic $ bangConeShape 20
|
BLUNDERBUSS -> noPic $ bangConeShape 20
|
||||||
GRAPECANNON _ -> noPic $ bangConeShape 20
|
GRAPECANNON _ -> noPic $ bangConeShape 20
|
||||||
MINIGUNX i -> miniGunXPictItem i it
|
MINIGUNX i -> miniGunXPictItem i it
|
||||||
VOLLEYGUN i -> noPic $ volleyGunShape i <> addBullets it
|
VOLLEYGUN i -> noPic $ volleyGunShape i -- <> addBullets it
|
||||||
MULTIGUN i -> noPic $ volleyGunShape i <> addBullets it
|
MULTIGUN i -> noPic $ volleyGunShape i -- <> addBullets it
|
||||||
RIFLE -> noPic $ baseRifleShape <> addBullets it
|
RIFLE -> noPic $ baseRifleShape -- <> addBullets it
|
||||||
REPEATER -> noPic $ baseRifleShape <> addTinClip it
|
REPEATER -> noPic $ baseRifleShape <> addTinClip it
|
||||||
AUTORIFLE -> noPic $ baseRifleShape <> addTinClip it
|
AUTORIFLE -> noPic $ baseRifleShape <> addTinClip it
|
||||||
BURSTRIFLE -> noPic $ baseRifleShape <> addTinClip it
|
BURSTRIFLE -> noPic $ baseRifleShape <> addTinClip it
|
||||||
BANGROD -> noPic $ baseRodShape <> addBullets it
|
BANGROD -> noPic $ baseRodShape -- <> addBullets it
|
||||||
ELEPHANTGUN -> noPic $ baseAMRShape <> addBullets it
|
ELEPHANTGUN -> noPic $ baseAMRShape -- <> addBullets it
|
||||||
AMR -> noPic $ baseAMRShape <> addTinClip it
|
AMR -> noPic $ baseAMRShape <> addTinClip it
|
||||||
AUTOAMR -> noPic $ baseAMRShape <> addTinClip it
|
AUTOAMR -> noPic $ baseAMRShape <> addTinClip it
|
||||||
SNIPERRIFLE -> noPic $ baseAMRShape <> addBullets it
|
SNIPERRIFLE -> noPic $ baseAMRShape -- <> addBullets it
|
||||||
MACHINEGUN -> noPic $ baseAMRShape <> addTinClip it
|
MACHINEGUN -> noPic $ baseAMRShape <> addTinClip it
|
||||||
FLAMESPITTER -> flamerPic it
|
FLAMESPITTER -> flamerPic it
|
||||||
FLAMETHROWER -> flamerPic it
|
FLAMETHROWER -> flamerPic it
|
||||||
@@ -251,12 +247,12 @@ baseRifleShape :: Shape
|
|||||||
--baseRifleShape = colorSH red $ xCylinder 4 2 25
|
--baseRifleShape = colorSH red $ xCylinder 4 2 25
|
||||||
baseRifleShape = colorSH red $ xCylinderST 3 25
|
baseRifleShape = colorSH red $ xCylinderST 3 25
|
||||||
|
|
||||||
addBullets :: Item -> Shape
|
--addBullets :: Item -> Shape
|
||||||
addBullets itm = fromMaybe mempty $ do
|
--addBullets itm = fromMaybe mempty $ do
|
||||||
x <- itm ^? itUse . heldConsumption . laSource . _InternalSource . iaLoaded
|
-- x <- itm ^? itUse . heldConsumption . laSource . _InternalSource . iaLoaded
|
||||||
hit <- itm ^? itType . iyBase . ibtHeld
|
-- hit <- itm ^? itType . iyBase . ibtHeld
|
||||||
ps <- fmap (take x) $ ammoPosition itm hit ^? amPosDirs
|
-- ps <- fmap (take x) $ ammoPosition itm hit ^? amPosDirs
|
||||||
return $ foldMap (uncurry (drawBullet itm)) ps
|
-- return $ foldMap (uncurry (drawBullet itm)) ps
|
||||||
|
|
||||||
-- why is this duplicated?
|
-- why is this duplicated?
|
||||||
drawBullet :: Item -> Point3 -> Q.Quaternion Float -> Shape
|
drawBullet :: Item -> Point3 -> Q.Quaternion Float -> Shape
|
||||||
@@ -293,47 +289,49 @@ drawBullet itm p q =
|
|||||||
rectNSWE 0.2 (- 0.2) (-2) (-1)
|
rectNSWE 0.2 (- 0.2) (-2) (-1)
|
||||||
|
|
||||||
addTinClip :: Item -> Shape
|
addTinClip :: Item -> Shape
|
||||||
addTinClip itm = fromMaybe mempty $ do
|
addTinClip _ = mempty
|
||||||
hit <- itm ^? itType . iyBase . ibtHeld
|
--addTinClip :: Item -> Shape
|
||||||
let ap = ammoPosition itm hit
|
--addTinClip itm = fromMaybe mempty $ do
|
||||||
p <- ap ^? amposPos
|
-- hit <- itm ^? itType . iyBase . ibtHeld
|
||||||
d <- ap ^? amposDir
|
-- let ap = ammoPosition itm hit
|
||||||
return $ translateSH p $ overPosSH (Q.rotate d) $ makeTinClip itm
|
-- p <- ap ^? amposPos
|
||||||
|
-- d <- ap ^? amposDir
|
||||||
makeTinClip :: Item -> Shape
|
-- return $ translateSH p $ overPosSH (Q.rotate d) $ makeTinClip itm
|
||||||
makeTinClip it =
|
--
|
||||||
colorSH
|
--makeTinClip :: Item -> Shape
|
||||||
midcol
|
--makeTinClip it =
|
||||||
( upperPrismPolyTS
|
-- colorSH
|
||||||
1
|
-- midcol
|
||||||
( reverse $
|
-- ( upperPrismPolyTS
|
||||||
rectNSWE 0 (- y) (-1) 1
|
-- 1
|
||||||
)
|
-- ( reverse $
|
||||||
)
|
-- rectNSWE 0 (- y) (-1) 1
|
||||||
<> tips
|
-- )
|
||||||
<> tails
|
-- )
|
||||||
where
|
-- <> tips
|
||||||
midcol =
|
-- <> tails
|
||||||
maybe
|
-- where
|
||||||
black
|
-- midcol =
|
||||||
bulletEffectColor
|
-- maybe
|
||||||
(it ^? itUse . heldConsumption . laAmmoType . amBullet . buEffect)
|
-- black
|
||||||
y = fromIntegral y' * 0.3
|
-- bulletEffectColor
|
||||||
y' = fromMaybe 0 $ it ^? itUse . heldConsumption . laSource . _InternalSource . iaLoaded
|
-- (it ^? itUse . heldConsumption . laAmmoType . amBullet . buEffect)
|
||||||
tips = fromMaybe mempty $ do
|
-- y = fromIntegral y' * 0.3
|
||||||
ebt <- it ^? itUse . heldConsumption . laAmmoType . amBullet . buSpawn
|
-- y' = fromMaybe 0 $ it ^? itUse . heldConsumption . laSource . _InternalSource . iaLoaded
|
||||||
return $
|
-- tips = fromMaybe mempty $ do
|
||||||
colorSH (bulletPayloadColor ebt) $
|
-- ebt <- it ^? itUse . heldConsumption . laAmmoType . amBullet . buSpawn
|
||||||
upperPrismPolyTS 1.1 $
|
-- return $
|
||||||
reverse $
|
-- colorSH (bulletPayloadColor ebt) $
|
||||||
rectNSWE 0 (- y) 1 2
|
-- upperPrismPolyTS 1.1 $
|
||||||
tails = fromMaybe mempty $ do
|
-- reverse $
|
||||||
ebt <- it ^? itUse . heldConsumption . laAmmoType . amBullet . buTrajectory
|
-- rectNSWE 0 (- y) 1 2
|
||||||
return $
|
-- tails = fromMaybe mempty $ do
|
||||||
colorSH (bulletTrajColor ebt) $
|
-- ebt <- it ^? itUse . heldConsumption . laAmmoType . amBullet . buTrajectory
|
||||||
upperPrismPolyTS 1.1 $
|
-- return $
|
||||||
reverse $
|
-- colorSH (bulletTrajColor ebt) $
|
||||||
rectNSWE 0 (- y) (-2) (-1)
|
-- upperPrismPolyTS 1.1 $
|
||||||
|
-- reverse $
|
||||||
|
-- rectNSWE 0 (- y) (-2) (-1)
|
||||||
|
|
||||||
bulletEffectColor :: BulletEffect -> Color
|
bulletEffectColor :: BulletEffect -> Color
|
||||||
bulletEffectColor x = case x of
|
bulletEffectColor x = case x of
|
||||||
@@ -410,14 +408,15 @@ flamerPic it =
|
|||||||
( colorSH yellow $
|
( colorSH yellow $
|
||||||
translateSHxy tx ty (upperPrismPolyST tz $ polyCirc 3 r)
|
translateSHxy tx ty (upperPrismPolyST tz $ polyCirc 3 r)
|
||||||
<> xCylinderST 5 18
|
<> xCylinderST 5 18
|
||||||
, color black $ translate3 (V3 tx ty (tz + 0.01)) $ circleSolid (r * am)
|
--, color black $ translate3 (V3 tx ty (tz + 0.01)) $ circleSolid (r * am)
|
||||||
|
, color black $ translate3 (V3 tx ty (tz + 0.01)) $ circleSolid (r * 0.5)
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
tx = 4
|
tx = 4
|
||||||
ty = - 6
|
ty = - 6
|
||||||
tz = 3
|
tz = 3
|
||||||
r = 5
|
r = 5
|
||||||
am = fractionLoadedAmmo2 it
|
-- am = fractionLoadedAmmo2 it
|
||||||
|
|
||||||
launcherPic :: Item -> SPic
|
launcherPic :: Item -> SPic
|
||||||
launcherPic _ = noPic . colorSH cyan $ xCylinderST 5 20
|
launcherPic _ = noPic . colorSH cyan $ xCylinderST 5 20
|
||||||
@@ -454,7 +453,8 @@ lasGunPic it =
|
|||||||
, setLayer BloomNoZWrite . color col . setDepth 1.1 . polygon $ rectNESW 1 30 (-1) 0
|
, setLayer BloomNoZWrite . color col . setDepth 1.1 . polygon $ rectNESW 1 30 (-1) 0
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
amFrac = fractionLoadedAmmo it
|
--amFrac = fractionLoadedAmmo it
|
||||||
|
amFrac = 0.5
|
||||||
col = brightX 2 1.5 $ mixColors amFrac (1 - amFrac) green red
|
col = brightX 2 1.5 $ mixColors amFrac (1 - amFrac) green red
|
||||||
|
|
||||||
dualBeamPic :: Item -> SPic
|
dualBeamPic :: Item -> SPic
|
||||||
@@ -466,7 +466,8 @@ dualBeamPic it =
|
|||||||
, setLayer BloomNoZWrite . color col . setDepth 1.1 . polygon $ rectNESW gap 1 (- gap) (-1)
|
, setLayer BloomNoZWrite . color col . setDepth 1.1 . polygon $ rectNESW gap 1 (- gap) (-1)
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
amFrac = fractionLoadedAmmo it
|
--amFrac = fractionLoadedAmmo it
|
||||||
|
amFrac = 0.5
|
||||||
col = brightX 2 1.5 $ mixColors amFrac (1 - amFrac) green red
|
col = brightX 2 1.5 $ mixColors amFrac (1 - amFrac) green red
|
||||||
gap = _dbGap (_itParams it) - 3
|
gap = _dbGap (_itParams it) - 3
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,6 @@ itemFromHeldType ht = case ht of
|
|||||||
SHATTERGUN -> shatterGun
|
SHATTERGUN -> shatterGun
|
||||||
BANGSTICK i -> bangStick i
|
BANGSTICK i -> bangStick i
|
||||||
PISTOL -> pistol
|
PISTOL -> pistol
|
||||||
REVOLVER -> revolver
|
|
||||||
REVOLVERX i -> revolverX i
|
|
||||||
MACHINEPISTOL -> machinePistol
|
MACHINEPISTOL -> machinePistol
|
||||||
AUTOPISTOL -> autoPistol
|
AUTOPISTOL -> autoPistol
|
||||||
SMG -> smg
|
SMG -> smg
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ sparkGun =
|
|||||||
teslaGun :: Item
|
teslaGun :: Item
|
||||||
teslaGun =
|
teslaGun =
|
||||||
defaultBatteryGun
|
defaultBatteryGun
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 200
|
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaCycle .~ [loadEject 10, loadInsert 10, loadPrime 60]
|
|
||||||
& itDimension . dimRad .~ 9
|
& itDimension . dimRad .~ 9
|
||||||
& itDimension . dimCenter .~ V3 4 0 0
|
& itDimension . dimCenter .~ V3 4 0 0
|
||||||
& itParams .~ teslaParams
|
& itParams .~ teslaParams
|
||||||
@@ -40,8 +38,6 @@ lasGun =
|
|||||||
defaultAutoBatteryGun
|
defaultAutoBatteryGun
|
||||||
& itUse . heldConsumption
|
& itUse . heldConsumption
|
||||||
.~ ( defaultLoadable
|
.~ ( defaultLoadable
|
||||||
& laSource . _InternalSource . iaMax .~ 200000
|
|
||||||
& laSource . _InternalSource . iaCycle .~ [loadEject 10, loadInsert 10, loadPrime 60]
|
|
||||||
)
|
)
|
||||||
& itParams
|
& itParams
|
||||||
.~ Refracting
|
.~ Refracting
|
||||||
@@ -81,8 +77,6 @@ tractorGun =
|
|||||||
lasGun
|
lasGun
|
||||||
& itUse . heldConsumption
|
& itUse . heldConsumption
|
||||||
.~ ( defaultLoadable
|
.~ ( defaultLoadable
|
||||||
& laSource . _InternalSource . iaMax .~ 10000
|
|
||||||
& laSource . _InternalSource . iaCycle .~ [loadEject 10, loadInsert 10, loadPrime 60]
|
|
||||||
)
|
)
|
||||||
& itParams .~ Attracting{_attractionPower = 1}
|
& itParams .~ Attracting{_attractionPower = 1}
|
||||||
& itTweaks
|
& itTweaks
|
||||||
@@ -137,7 +131,6 @@ lasCircle =
|
|||||||
& itType . iyBase .~ HELD LASCIRCLE
|
& itType . iyBase .~ HELD LASCIRCLE
|
||||||
& itParams . lasColor .~ orange
|
& itParams . lasColor .~ orange
|
||||||
& itParams . lasDamage .~ 2
|
& itParams . lasDamage .~ 2
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 10000
|
|
||||||
& itUse . heldUse .~ HeldLaser --shootLaser
|
& itUse . heldUse .~ HeldLaser --shootLaser
|
||||||
& itUse . heldDelay .~ NoDelay
|
& itUse . heldDelay .~ NoDelay
|
||||||
& itUse . heldUse .~ HeldCircleLaser --circleLaser
|
& itUse . heldUse .~ HeldCircleLaser --circleLaser
|
||||||
|
|||||||
@@ -34,8 +34,6 @@ defaultBangCane =
|
|||||||
& itUse . heldAim . aimStance .~ OneHand
|
& itUse . heldAim . aimStance .~ OneHand
|
||||||
-- & itUse . heldAim . aimHandlePos .~ 5
|
-- & itUse . heldAim . aimHandlePos .~ 5
|
||||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.01]
|
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.01]
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 1
|
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaCycle .~ [loadPartialInsert 10 1]
|
|
||||||
|
|
||||||
volleyGun :: Int -> Item
|
volleyGun :: Int -> Item
|
||||||
volleyGun i =
|
volleyGun i =
|
||||||
@@ -46,7 +44,6 @@ volleyGun i =
|
|||||||
& itUse . heldAim . aimStance .~ TwoHandFlat
|
& itUse . heldAim . aimStance .~ TwoHandFlat
|
||||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 3]
|
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 3]
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ i
|
|
||||||
& itParams . torqueAfter .~ 0.15 + 0.05 * fromIntegral i
|
& itParams . torqueAfter .~ 0.15 + 0.05 * fromIntegral i
|
||||||
& itType . iyBase .~ HELD (VOLLEYGUN i)
|
& itType . iyBase .~ HELD (VOLLEYGUN i)
|
||||||
|
|
||||||
@@ -59,7 +56,6 @@ multiGun i =
|
|||||||
& itUse . heldAim . aimStance .~ TwoHandFlat
|
& itUse . heldAim . aimStance .~ TwoHandFlat
|
||||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 3]
|
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 3]
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ i
|
|
||||||
& itParams . torqueAfter .~ 0.15 + 0.05 * fromIntegral i
|
& itParams . torqueAfter .~ 0.15 + 0.05 * fromIntegral i
|
||||||
& itType . iyBase .~ HELD (MULTIGUN i)
|
& itType . iyBase .~ HELD (MULTIGUN i)
|
||||||
|
|
||||||
@@ -68,9 +64,6 @@ rifle =
|
|||||||
defaultBangCane
|
defaultBangCane
|
||||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||||
& itType . iyBase .~ HELD RIFLE
|
& itType . iyBase .~ HELD RIFLE
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 1
|
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaCycle
|
|
||||||
.~ [loadEject 5, loadInsert 5, loadPrime 5]
|
|
||||||
& itUse . heldAim . aimWeight .~ 6
|
& itUse . heldAim . aimWeight .~ 6
|
||||||
& itUse . heldAim . aimRange .~ 1
|
& itUse . heldAim . aimRange .~ 1
|
||||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||||
@@ -82,8 +75,6 @@ repeater =
|
|||||||
rifle
|
rifle
|
||||||
& itType . iyModules . at ModRifleMag ?~ EMPTYMODULE
|
& itType . iyModules . at ModRifleMag ?~ EMPTYMODULE
|
||||||
& itType . iyBase .~ HELD REPEATER
|
& itType . iyBase .~ HELD REPEATER
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaCycle .~ [loadEject 20, loadInsert 20, loadPrime 20]
|
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 15
|
|
||||||
|
|
||||||
autoRifle :: Item
|
autoRifle :: Item
|
||||||
autoRifle =
|
autoRifle =
|
||||||
@@ -111,10 +102,6 @@ miniGunUse i =
|
|||||||
& heldAim . aimRange .~ 1
|
& heldAim . aimRange .~ 1
|
||||||
& heldAim . aimStance .~ TwoHandUnder
|
& heldAim . aimStance .~ TwoHandUnder
|
||||||
& heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
& heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||||
& heldConsumption
|
|
||||||
.~ (defaultBulletLoadable & laSource .~ AboveSource)
|
|
||||||
-- & heldConsumption . laSource . _InternalSource . iaCycle
|
|
||||||
-- .~ [loadEject 40, loadInsert 40, loadPrime 40]
|
|
||||||
|
|
||||||
miniGunX :: Int -> Item
|
miniGunX :: Int -> Item
|
||||||
miniGunX i =
|
miniGunX i =
|
||||||
|
|||||||
@@ -27,14 +27,10 @@ bangCone =
|
|||||||
-- & itUse . heldAim . aimHandlePos .~ 5
|
-- & itUse . heldAim . aimHandlePos .~ 5
|
||||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.5]
|
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.5]
|
||||||
& itType . iyBase .~ HELD BANGCONE
|
& itType . iyBase .~ HELD BANGCONE
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 5
|
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaCycle .~ [loadEject 5, loadInsert 20, loadPrime 5]
|
|
||||||
|
|
||||||
blunderbuss :: Item
|
blunderbuss :: Item
|
||||||
blunderbuss =
|
blunderbuss =
|
||||||
bangCone
|
bangCone
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 25
|
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaCycle .~ [loadEject 5, loadInsert 30, loadPrime 5]
|
|
||||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||||
& itUse . heldAim . aimWeight .~ 6
|
& itUse . heldAim . aimWeight .~ 6
|
||||||
-- & itUse . heldAim . aimHandlePos .~ 5
|
-- & itUse . heldAim . aimHandlePos .~ 5
|
||||||
@@ -45,8 +41,6 @@ grapeCannon :: Int -> Item
|
|||||||
grapeCannon i =
|
grapeCannon i =
|
||||||
blunderbuss
|
blunderbuss
|
||||||
& itType . iyBase .~ HELD (GRAPECANNON i)
|
& itType . iyBase .~ HELD (GRAPECANNON i)
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 25 + 25 * i
|
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaCycle .~ [loadEject 5, loadInsert (30 + i * 10), loadPrime 5]
|
|
||||||
& itParams . recoil .~ (150 + fromIntegral i * 50)
|
& itParams . recoil .~ (150 + fromIntegral i * 50)
|
||||||
& itParams . torqueAfter .~ (0.1 + 0.2 * fromIntegral i)
|
& itParams . torqueAfter .~ (0.1 + 0.2 * fromIntegral i)
|
||||||
& itParams . randomOffset .~ (12 + 4 * fromIntegral i)
|
& itParams . randomOffset .~ (12 + 4 * fromIntegral i)
|
||||||
|
|||||||
@@ -39,9 +39,6 @@ launcher =
|
|||||||
, _amPjDraw = DrawShell
|
, _amPjDraw = DrawShell
|
||||||
, _amPjCreation = CreateShell
|
, _amPjCreation = CreateShell
|
||||||
}
|
}
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 1
|
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaLoaded .~ 1
|
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaCycle .~ [loadEject 30, loadInsert 30, loadPrime 10]
|
|
||||||
& itType . iyBase .~ HELD LAUNCHER
|
& itType . iyBase .~ HELD LAUNCHER
|
||||||
& itType . iyModules . at ModLauncherHoming ?~ EMPTYMODULE
|
& itType . iyModules . at ModLauncherHoming ?~ EMPTYMODULE
|
||||||
|
|
||||||
@@ -49,8 +46,6 @@ launcherX :: Int -> Item
|
|||||||
launcherX i =
|
launcherX i =
|
||||||
launcher
|
launcher
|
||||||
& itType . iyBase .~ HELD (LAUNCHERX i)
|
& itType . iyBase .~ HELD (LAUNCHERX i)
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ i
|
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaLoaded .~ i
|
|
||||||
& itUse . heldUse .~ HeldPJCreationX i
|
& itUse . heldUse .~ HeldPJCreationX i
|
||||||
& itUse . heldMods .~ LauncherXMod i
|
& itUse . heldMods .~ LauncherXMod i
|
||||||
|
|
||||||
|
|||||||
@@ -30,8 +30,6 @@ bangRod =
|
|||||||
& itUse . heldMods .~ BangRodMod
|
& itUse . heldMods .~ BangRodMod
|
||||||
& itDimension . dimRad .~ 12
|
& itDimension . dimRad .~ 12
|
||||||
& itDimension . dimCenter .~ V3 5 0 0
|
& itDimension . dimCenter .~ V3 5 0 0
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 1
|
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaCycle .~ [loadEject 5, loadInsert 10, loadPrime 5]
|
|
||||||
& itType . iyBase .~ HELD BANGROD
|
& itType . iyBase .~ HELD BANGROD
|
||||||
& itUse . heldAim . aimWeight .~ 8
|
& itUse . heldAim . aimWeight .~ 8
|
||||||
& itUse . heldAim . aimRange .~ 1
|
& itUse . heldAim . aimRange .~ 1
|
||||||
@@ -54,7 +52,6 @@ amr :: Item
|
|||||||
amr =
|
amr =
|
||||||
elephantGun
|
elephantGun
|
||||||
& itType . iyBase .~ HELD AMR
|
& itType . iyBase .~ HELD AMR
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 15
|
|
||||||
|
|
||||||
autoAmr :: Item
|
autoAmr :: Item
|
||||||
autoAmr =
|
autoAmr =
|
||||||
@@ -80,7 +77,5 @@ machineGun =
|
|||||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||||
& itUse . heldDelay .~ VariableRate{_rateMax = 25, _rateMaxMax = 24, _rateMinMax = 7, _rateTime = 0}
|
& itUse . heldDelay .~ VariableRate{_rateMax = 25, _rateMaxMax = 24, _rateMinMax = 7, _rateTime = 0}
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 100
|
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaCycle .~ [loadEject 10, loadInsert 40, loadPrime 10]
|
|
||||||
& itInvSize .~ 3
|
& itInvSize .~ 3
|
||||||
& itParams . torqueAfter .~ 0.2 -- not sure if this is necessary?
|
& itParams . torqueAfter .~ 0.2 -- not sure if this is necessary?
|
||||||
|
|||||||
@@ -28,8 +28,6 @@ flameSpitter :: Item
|
|||||||
flameSpitter =
|
flameSpitter =
|
||||||
flameThrower
|
flameThrower
|
||||||
& itType . iyBase .~ HELD FLAMESPITTER
|
& itType . iyBase .~ HELD FLAMESPITTER
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 10
|
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaCycle .~ [loadEject 5, loadInsert 10, loadPrime 20]
|
|
||||||
& itParams . sprayNozzles . ix 0 . nzPressure .~ 4
|
& itParams . sprayNozzles . ix 0 . nzPressure .~ 4
|
||||||
& itUse . heldAim . aimStance .~ OneHand
|
& itUse . heldAim . aimStance .~ OneHand
|
||||||
& itUse . heldDelay .~ FixedRate{_rateMax = 12, _rateTime = 0}
|
& itUse . heldDelay .~ FixedRate{_rateMax = 12, _rateTime = 0}
|
||||||
@@ -96,12 +94,10 @@ flameThrower =
|
|||||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 18 0) 0 0]
|
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 18 0) 0 0]
|
||||||
& itUse . heldConsumption
|
& itUse . heldConsumption
|
||||||
.~ ( defaultLoadable
|
.~ ( defaultLoadable
|
||||||
& laSource . _InternalSource . iaMax .~ 250
|
|
||||||
& laAmmoType
|
& laAmmoType
|
||||||
.~ GasAmmo
|
.~ GasAmmo
|
||||||
{ _amString = "FLAME"
|
{ _amString = "FLAME"
|
||||||
, _amCreateGas = CreateFlame --aFlame
|
, _amCreateGas = CreateFlame --aFlame
|
||||||
}
|
}
|
||||||
& laSource . _InternalSource . iaCycle .~ [loadEject 5, loadInsert 10, loadPrime 20]
|
|
||||||
)
|
)
|
||||||
& itType . iyBase .~ HELD FLAMETHROWER
|
& itType . iyBase .~ HELD FLAMETHROWER
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ module Dodge.Item.Held.Stick (
|
|||||||
autoPistol,
|
autoPistol,
|
||||||
machinePistol,
|
machinePistol,
|
||||||
smg,
|
smg,
|
||||||
revolver,
|
|
||||||
revolverX,
|
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Dodge.Base
|
import Dodge.Base
|
||||||
@@ -34,28 +32,15 @@ bangStick i =
|
|||||||
& itUse . heldDelay . rateMax .~ 8
|
& itUse . heldDelay . rateMax .~ 8
|
||||||
& itUse . heldMods .~ BangStickMod
|
& itUse . heldMods .~ BangStickMod
|
||||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 10 0) a 0.01 | a <- spreadAroundCenter i baseStickSpread]
|
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 10 0) a 0.01 | a <- spreadAroundCenter i baseStickSpread]
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ i
|
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaCycle .~ [loadPartialInsert 10 1]
|
|
||||||
|
|
||||||
baseStickSpread :: Float
|
baseStickSpread :: Float
|
||||||
baseStickSpread = 0.2
|
baseStickSpread = 0.2
|
||||||
|
|
||||||
revolver :: Item
|
|
||||||
revolver =
|
|
||||||
pistol
|
|
||||||
& itUse . heldConsumption
|
|
||||||
.~ ( defaultBulletLoadable
|
|
||||||
& laSource . _InternalSource . iaMax .~ 6
|
|
||||||
& laSource . _InternalSource . iaCycle .~ [loadPartialInsert 10 1]
|
|
||||||
)
|
|
||||||
& itType . iyBase .~ HELD REVOLVER
|
|
||||||
|
|
||||||
pistol :: Item
|
pistol :: Item
|
||||||
pistol =
|
pistol =
|
||||||
bangStick 1
|
bangStick 1
|
||||||
& itUse . heldConsumption
|
& itUse . heldConsumption
|
||||||
.~ ( defaultBulletLoadable
|
.~ ( defaultBulletLoadable
|
||||||
& laSource .~ BelowSource
|
|
||||||
)
|
)
|
||||||
& itUse . heldDelay . rateMax .~ 6
|
& itUse . heldDelay . rateMax .~ 6
|
||||||
& itUse . heldMods .~ PistolMod
|
& itUse . heldMods .~ PistolMod
|
||||||
@@ -94,11 +79,3 @@ smg =
|
|||||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 20 0) 0 0]
|
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 20 0) 0 0]
|
||||||
-- & itUse . heldAim . aimHandlePos .~ 2
|
-- & itUse . heldAim . aimHandlePos .~ 2
|
||||||
& itParams . torqueAfter .~ 0.05
|
& itParams . torqueAfter .~ 0.05
|
||||||
|
|
||||||
revolverX :: Int -> Item
|
|
||||||
revolverX i =
|
|
||||||
revolver
|
|
||||||
& itUse . heldDelay . rateMax .~ 8
|
|
||||||
& itUse . heldMods .~ RevolverXMod
|
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ i * 6
|
|
||||||
& itType . iyBase .~ HELD (REVOLVERX i)
|
|
||||||
|
|||||||
@@ -63,8 +63,6 @@ heldInfo hit = case hit of
|
|||||||
BANGSTICK 1 -> "A firearm with a short barrel that requires reloading after each shot."
|
BANGSTICK 1 -> "A firearm with a short barrel that requires reloading after each shot."
|
||||||
BANGSTICK i -> over _head toUpper (showInt i) ++ " small gun barrels strapped together. Each barrel must be individually loaded, but not all need be loaded for the weapon to fire. All loaded barrels discharge simultaneously, with significant spread."
|
BANGSTICK i -> over _head toUpper (showInt i) ++ " small gun barrels strapped together. Each barrel must be individually loaded, but not all need be loaded for the weapon to fire. All loaded barrels discharge simultaneously, with significant spread."
|
||||||
PISTOL -> "A small firearm fed by a magazine. The entire magazine must be replaced when reloading the weapon."
|
PISTOL -> "A small firearm fed by a magazine. The entire magazine must be replaced when reloading the weapon."
|
||||||
REVOLVER -> "A small firearm fed by a revolving cylinder. Single shot and load."
|
|
||||||
REVOLVERX i -> "A small firearm fed by " ++ showInt i ++ "revolving cylinders."
|
|
||||||
MACHINEPISTOL -> "A small firearm automatically, and extremely rapidly, fed by a magazine. The entire magazine must be replaced when reloading the weapon."
|
MACHINEPISTOL -> "A small firearm automatically, and extremely rapidly, fed by a magazine. The entire magazine must be replaced when reloading the weapon."
|
||||||
AUTOPISTOL -> "A small firearm automatically fed by a magazine. The entire magazine must be replaced when reloading the weapon."
|
AUTOPISTOL -> "A small firearm automatically fed by a magazine. The entire magazine must be replaced when reloading the weapon."
|
||||||
SMG -> "A small firearm with an attached stock for stability."
|
SMG -> "A small firearm with an attached stock for stability."
|
||||||
|
|||||||
@@ -28,8 +28,6 @@ heldBounds :: HeldItemType -> Point3
|
|||||||
heldBounds hit = case hit of
|
heldBounds hit = case hit of
|
||||||
BANGSTICK _ -> V3 0 0 0
|
BANGSTICK _ -> V3 0 0 0
|
||||||
PISTOL -> bss
|
PISTOL -> bss
|
||||||
REVOLVER -> bss
|
|
||||||
REVOLVERX _ -> bss
|
|
||||||
MACHINEPISTOL -> bss
|
MACHINEPISTOL -> bss
|
||||||
AUTOPISTOL -> bss
|
AUTOPISTOL -> bss
|
||||||
SMG -> smgs
|
SMG -> smgs
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ droneLauncher =
|
|||||||
& itUse . heldAim . aimRange .~ 0.5
|
& itUse . heldAim . aimRange .~ 0.5
|
||||||
& itUse . heldAim . aimStance .~ TwoHandOver
|
& itUse . heldAim . aimStance .~ TwoHandOver
|
||||||
& itUse . heldConsumption . laAmmoType .~ DroneAmmo{_amString = "LASDRONE"}
|
& itUse . heldConsumption . laAmmoType .~ DroneAmmo{_amString = "LASDRONE"}
|
||||||
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 2
|
|
||||||
& itType . iyBase .~ HELD DRONELAUNCHER
|
& itType . iyBase .~ HELD DRONELAUNCHER
|
||||||
|
|
||||||
lasDronesPic :: Item -> SPic
|
lasDronesPic :: Item -> SPic
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
module Dodge.Item.Weapon.FractionLoaded (
|
module Dodge.Item.Weapon.FractionLoaded (
|
||||||
fractionLoadedAmmo,
|
-- fractionLoadedAmmo,
|
||||||
fractionLoadedAmmo2,
|
-- fractionLoadedAmmo2,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
import Dodge.Data.Item
|
import Dodge.Data.Item
|
||||||
|
|
||||||
---- this shouldn't really be used
|
-- ---- this shouldn't really be used
|
||||||
loadedAmmo :: Item -> Int
|
-- loadedAmmo :: Item -> Int
|
||||||
loadedAmmo itm = fromMaybe 0 $ itm ^? itUse . heldConsumption . laSource . _InternalSource . iaLoaded
|
-- loadedAmmo itm = fromMaybe 0 $ itm ^? itUse . heldConsumption . laSource . _InternalSource . iaLoaded
|
||||||
|
--
|
||||||
-- | _laTransfer (_itConsumption it) == NoTransfer = _laLoaded (_itConsumption it)
|
-- -- | _laTransfer (_itConsumption it) == NoTransfer = _laLoaded (_itConsumption it)
|
||||||
-- | otherwise = 0
|
-- -- | otherwise = 0
|
||||||
|
--
|
||||||
fractionLoadedAmmo :: Item -> Float
|
-- fractionLoadedAmmo :: Item -> Float
|
||||||
fractionLoadedAmmo it = fromIntegral (loadedAmmo it) / fromIntegral itmaxammo
|
-- fractionLoadedAmmo it = fromIntegral (loadedAmmo it) / fromIntegral itmaxammo
|
||||||
where
|
-- where
|
||||||
itmaxammo = fromMaybe 1 $ it ^? itUse . heldConsumption . laSource . _InternalSource . iaMax
|
-- itmaxammo = fromMaybe 1 $ it ^? itUse . heldConsumption . laSource . _InternalSource . iaMax
|
||||||
|
--
|
||||||
fractionLoadedAmmo2 :: Item -> Float
|
-- fractionLoadedAmmo2 :: Item -> Float
|
||||||
fractionLoadedAmmo2 it =
|
-- fractionLoadedAmmo2 it =
|
||||||
1 - (1 - fromIntegral (loadedAmmo it) / fromIntegral itmaxammo) ** 2
|
-- 1 - (1 - fromIntegral (loadedAmmo it) / fromIntegral itmaxammo) ** 2
|
||||||
where
|
-- where
|
||||||
itmaxammo = fromMaybe 1 $ it ^? itUse . heldConsumption . laSource . _InternalSource . iaMax
|
-- itmaxammo = fromMaybe 1 $ it ^? itUse . heldConsumption . laSource . _InternalSource . iaMax
|
||||||
|
|||||||
@@ -140,23 +140,11 @@ withThickSmokeI eff item cr w =
|
|||||||
-- TODO create a trigger that does different things on first and continued
|
-- TODO create a trigger that does different things on first and continued
|
||||||
-- fire.
|
-- fire.
|
||||||
ammoCheckI :: ChainEffect
|
ammoCheckI :: ChainEffect
|
||||||
ammoCheckI eff itm cr w = case itm ^? itUse . heldConsumption . laSource of
|
ammoCheckI eff itm cr w = fromMaybe (failsound w) $ do
|
||||||
Just (InternalSource ia)
|
invid <- itm ^? itLocation . ipInvID
|
||||||
| _iaLoaded ia <= 0 || not (_iaPrimed ia) ->
|
x <- cr ^? crInv . ix (invid + 1) . itUse . attachParams . ammoAttachParams . iaLoaded
|
||||||
failsound w
|
guard $ x > 0
|
||||||
Just AboveSource
|
return $ eff itm cr $ w & cWorld . lWorld . creatures . ix (_crID cr) %~ crCancelReloading
|
||||||
| fromMaybe True $ do
|
|
||||||
invid <- itm ^? itLocation . ipInvID
|
|
||||||
x <- cr ^? crInv . ix (invid - 1) . itUse . equipEffect . eeUse . euseAmmoAmount
|
|
||||||
return $ x <= 0 ->
|
|
||||||
failsound w
|
|
||||||
Just BelowSource
|
|
||||||
| fromMaybe True $ do
|
|
||||||
invid <- itm ^? itLocation . ipInvID
|
|
||||||
x <- cr ^? crInv . ix (invid + 1) . itUse . attachParams . ammoAttachParams . iaLoaded
|
|
||||||
return $ x <= 0 ->
|
|
||||||
failsound w
|
|
||||||
_ -> eff itm cr $ w & cWorld . lWorld . creatures . ix (_crID cr) %~ crCancelReloading
|
|
||||||
where
|
where
|
||||||
failsound = case w ^? input . mouseButtons . ix SDL.ButtonLeft of
|
failsound = case w ^? input . mouseButtons . ix SDL.ButtonLeft of
|
||||||
Just 0 -> soundStart (CrReloadSound (_crID cr)) (_crPos cr) click1S Nothing
|
Just 0 -> soundStart (CrReloadSound (_crID cr)) (_crPos cr) click1S Nothing
|
||||||
@@ -165,8 +153,8 @@ ammoCheckI eff itm cr w = case itm ^? itUse . heldConsumption . laSource of
|
|||||||
itUseCharge :: Int -> Item -> Item
|
itUseCharge :: Int -> Item -> Item
|
||||||
itUseCharge x = itUse . leftConsumption . arLoaded %~ (max 0 . subtract x)
|
itUseCharge x = itUse . leftConsumption . arLoaded %~ (max 0 . subtract x)
|
||||||
|
|
||||||
itUseAmmo :: Int -> Item -> Item
|
--itUseAmmo :: Int -> Item -> Item
|
||||||
itUseAmmo x = itUse . heldConsumption . laSource . _InternalSource . iaLoaded %~ (max 0 . subtract x)
|
--itUseAmmo x = itUse . heldConsumption . laSource . _InternalSource . iaLoaded %~ (max 0 . subtract x)
|
||||||
|
|
||||||
{- | Fires at an increasing rate.
|
{- | Fires at an increasing rate.
|
||||||
Has different effect after first fire.
|
Has different effect after first fire.
|
||||||
@@ -183,7 +171,7 @@ rateIncAB exeffFirst exeffCont eff item cr w
|
|||||||
w
|
w
|
||||||
& pointItem
|
& pointItem
|
||||||
%~ ( (itUse . heldDelay . rateMax .~ max fastRate (currentRate - 1))
|
%~ ( (itUse . heldDelay . rateMax .~ max fastRate (currentRate - 1))
|
||||||
. itUseAmmo 1
|
-- . itUseAmmo 1
|
||||||
. (itUse . heldDelay . rateTime .~ currentRate)
|
. (itUse . heldDelay . rateTime .~ currentRate)
|
||||||
)
|
)
|
||||||
& exeffCont eff item cr
|
& exeffCont eff item cr
|
||||||
@@ -191,7 +179,7 @@ rateIncAB exeffFirst exeffCont eff item cr w
|
|||||||
w
|
w
|
||||||
& pointItem
|
& pointItem
|
||||||
%~ ( (itUse . heldDelay . rateMax .~ startRate - 1)
|
%~ ( (itUse . heldDelay . rateMax .~ startRate - 1)
|
||||||
. itUseAmmo 1
|
-- . itUseAmmo 1
|
||||||
. (itUse . heldDelay . rateTime .~ startRate)
|
. (itUse . heldDelay . rateTime .~ startRate)
|
||||||
)
|
)
|
||||||
& exeffFirst eff item cr
|
& exeffFirst eff item cr
|
||||||
@@ -352,7 +340,7 @@ useAllAmmo eff item cr = fromMaybe id $ do
|
|||||||
invid <- item ^? itLocation . ipInvID
|
invid <- item ^? itLocation . ipInvID
|
||||||
return $ eff item cr
|
return $ eff item cr
|
||||||
. (cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix (invid + 1)
|
. (cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix (invid + 1)
|
||||||
. itUse . heldConsumption . laSource . _InternalSource . iaLoaded .~ 0)
|
. itUse . attachParams . ammoAttachParams . iaLoaded .~ 0)
|
||||||
|
|
||||||
useAmmoUpTo :: Int -> ChainEffect
|
useAmmoUpTo :: Int -> ChainEffect
|
||||||
useAmmoUpTo amAmount eff itm cr = fromMaybe id $ do
|
useAmmoUpTo amAmount eff itm cr = fromMaybe id $ do
|
||||||
@@ -370,18 +358,7 @@ useAmmoAmount amAmount eff item cr =
|
|||||||
itref = cr ^?! crManipulation . manObject . inInventory . ispItem -- unsafe!! TODO change
|
itref = cr ^?! crManipulation . manObject . inInventory . ispItem -- unsafe!! TODO change
|
||||||
|
|
||||||
useAmmoAmount' :: Int -> Int -> IM.IntMap Item -> IM.IntMap Item
|
useAmmoAmount' :: Int -> Int -> IM.IntMap Item -> IM.IntMap Item
|
||||||
useAmmoAmount' itref x inv = case inv ^? ix itref . itUse . heldConsumption . laSource of
|
useAmmoAmount' itref x inv = inv & ix (itref + 1) . itUse . attachParams . ammoAttachParams . iaLoaded -~ x
|
||||||
Just InternalSource{} ->
|
|
||||||
inv & ix itref . itUse . heldConsumption . laSource . _InternalSource . iaLoaded -~ x
|
|
||||||
Just AboveSource ->
|
|
||||||
inv & ix (itref - 1) . itUse . equipEffect . eeUse . euseAmmoAmount -~ x
|
|
||||||
Just BelowSource ->
|
|
||||||
inv & ix (itref + 1) . itUse . equipEffect . eeUse . euseAmmoAmount -~ x
|
|
||||||
Just EitherSource -> case inv ^? ix (itref - 1) . itUse . equipEffect . eeUse . euseAmmoAmount of
|
|
||||||
Just amamount | amamount > 0 ->
|
|
||||||
inv & ix (itref - 1) . itUse . equipEffect . eeUse . euseAmmoAmount -~ x
|
|
||||||
_ -> inv & ix (itref + 1) . itUse . equipEffect . eeUse . euseAmmoAmount -~ x
|
|
||||||
_ -> inv
|
|
||||||
|
|
||||||
-- . crInv . ix itRef . itUse . heldConsumption . laSource
|
-- . crInv . ix itRef . itUse . heldConsumption . laSource
|
||||||
|
|
||||||
@@ -677,10 +654,12 @@ repeatOnFrames is hm f it cr w =
|
|||||||
-- return $ f it cr' w'
|
-- return $ f it cr' w'
|
||||||
|
|
||||||
duplicateLoaded :: ChainEffect
|
duplicateLoaded :: ChainEffect
|
||||||
duplicateLoaded eff it cr w = foldr f w [1 .. numBul]
|
duplicateLoaded eff it cr w = foldr f w (take numbul [1 .. ])
|
||||||
where
|
where
|
||||||
f _ = eff it cr
|
f _ = eff it cr
|
||||||
numBul = it ^?! itUse . heldConsumption . laSource . _InternalSource . iaLoaded
|
numbul = fromMaybe 0 $ do
|
||||||
|
i <- cr ^? crManipulation . manObject . inInventory . ispItem
|
||||||
|
cr ^? crInv . ix (i+1) . itUse . attachParams . ammoAttachParams . iaLoaded
|
||||||
|
|
||||||
duplicateNumBarrels :: Int -> ChainEffect
|
duplicateNumBarrels :: Int -> ChainEffect
|
||||||
duplicateNumBarrels n eff itm cr w = foldr f w (take n $ itm ^?! itUse . heldAim . aimMuzzles)
|
duplicateNumBarrels n eff itm cr w = foldr f w (take n $ itm ^?! itUse . heldAim . aimMuzzles)
|
||||||
@@ -697,9 +676,12 @@ duplicateNumBarrels n eff itm cr w = foldr f w (take n $ itm ^?! itUse . heldAim
|
|||||||
(a,g) = randomR (-inacc,inacc) $ _randGen w'
|
(a,g) = randomR (-inacc,inacc) $ _randGen w'
|
||||||
|
|
||||||
duplicateLoadedBarrels :: ChainEffect
|
duplicateLoadedBarrels :: ChainEffect
|
||||||
duplicateLoadedBarrels eff itm = duplicateNumBarrels numbul eff itm
|
duplicateLoadedBarrels eff itm cr = duplicateNumBarrels numbul eff itm cr
|
||||||
where
|
where
|
||||||
numbul = itm ^?! itUse . heldConsumption . laSource . _InternalSource . iaLoaded
|
numbul :: Int
|
||||||
|
numbul = fromMaybe 0 $ do
|
||||||
|
i <- cr ^? crManipulation . manObject . inInventory . ispItem
|
||||||
|
cr ^? crInv . ix (i+1) . itUse . attachParams . ammoAttachParams . iaLoaded
|
||||||
|
|
||||||
duplicateOffsetsFocus :: [Float] -> ChainEffect
|
duplicateOffsetsFocus :: [Float] -> ChainEffect
|
||||||
duplicateOffsetsFocus xs eff item cr w = foldr f w poss
|
duplicateOffsetsFocus xs eff item cr w = foldr f w poss
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ moduleName imt = case imt of
|
|||||||
STATICLAS -> Just "+STATIC"
|
STATICLAS -> Just "+STATIC"
|
||||||
WEPTELE -> Just "+DIRECTEDTELE"
|
WEPTELE -> Just "+DIRECTEDTELE"
|
||||||
LAUNCHHOME -> Just "+TARGET HOMING"
|
LAUNCHHOME -> Just "+TARGET HOMING"
|
||||||
EXTRABATTERY -> Just "+BATTERY"
|
|
||||||
ATTACHTORCH -> Just "+TORCH"
|
ATTACHTORCH -> Just "+TORCH"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+9
-10
@@ -1,8 +1,7 @@
|
|||||||
module Dodge.Reloading (
|
module Dodge.Reloading (
|
||||||
crCancelReloading,
|
crCancelReloading,
|
||||||
crUpdateLoadSource,
|
crReload,
|
||||||
stepReloading,
|
stepReloading,
|
||||||
tryStartLoading,
|
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -18,7 +17,7 @@ crCancelReloading cr =
|
|||||||
updateProgress = fromMaybe id $ do
|
updateProgress = fromMaybe id $ do
|
||||||
InInventory (SelItem i _) <- cr ^? crManipulation . manObject
|
InInventory (SelItem i _) <- cr ^? crManipulation . manObject
|
||||||
return $
|
return $
|
||||||
crInv . ix i . itUse . heldConsumption . laSource . _InternalSource . iaProgress
|
crInv . ix (i + 1) . itUse . attachParams . ammoAttachParams . iaProgress
|
||||||
%~ const Nothing
|
%~ const Nothing
|
||||||
|
|
||||||
stepReloading :: Creature -> Creature
|
stepReloading :: Creature -> Creature
|
||||||
@@ -28,29 +27,29 @@ stepReloading cr = case cr ^? crManipulation . manObject . inInventory of
|
|||||||
cr & crManipulation . manObject . inInventory . iselAction . actionProgress -~ 1
|
cr & crManipulation . manObject . inInventory . iselAction . actionProgress -~ 1
|
||||||
| otherwise ->
|
| otherwise ->
|
||||||
cr
|
cr
|
||||||
& crInv . ix i . itUse . heldConsumption . laSource . _InternalSource %~ doLoadAction la
|
& crInv . ix (i + 1) . itUse . attachParams . ammoAttachParams %~ doLoadAction la
|
||||||
& crInv . ix i . itUse . heldConsumption . laSource . _InternalSource %~ rotateActionProgress
|
& crInv . ix (i + 1) . itUse . attachParams . ammoAttachParams %~ rotateActionProgress
|
||||||
& tryNextLoadAction
|
& tryNextLoadAction
|
||||||
_ -> cr
|
_ -> cr
|
||||||
|
|
||||||
tryNextLoadAction :: Creature -> Creature
|
tryNextLoadAction :: Creature -> Creature
|
||||||
tryNextLoadAction cr = case cr ^? crManipulation . manObject . inInventory of
|
tryNextLoadAction cr = case cr ^? crManipulation . manObject . inInventory of
|
||||||
Just (SelItem i _) -> case cr ^? crInv . ix i . itUse . heldConsumption . laSource . _InternalSource . iaProgress . _Just . ix 0 of
|
Just (SelItem i _) -> case cr ^? crInv . ix i . itUse . attachParams . ammoAttachParams . iaProgress . _Just . ix 0 of
|
||||||
Nothing -> cr & crManipulation . manObject . inInventory . iselAction .~ NoInvSelAction
|
Nothing -> cr & crManipulation . manObject . inInventory . iselAction .~ NoInvSelAction
|
||||||
Just la ->
|
Just la ->
|
||||||
cr & crManipulation . manObject . inInventory . iselAction . actionProgress .~ _actionTime la
|
cr & crManipulation . manObject . inInventory . iselAction . actionProgress .~ _actionTime la
|
||||||
& crManipulation . manObject . inInventory . iselAction . reloadAction .~ la
|
& crManipulation . manObject . inInventory . iselAction . reloadAction .~ la
|
||||||
_ -> cr
|
_ -> cr
|
||||||
|
|
||||||
crUpdateLoadSource :: Creature -> Creature
|
crReload :: Creature -> Creature
|
||||||
crUpdateLoadSource cr = case cr ^? crManipulation . manObject . inInventory . iselAction of
|
crReload cr = case cr ^? crManipulation . manObject . inInventory . iselAction of
|
||||||
Just NoInvSelAction -> cr & tryStartLoading
|
Just NoInvSelAction -> cr & tryStartLoading
|
||||||
_ -> cr & crManipulation . manObject . inInventory . iselAction .~ NoInvSelAction
|
_ -> cr & crManipulation . manObject . inInventory . iselAction .~ NoInvSelAction
|
||||||
|
|
||||||
tryStartLoading :: Creature -> Creature
|
tryStartLoading :: Creature -> Creature
|
||||||
tryStartLoading cr = fromMaybe cr $ do
|
tryStartLoading cr = fromMaybe cr $ do
|
||||||
i <- cr ^? crManipulation . manObject . inInventory . ispItem
|
i <- cr ^? crManipulation . manObject . inInventory . ispItem
|
||||||
ia <- cr ^? crInv . ix i . itUse . heldConsumption . laSource . _InternalSource
|
ia <- cr ^? crInv . ix (i + 1) . itUse . attachParams . ammoAttachParams
|
||||||
return $ startLoading ia cr
|
return $ startLoading ia cr
|
||||||
|
|
||||||
-- case as of
|
-- case as of
|
||||||
@@ -67,7 +66,7 @@ startLoading ic cr = case ic ^? iaProgress . _Just . ix 0 of
|
|||||||
i <- cr ^? crManipulation . manObject . inInventory . ispItem
|
i <- cr ^? crManipulation . manObject . inInventory . ispItem
|
||||||
return $
|
return $
|
||||||
cr & startLoadingStep la
|
cr & startLoadingStep la
|
||||||
& crInv . ix i . itUse . heldConsumption . laSource . _InternalSource . iaProgress ?~ (la : las)
|
& crInv . ix i . itUse . attachParams . ammoAttachParams . iaProgress ?~ (la : las)
|
||||||
|
|
||||||
startLoadingStep :: LoadAction -> Creature -> Creature
|
startLoadingStep :: LoadAction -> Creature -> Creature
|
||||||
startLoadingStep la cr = cr & crManipulation . manObject . inInventory . iselAction .~ ReloadAction (_actionTime la) la
|
startLoadingStep la cr = cr & crManipulation . manObject . inInventory . iselAction .~ ReloadAction (_actionTime la) la
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ updateInitialPressInGame uv sc = case sc of
|
|||||||
ScancodeP -> pauseGame uv
|
ScancodeP -> pauseGame uv
|
||||||
ScancodeF -> over uvWorld youDropItem uv
|
ScancodeF -> over uvWorld youDropItem uv
|
||||||
ScancodeM -> toggleMap uv
|
ScancodeM -> toggleMap uv
|
||||||
ScancodeR -> over (uvWorld . cWorld . lWorld . creatures . ix 0) crUpdateLoadSource uv
|
ScancodeR -> over (uvWorld . cWorld . lWorld . creatures . ix 0) crReload uv
|
||||||
ScancodeT -> over uvWorld testEvent uv
|
ScancodeT -> over uvWorld testEvent uv
|
||||||
ScancodeX -> uv & uvWorld %~ toggleTweakInv
|
ScancodeX -> uv & uvWorld %~ toggleTweakInv
|
||||||
ScancodeC -> toggleCombineInv uv
|
ScancodeC -> toggleCombineInv uv
|
||||||
|
|||||||
Reference in New Issue
Block a user