Cleanup
This commit is contained in:
+1
-110
@@ -1,110 +1 @@
|
|||||||
/home/justin/Haskell/loop/src/Dodge/Item/Info.hs:4:1-37: warning: [-Wunused-imports]
|
All good (611 modules, at 12:49:31)
|
||||||
The qualified import of ‘Data.Map.Strict’ is redundant
|
|
||||||
|
|
|
||||||
4 | import qualified Data.Map.Strict as M
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Item/Info.hs:6:1-24: warning: [-Wunused-imports]
|
|
||||||
The import of ‘Dodge.Module.Info’ is redundant
|
|
||||||
|
|
|
||||||
6 | import Dodge.Module.Info
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Item/Info.hs:8:1-17: warning: [-Wunused-imports]
|
|
||||||
The import of ‘StringHelp’ is redundant
|
|
||||||
|
|
|
||||||
8 | import StringHelp
|
|
||||||
| ^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Data/Item/Combine.hs:12:1-37: warning: [-Wunused-imports]
|
|
||||||
The qualified import of ‘Data.Map.Strict’ is redundant
|
|
||||||
|
|
|
||||||
12 | import qualified Data.Map.Strict as M
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Data/Item/Combine.hs:15:1-38: warning: [-Wunused-imports]
|
|
||||||
The import of ‘Dodge.Data.Item.Use.Consumption’ is redundant
|
|
||||||
|
|
|
||||||
15 | import Dodge.Data.Item.Use.Consumption
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Module/Info.hs:8:1-17: warning: [-Wunused-top-binds]
|
|
||||||
Defined but not used: ‘displayBulletBody’
|
|
||||||
|
|
|
||||||
8 | displayBulletBody be = case be of
|
|
||||||
| ^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Module/Info.hs:14:1-20: warning: [-Wunused-top-binds]
|
|
||||||
Defined but not used: ‘displayBulletPayload’
|
|
||||||
|
|
|
||||||
14 | displayBulletPayload x = case x of
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Module/Info.hs:22:1-21: warning: [-Wunused-top-binds]
|
|
||||||
Defined but not used: ‘displayEnergyBallType’
|
|
||||||
|
|
|
||||||
22 | displayEnergyBallType ebt = case ebt of
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Module/Info.hs:29:1-17: warning: [-Wunused-top-binds]
|
|
||||||
Defined but not used: ‘displayBulletTraj’
|
|
||||||
|
|
|
||||||
29 | displayBulletTraj x = case x of
|
|
||||||
| ^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Module.hs:7:1-37: warning: [-Wunused-imports]
|
|
||||||
The qualified import of ‘Data.Map.Strict’ is redundant
|
|
||||||
|
|
|
||||||
7 | import qualified Data.Map.Strict as M
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Module.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/Module.hs:9:1-24: warning: [-Wunused-imports]
|
|
||||||
The import of ‘Dodge.Module.Info’ is redundant
|
|
||||||
|
|
|
||||||
9 | import Dodge.Module.Info
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Item/SlotsTaken.hs:7:1-19: warning: [-Wunused-imports]
|
|
||||||
The import of ‘Dodge.Module’ is redundant
|
|
||||||
|
|
|
||||||
7 | import Dodge.Module
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Item/Held/BatteryGuns.hs:9:1-37: warning: [-Wunused-imports]
|
|
||||||
The qualified import of ‘Data.Map.Strict’ is redundant
|
|
||||||
|
|
|
||||||
9 | import qualified Data.Map.Strict as M
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Item/Draw/SPic.hs:8:1-37: warning: [-Wunused-imports]
|
|
||||||
The qualified import of ‘Data.Map.Strict’ is redundant
|
|
||||||
|
|
|
||||||
8 | import qualified Data.Map.Strict as M
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Item/Display.hs:16:1-19: warning: [-Wunused-imports]
|
|
||||||
The import of ‘Dodge.Module’ is redundant
|
|
||||||
|
|
|
||||||
16 | import Dodge.Module
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Combine/Module.hs:3:1-20: warning: [-Wunused-imports]
|
|
||||||
The import of ‘Data.Foldable’ is redundant
|
|
||||||
|
|
|
||||||
3 | import Data.Foldable
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Combine/Module.hs:4:1-22: warning: [-Wunused-imports]
|
|
||||||
The import of ‘Dodge.Data.Beam’ is redundant
|
|
||||||
|
|
|
||||||
4 | import Dodge.Data.Beam
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Combine/Module.hs:5:1-22: warning: [-Wunused-imports]
|
|
||||||
The import of ‘Dodge.Data.Item’ is redundant
|
|
||||||
|
|
|
||||||
5 | import Dodge.Data.Item
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Combine/Module.hs:6:1-18: warning: [-Wunused-imports]
|
|
||||||
The import of ‘Dodge.Tesla’ is redundant
|
|
||||||
|
|
|
||||||
6 | import Dodge.Tesla
|
|
||||||
| ^^^^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Combine/Module.hs:7:1-15: warning: [-Wunused-imports]
|
|
||||||
The import of ‘Geometry’ is redundant
|
|
||||||
|
|
|
||||||
7 | import Geometry
|
|
||||||
| ^^^^^^^^^^^^^^^
|
|
||||||
/home/justin/Haskell/loop/src/Dodge/Combine/Module.hs:8:1-15: warning: [-Wunused-imports]
|
|
||||||
The import of ‘LensHelp’ is redundant
|
|
||||||
|
|
|
||||||
8 | import LensHelp
|
|
||||||
| ^^^^^^^^^^^^^^^
|
|
||||||
|
|||||||
+153
-197
@@ -10,94 +10,84 @@ digraph {
|
|||||||
11 [shape=box
|
11 [shape=box
|
||||||
,label="EQUIP {_ibtEquip = FUELPACK}"];
|
,label="EQUIP {_ibtEquip = FUELPACK}"];
|
||||||
15 [shape=box
|
15 [shape=box
|
||||||
,label="EQUIP {_ibtEquip = TARGETINGHAT TARGETLASER}"];
|
|
||||||
16 [shape=box
|
|
||||||
,label="EQUIP {_ibtEquip = HAT}"];
|
|
||||||
19 [shape=box
|
|
||||||
,label="EQUIP {_ibtEquip = TARGETINGHAT TargetRBPress}"];
|
|
||||||
22 [shape=box
|
|
||||||
,label="EQUIP {_ibtEquip = TARGETINGHAT TargetRBLine}"];
|
|
||||||
25 [shape=box
|
|
||||||
,label="EQUIP {_ibtEquip = TARGETINGHAT TargetRBCreature}"];
|
|
||||||
28 [shape=box
|
|
||||||
,label="EQUIP {_ibtEquip = TARGETINGHAT TargetCursor}"];
|
|
||||||
31 [shape=box
|
|
||||||
,label="AMMOMAG {_ibtAmmoMag = TINMAG}"];
|
,label="AMMOMAG {_ibtAmmoMag = TINMAG}"];
|
||||||
35 [shape=box
|
19 [shape=box
|
||||||
,label="HELD {_ibtHeld = BANGSTICK {_xNum = 1}}"];
|
,label="HELD {_ibtHeld = BANGSTICK {_xNum = 1}}"];
|
||||||
39 [shape=box
|
23 [shape=box
|
||||||
,label="HELD {_ibtHeld = PISTOL}"];
|
,label="HELD {_ibtHeld = PISTOL}"];
|
||||||
41 [shape=box
|
25 [shape=box
|
||||||
,label="HELD {_ibtHeld = AUTOPISTOL}"];
|
,label="HELD {_ibtHeld = AUTOPISTOL}"];
|
||||||
43 [shape=box
|
27 [shape=box
|
||||||
,label="HELD {_ibtHeld = SMG}"];
|
,label="HELD {_ibtHeld = SMG}"];
|
||||||
46 [shape=box
|
30 [shape=box
|
||||||
,label="HELD {_ibtHeld = MACHINEPISTOL}"];
|
,label="HELD {_ibtHeld = MACHINEPISTOL}"];
|
||||||
48 [shape=box
|
32 [shape=box
|
||||||
,label="HELD {_ibtHeld = BANGCONE}"];
|
,label="HELD {_ibtHeld = BANGCONE}"];
|
||||||
51 [shape=box
|
35 [shape=box
|
||||||
,label="HELD {_ibtHeld = BLUNDERBUSS}"];
|
,label="HELD {_ibtHeld = BLUNDERBUSS}"];
|
||||||
53 [shape=box
|
37 [shape=box
|
||||||
,label="HELD {_ibtHeld = GRAPECANNON {_xNum = 1}}"];
|
,label="HELD {_ibtHeld = GRAPECANNON {_xNum = 1}}"];
|
||||||
55 [shape=box
|
39 [shape=box
|
||||||
,label="HELD {_ibtHeld = RIFLE}"];
|
,label="HELD {_ibtHeld = RIFLE}"];
|
||||||
57 [shape=box
|
41 [shape=box
|
||||||
,label="HELD {_ibtHeld = VOLLEYGUN {_xNum = 3}}"];
|
,label="HELD {_ibtHeld = VOLLEYGUN {_xNum = 3}}"];
|
||||||
59 [shape=box
|
43 [shape=box
|
||||||
,label="HELD {_ibtHeld = AUTORIFLE}"];
|
,label="HELD {_ibtHeld = AUTORIFLE}"];
|
||||||
61 [shape=box
|
45 [shape=box
|
||||||
,label="HELD {_ibtHeld = BURSTRIFLE}"];
|
,label="HELD {_ibtHeld = BURSTRIFLE}"];
|
||||||
63 [shape=box
|
47 [shape=box
|
||||||
,label="HELD {_ibtHeld = MINIGUNX {_xNum = 3}}"];
|
,label="HELD {_ibtHeld = MINIGUNX {_xNum = 3}}"];
|
||||||
66 [shape=box
|
50 [shape=box
|
||||||
,label="HELD {_ibtHeld = SNIPERRIFLE}"];
|
,label="HELD {_ibtHeld = SNIPERRIFLE}"];
|
||||||
67 [shape=box
|
51 [shape=box
|
||||||
,label="HELD {_ibtHeld = AMR}"];
|
,label="HELD {_ibtHeld = AMR}"];
|
||||||
70 [shape=box
|
54 [shape=box
|
||||||
,label="HELD {_ibtHeld = AUTOAMR}"];
|
,label="HELD {_ibtHeld = AUTOAMR}"];
|
||||||
72 [shape=box
|
56 [shape=box
|
||||||
,label="HELD {_ibtHeld = LAUNCHER}"];
|
,label="HELD {_ibtHeld = LAUNCHER}"];
|
||||||
75 [shape=box
|
59 [shape=box
|
||||||
,label="HELD {_ibtHeld = LAUNCHERX {_xNum = 2}}"];
|
,label="HELD {_ibtHeld = LAUNCHERX {_xNum = 2}}"];
|
||||||
79 [shape=box
|
63 [shape=box
|
||||||
,label="HELD {_ibtHeld = FLAMESPITTER}"];
|
,label="HELD {_ibtHeld = FLAMESPITTER}"];
|
||||||
83 [shape=box
|
67 [shape=box
|
||||||
,label="HELD {_ibtHeld = BLOWTORCH}"];
|
,label="HELD {_ibtHeld = BLOWTORCH}"];
|
||||||
85 [shape=box
|
69 [shape=box
|
||||||
,label="HELD {_ibtHeld = FLAMETHROWER}"];
|
,label="HELD {_ibtHeld = FLAMETHROWER}"];
|
||||||
87 [shape=box
|
71 [shape=box
|
||||||
,label="HELD {_ibtHeld = FLAMEWALL}"];
|
,label="HELD {_ibtHeld = FLAMEWALL}"];
|
||||||
89 [shape=box
|
73 [shape=box
|
||||||
,label="HELD {_ibtHeld = FLAMETORRENT}"];
|
,label="HELD {_ibtHeld = FLAMETORRENT}"];
|
||||||
91 [shape=box
|
75 [shape=box
|
||||||
,label="HELD {_ibtHeld = LASGUN}"];
|
,label="HELD {_ibtHeld = LASGUN}"];
|
||||||
95 [shape=box
|
79 [shape=box
|
||||||
,label="HELD {_ibtHeld = SPARKGUN}"];
|
,label="HELD {_ibtHeld = SPARKGUN}"];
|
||||||
97 [shape=box
|
81 [shape=box
|
||||||
,label="HELD {_ibtHeld = TESLAGUN}"];
|
,label="HELD {_ibtHeld = TESLAGUN}"];
|
||||||
99 [shape=box
|
83 [shape=box
|
||||||
,label="LEFT {_ibtLeft = BLINKER}"];
|
,label="LEFT {_ibtLeft = BLINKER}"];
|
||||||
102 [shape=box
|
86 [shape=box
|
||||||
,label="LEFT {_ibtLeft = BLINKERUNSAFE}"];
|
,label="LEFT {_ibtLeft = BLINKERUNSAFE}"];
|
||||||
104 [shape=box
|
88 [shape=box
|
||||||
,label="EQUIP {_ibtEquip = MAGSHIELD}"];
|
,label="EQUIP {_ibtEquip = MAGSHIELD}"];
|
||||||
107 [shape=box
|
91 [shape=box
|
||||||
,label="EQUIP {_ibtEquip = POWERLEGS}"];
|
,label="EQUIP {_ibtEquip = POWERLEGS}"];
|
||||||
113 [shape=box
|
97 [shape=box
|
||||||
,label="HELD {_ibtHeld = FLATSHIELD}"];
|
,label="HELD {_ibtHeld = FLATSHIELD}"];
|
||||||
123 [shape=box
|
107 [shape=box
|
||||||
,label="EQUIP {_ibtEquip = AUTODETECTOR ITEMDETECTOR}"];
|
,label="EQUIP {_ibtEquip = AUTODETECTOR ITEMDETECTOR}"];
|
||||||
126 [shape=box
|
110 [shape=box
|
||||||
,label="EQUIP {_ibtEquip = AUTODETECTOR WALLDETECTOR}"];
|
,label="EQUIP {_ibtEquip = AUTODETECTOR WALLDETECTOR}"];
|
||||||
128 [shape=box
|
112 [shape=box
|
||||||
,label="EQUIP {_ibtEquip = AUTODETECTOR CREATUREDETECTOR}"];
|
,label="EQUIP {_ibtEquip = AUTODETECTOR CREATUREDETECTOR}"];
|
||||||
130 [shape=box
|
114 [shape=box
|
||||||
,label="HELD {_ibtHeld = TORCH}"];
|
,label="HELD {_ibtHeld = TORCH}"];
|
||||||
131 [shape=box
|
115 [shape=box
|
||||||
,label="AMMOMAG {_ibtAmmoMag = BATTERY}"];
|
,label="AMMOMAG {_ibtAmmoMag = BATTERY}"];
|
||||||
134 [shape=box
|
118 [shape=box
|
||||||
,label="EQUIP {_ibtEquip = HEADLAMP}"];
|
,label="EQUIP {_ibtEquip = HEADLAMP}"];
|
||||||
140 [shape=box
|
119 [shape=box
|
||||||
|
,label="EQUIP {_ibtEquip = HAT}"];
|
||||||
|
121 [shape=box
|
||||||
,label="HELD {_ibtHeld = BANGSTICK {_xNum = 2}}"];
|
,label="HELD {_ibtHeld = BANGSTICK {_xNum = 2}}"];
|
||||||
}
|
}
|
||||||
subgraph 2 {
|
subgraph 2 {
|
||||||
@@ -107,60 +97,53 @@ digraph {
|
|||||||
10 [shape=point];
|
10 [shape=point];
|
||||||
14 [shape=point];
|
14 [shape=point];
|
||||||
18 [shape=point];
|
18 [shape=point];
|
||||||
21 [shape=point];
|
22 [shape=point];
|
||||||
24 [shape=point];
|
24 [shape=point];
|
||||||
27 [shape=point];
|
26 [shape=point];
|
||||||
30 [shape=point];
|
29 [shape=point];
|
||||||
|
31 [shape=point];
|
||||||
34 [shape=point];
|
34 [shape=point];
|
||||||
|
36 [shape=point];
|
||||||
38 [shape=point];
|
38 [shape=point];
|
||||||
40 [shape=point];
|
40 [shape=point];
|
||||||
42 [shape=point];
|
42 [shape=point];
|
||||||
45 [shape=point];
|
44 [shape=point];
|
||||||
47 [shape=point];
|
46 [shape=point];
|
||||||
50 [shape=point];
|
49 [shape=point];
|
||||||
52 [shape=point];
|
52 [shape=point];
|
||||||
54 [shape=point];
|
53 [shape=point];
|
||||||
56 [shape=point];
|
55 [shape=point];
|
||||||
58 [shape=point];
|
58 [shape=point];
|
||||||
60 [shape=point];
|
60 [shape=point];
|
||||||
62 [shape=point];
|
62 [shape=point];
|
||||||
65 [shape=point];
|
66 [shape=point];
|
||||||
68 [shape=point];
|
68 [shape=point];
|
||||||
69 [shape=point];
|
70 [shape=point];
|
||||||
71 [shape=point];
|
72 [shape=point];
|
||||||
74 [shape=point];
|
74 [shape=point];
|
||||||
76 [shape=point];
|
|
||||||
78 [shape=point];
|
78 [shape=point];
|
||||||
|
80 [shape=point];
|
||||||
82 [shape=point];
|
82 [shape=point];
|
||||||
84 [shape=point];
|
85 [shape=point];
|
||||||
86 [shape=point];
|
87 [shape=point];
|
||||||
88 [shape=point];
|
|
||||||
90 [shape=point];
|
90 [shape=point];
|
||||||
|
93 [shape=point];
|
||||||
94 [shape=point];
|
94 [shape=point];
|
||||||
|
95 [shape=point];
|
||||||
96 [shape=point];
|
96 [shape=point];
|
||||||
98 [shape=point];
|
98 [shape=point];
|
||||||
101 [shape=point];
|
100 [shape=point];
|
||||||
103 [shape=point];
|
103 [shape=point];
|
||||||
106 [shape=point];
|
106 [shape=point];
|
||||||
109 [shape=point];
|
109 [shape=point];
|
||||||
110 [shape=point];
|
|
||||||
111 [shape=point];
|
111 [shape=point];
|
||||||
112 [shape=point];
|
113 [shape=point];
|
||||||
114 [shape=point];
|
117 [shape=point];
|
||||||
116 [shape=point];
|
120 [shape=point];
|
||||||
119 [shape=point];
|
|
||||||
122 [shape=point];
|
122 [shape=point];
|
||||||
125 [shape=point];
|
124 [shape=point];
|
||||||
127 [shape=point];
|
126 [shape=point];
|
||||||
129 [shape=point];
|
128 [shape=point];
|
||||||
133 [shape=point];
|
|
||||||
135 [shape=point];
|
|
||||||
137 [shape=point];
|
|
||||||
139 [shape=point];
|
|
||||||
141 [shape=point];
|
|
||||||
143 [shape=point];
|
|
||||||
145 [shape=point];
|
|
||||||
147 [shape=point];
|
|
||||||
}
|
}
|
||||||
0 -> 1 [xlabel="",tailport=e];
|
0 -> 1 [xlabel="",tailport=e];
|
||||||
2 -> 0 [xlabel=1
|
2 -> 0 [xlabel=1
|
||||||
@@ -173,176 +156,149 @@ digraph {
|
|||||||
8 -> 1 [xlabel="",tailport=e];
|
8 -> 1 [xlabel="",tailport=e];
|
||||||
10 -> 11 [xlabel="",tailport=e];
|
10 -> 11 [xlabel="",tailport=e];
|
||||||
14 -> 15 [xlabel="",tailport=e];
|
14 -> 15 [xlabel="",tailport=e];
|
||||||
16 -> 14 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
16 -> 18 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
16 -> 21 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
16 -> 24 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
16 -> 27 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
16 -> 133 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
18 -> 19 [xlabel="",tailport=e];
|
18 -> 19 [xlabel="",tailport=e];
|
||||||
21 -> 22 [xlabel="",tailport=e];
|
19 -> 22 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
19 -> 38 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
19 -> 40 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
19 -> 40 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
19 -> 40 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
19 -> 120 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
19 -> 124 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
19 -> 126 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
22 -> 23 [xlabel="",tailport=e];
|
||||||
|
23 -> 24 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
24 -> 25 [xlabel="",tailport=e];
|
24 -> 25 [xlabel="",tailport=e];
|
||||||
27 -> 28 [xlabel="",tailport=e];
|
25 -> 26 [xlabel=1
|
||||||
30 -> 31 [xlabel="",tailport=e];
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
25 -> 29 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
26 -> 27 [xlabel="",tailport=e];
|
||||||
|
29 -> 30 [xlabel="",tailport=e];
|
||||||
|
31 -> 32 [xlabel="",tailport=e];
|
||||||
|
32 -> 34 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
34 -> 35 [xlabel="",tailport=e];
|
34 -> 35 [xlabel="",tailport=e];
|
||||||
35 -> 38 [xlabel=1
|
35 -> 36 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
35 -> 54 [xlabel=1
|
36 -> 37 [xlabel="",tailport=e];
|
||||||
,arrowhead=onone
|
37 -> 128 [xlabel=1
|
||||||
,headport=w];
|
|
||||||
35 -> 56 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
35 -> 56 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
35 -> 56 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
35 -> 139 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
35 -> 143 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
35 -> 145 [xlabel=1
|
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
38 -> 39 [xlabel="",tailport=e];
|
38 -> 39 [xlabel="",tailport=e];
|
||||||
39 -> 40 [xlabel=1
|
39 -> 42 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
39 -> 44 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
|
39 -> 52 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
40 -> 41 [xlabel="",tailport=e];
|
40 -> 41 [xlabel="",tailport=e];
|
||||||
41 -> 42 [xlabel=1
|
41 -> 46 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
41 -> 45 [xlabel=1
|
41 -> 124 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
42 -> 43 [xlabel="",tailport=e];
|
42 -> 43 [xlabel="",tailport=e];
|
||||||
45 -> 46 [xlabel="",tailport=e];
|
44 -> 45 [xlabel="",tailport=e];
|
||||||
47 -> 48 [xlabel="",tailport=e];
|
46 -> 47 [xlabel="",tailport=e];
|
||||||
48 -> 50 [xlabel=1
|
47 -> 126 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
50 -> 51 [xlabel="",tailport=e];
|
49 -> 50 [xlabel="",tailport=e];
|
||||||
51 -> 52 [xlabel=1
|
51 -> 49 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
52 -> 53 [xlabel="",tailport=e];
|
51 -> 53 [xlabel=1
|
||||||
53 -> 147 [xlabel=1
|
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
54 -> 55 [xlabel="",tailport=e];
|
52 -> 51 [xlabel="",tailport=e];
|
||||||
55 -> 58 [xlabel=1
|
53 -> 54 [xlabel="",tailport=e];
|
||||||
,arrowhead=onone
|
55 -> 56 [xlabel="",tailport=e];
|
||||||
,headport=w];
|
56 -> 58 [xlabel=1
|
||||||
55 -> 60 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
55 -> 68 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
56 -> 57 [xlabel="",tailport=e];
|
|
||||||
57 -> 62 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
57 -> 143 [xlabel=1
|
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
58 -> 59 [xlabel="",tailport=e];
|
58 -> 59 [xlabel="",tailport=e];
|
||||||
60 -> 61 [xlabel="",tailport=e];
|
59 -> 60 [xlabel=1
|
||||||
|
,arrowhead=onone
|
||||||
|
,headport=w];
|
||||||
62 -> 63 [xlabel="",tailport=e];
|
62 -> 63 [xlabel="",tailport=e];
|
||||||
63 -> 145 [xlabel=1
|
63 -> 66 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
65 -> 66 [xlabel="",tailport=e];
|
63 -> 68 [xlabel=1
|
||||||
67 -> 65 [xlabel=1
|
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
67 -> 69 [xlabel=1
|
66 -> 67 [xlabel="",tailport=e];
|
||||||
|
68 -> 69 [xlabel="",tailport=e];
|
||||||
|
69 -> 70 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
68 -> 67 [xlabel="",tailport=e];
|
69 -> 72 [xlabel=1
|
||||||
69 -> 70 [xlabel="",tailport=e];
|
|
||||||
71 -> 72 [xlabel="",tailport=e];
|
|
||||||
72 -> 74 [xlabel=1
|
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
|
70 -> 71 [xlabel="",tailport=e];
|
||||||
|
72 -> 73 [xlabel="",tailport=e];
|
||||||
74 -> 75 [xlabel="",tailport=e];
|
74 -> 75 [xlabel="",tailport=e];
|
||||||
75 -> 76 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
78 -> 79 [xlabel="",tailport=e];
|
78 -> 79 [xlabel="",tailport=e];
|
||||||
79 -> 82 [xlabel=1
|
79 -> 80 [xlabel=1
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
79 -> 84 [xlabel=1
|
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
|
80 -> 81 [xlabel="",tailport=e];
|
||||||
82 -> 83 [xlabel="",tailport=e];
|
82 -> 83 [xlabel="",tailport=e];
|
||||||
84 -> 85 [xlabel="",tailport=e];
|
83 -> 85 [xlabel=1
|
||||||
85 -> 86 [xlabel=1
|
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
85 -> 88 [xlabel=1
|
85 -> 86 [xlabel="",tailport=e];
|
||||||
,arrowhead=onone
|
87 -> 88 [xlabel="",tailport=e];
|
||||||
,headport=w];
|
|
||||||
86 -> 87 [xlabel="",tailport=e];
|
|
||||||
88 -> 89 [xlabel="",tailport=e];
|
|
||||||
90 -> 91 [xlabel="",tailport=e];
|
90 -> 91 [xlabel="",tailport=e];
|
||||||
94 -> 95 [xlabel="",tailport=e];
|
|
||||||
95 -> 96 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
96 -> 97 [xlabel="",tailport=e];
|
96 -> 97 [xlabel="",tailport=e];
|
||||||
98 -> 99 [xlabel="",tailport=e];
|
|
||||||
99 -> 101 [xlabel=1
|
|
||||||
,arrowhead=onone
|
|
||||||
,headport=w];
|
|
||||||
101 -> 102 [xlabel=""
|
|
||||||
,tailport=e];
|
|
||||||
103 -> 104 [xlabel=""
|
|
||||||
,tailport=e];
|
|
||||||
106 -> 107 [xlabel=""
|
106 -> 107 [xlabel=""
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
112 -> 113 [xlabel=""
|
109 -> 110 [xlabel=""
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
122 -> 123 [xlabel=""
|
111 -> 112 [xlabel=""
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
125 -> 126 [xlabel=""
|
113 -> 114 [xlabel=""
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
127 -> 128 [xlabel=""
|
114 -> 117 [xlabel=1
|
||||||
,tailport=e];
|
|
||||||
129 -> 130 [xlabel=""
|
|
||||||
,tailport=e];
|
|
||||||
130 -> 133 [xlabel=1
|
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
131 -> 129 [xlabel=1
|
115 -> 113 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
131 -> 137 [xlabel=1
|
117 -> 118 [xlabel=""
|
||||||
|
,tailport=e];
|
||||||
|
119 -> 117 [xlabel=1
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
133 -> 134 [xlabel=""
|
120 -> 121 [xlabel=""
|
||||||
,tailport=e];
|
,tailport=e];
|
||||||
139 -> 140 [xlabel=""
|
121 -> 122 [xlabel=1
|
||||||
,tailport=e];
|
|
||||||
140 -> 141 [xlabel=1
|
|
||||||
,arrowhead=onone
|
,arrowhead=onone
|
||||||
,headport=w];
|
,headport=w];
|
||||||
}
|
}
|
||||||
@@ -91,7 +91,7 @@ ELECautoRect-6
|
|||||||
| | |
|
| | |
|
||||||
| | autoDoor-45
|
| | autoDoor-45
|
||||||
| | |
|
| | |
|
||||||
| | autoRect-46
|
| | rect-46
|
||||||
| | |
|
| | |
|
||||||
| | +- autoDoor-47
|
| | +- autoDoor-47
|
||||||
| | | |
|
| | | |
|
||||||
@@ -127,17 +127,19 @@ ELECautoRect-6
|
|||||||
| | | |
|
| | | |
|
||||||
| | | defaultRoom-63
|
| | | defaultRoom-63
|
||||||
| | |
|
| | |
|
||||||
| | autoDoor-64
|
| | Corridor-64
|
||||||
|
| | |
|
||||||
|
| | autoDoor-65
|
||||||
| |
|
| |
|
||||||
| autoDoor-65
|
| autoDoor-66
|
||||||
| |
|
| |
|
||||||
| Corridor-66
|
| Corridor-67
|
||||||
| |
|
| |
|
||||||
| autoRect-67
|
| autoRect-68
|
||||||
|
|
|
|
||||||
autoDoor-68
|
autoDoor-69
|
||||||
|
|
|
|
||||||
Corridor-69
|
Corridor-70
|
||||||
|
|
|
|
||||||
autoRect-70
|
autoRect-71
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
Generating level with seed 7114951007332849727
|
Generating level with seed 7114951007332849727
|
||||||
|
|
||||||
After 1 attempt(s), Successful generation of level with seed 7114951007332849727
|
After 1 attempt(s), Successful generation of level with seed 7114951007332849727
|
||||||
71 rooms in total
|
72 rooms in total
|
||||||
|
|||||||
+9
-7
@@ -35,7 +35,7 @@ Seed: 7114951007332849727
|
|||||||
|
|
|
|
||||||
17:corDoor
|
17:corDoor
|
||||||
|
|
|
|
||||||
18:PassthroughLockKeyLists-HELD {_ibtHeld = MINIGUNX {_xNum = 3}}
|
18:PassthroughLockKeyLists-HELD {_ibtHeld = SNIPERRIFLE}
|
||||||
|
|
|
|
||||||
19:corDoor
|
19:corDoor
|
||||||
|
|
|
|
||||||
@@ -203,23 +203,25 @@ Seed: 7114951007332849727
|
|||||||
|
|
|
|
||||||
17:0:1:Corridor
|
17:0:1:Corridor
|
||||||
|
|
||||||
18:0:PassthroughLockKeyLists-HELD {_ibtHeld = MINIGUNX {_xNum = 3}}
|
18:0:PassthroughLockKeyLists-HELD {_ibtHeld = SNIPERRIFLE}
|
||||||
|
|
||||||
18:0:0:RassThroughLockKeyLists
|
18:0:0:RassThroughLockKeyLists
|
||||||
|
|
|
|
||||||
18:0:1:roomsContaining chaseCritchaseCritchaseCritMOTORHARDWAREPIPEPIPEPIPEPIPEPIPEPIPE
|
18:0:1:roomsContaining chaseCritchaseCritSNIPERRIFLE
|
||||||
|
|
||||||
18:0:0:0:slowDoorRoomRunPast
|
18:0:0:0:longRoomRunPast
|
||||||
|
|
||||||
18:0:0:0:0:autoDoor
|
18:0:0:0:0:autoDoor
|
||||||
|
|
|
|
||||||
18:0:0:0:1:autoRect
|
18:0:0:0:1:rect
|
||||||
|
|
|
|
||||||
+- 18:0:0:0:2:autoDoor
|
+- 18:0:0:0:2:autoDoor
|
||||||
|
|
|
|
||||||
18:0:0:0:3:autoDoor
|
18:0:0:0:3:Corridor
|
||||||
|
|
|
||||||
|
18:0:0:0:4:autoDoor
|
||||||
|
|
||||||
18:0:1:0:autoRect
|
18:0:1:0:rectPillars
|
||||||
|
|
||||||
19:0:corDoor
|
19:0:corDoor
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -17,8 +17,8 @@ data Annotation
|
|||||||
| AnRoom (State StdGen Room)
|
| AnRoom (State StdGen Room)
|
||||||
| AnTree (State StdGen (MetaTree Room String))
|
| AnTree (State StdGen (MetaTree Room String))
|
||||||
| PassthroughLockKeyLists
|
| PassthroughLockKeyLists
|
||||||
[(Int -> State StdGen (MetaTree Room String), State StdGen ItemBaseType)]
|
[(Int -> State StdGen (MetaTree Room String), State StdGen ItemType)]
|
||||||
[(ItemBaseType, State StdGen (MetaTree Room String))]
|
[(ItemType, State StdGen (MetaTree Room String))]
|
||||||
Int
|
Int
|
||||||
|
|
||||||
makeLenses ''Annotation
|
makeLenses ''Annotation
|
||||||
|
|||||||
+4
-10
@@ -3,32 +3,26 @@ module Dodge.Combine (
|
|||||||
combineList,
|
combineList,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
--import Control.Lens
|
|
||||||
--import Control.Monad
|
|
||||||
import Data.Bifunctor
|
import Data.Bifunctor
|
||||||
--import qualified Data.IntSet as IS
|
|
||||||
import Data.List (sortOn)
|
import Data.List (sortOn)
|
||||||
--import Data.Map.Merge.Strict
|
|
||||||
import qualified Data.Map.Strict as M
|
import qualified Data.Map.Strict as M
|
||||||
--import Data.Maybe
|
|
||||||
import Dodge.Base.You
|
import Dodge.Base.You
|
||||||
import Dodge.Combine.Trie
|
import Dodge.Combine.Trie
|
||||||
import Dodge.Data.Combine
|
import Dodge.Data.Combine
|
||||||
import Dodge.Data.Universe
|
import Dodge.Data.Universe
|
||||||
import Dodge.Item.Display
|
import Dodge.Item.Display
|
||||||
import Dodge.Item.InventoryColor
|
import Dodge.Item.InventoryColor
|
||||||
import Dodge.Item.SlotsTaken
|
|
||||||
--import Dodge.Module
|
--import Dodge.Module
|
||||||
import qualified IntMapHelp as IM
|
import qualified IntMapHelp as IM
|
||||||
import SimpleTrie
|
import SimpleTrie
|
||||||
|
|
||||||
invertInventoryToMap :: IM.IntMap Item -> M.Map ItemBaseType [Int]
|
invertInventoryToMap :: IM.IntMap Item -> M.Map ItemType [Int]
|
||||||
invertInventoryToMap =
|
invertInventoryToMap =
|
||||||
IM.foldrWithKey
|
IM.foldrWithKey
|
||||||
(\k it -> M.insertWith (++) (_iyBase $ _itType it) [k])
|
(\k it -> M.insertWith (++) (_itType it) [k])
|
||||||
mempty
|
mempty
|
||||||
|
|
||||||
groupSplitItemAmounts :: M.Map ItemBaseType [Int] -> [((ItAmount, ItemBaseType), [Int])]
|
groupSplitItemAmounts :: M.Map ItemType [Int] -> [((ItAmount, ItemType), [Int])]
|
||||||
groupSplitItemAmounts = M.foldrWithKey f []
|
groupSplitItemAmounts = M.foldrWithKey f []
|
||||||
where
|
where
|
||||||
f ibt is = (++) [((fromIntegral i, ibt), take i is) | i <- [1 .. length is]]
|
f ibt is = (++) [((fromIntegral i, ibt), take i is) | i <- [1 .. length is]]
|
||||||
@@ -47,7 +41,7 @@ combineList = map f . combineListInfo
|
|||||||
f (is, (strs, itm)) =
|
f (is, (strs, itm)) =
|
||||||
SelectionItem
|
SelectionItem
|
||||||
{ _siPictures = basicItemDisplay itm
|
{ _siPictures = basicItemDisplay itm
|
||||||
, _siHeight = itSlotsTaken itm
|
, _siHeight = _itInvSize itm
|
||||||
, _siIsSelectable = True
|
, _siIsSelectable = True
|
||||||
, _siColor = itemInvColor itm
|
, _siColor = itemInvColor itm
|
||||||
, _siOffX = 0
|
, _siOffX = 0
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import Dodge.Data.Item
|
|||||||
import Dodge.Item
|
import Dodge.Item
|
||||||
import LensHelp
|
import LensHelp
|
||||||
|
|
||||||
watchCombinations :: [([(ItAmount, ItemBaseType)], Item)]
|
watchCombinations :: [([(ItAmount, ItemType)], Item)]
|
||||||
watchCombinations =
|
watchCombinations =
|
||||||
[ po [LEFT STOPWATCH, LEFT REWINDWATCH] scrollWatch
|
[ po [LEFT STOPWATCH, LEFT REWINDWATCH] scrollWatch
|
||||||
, po [CRAFT TIMEMODULE, CRAFT MICROCHIP, CRAFT HARDDRIVE] scrollWatch
|
, po [CRAFT TIMEMODULE, CRAFT MICROCHIP, CRAFT HARDDRIVE] scrollWatch
|
||||||
@@ -22,7 +22,7 @@ watchCombinations =
|
|||||||
po xs it = (map o xs, it)
|
po xs it = (map o xs, it)
|
||||||
o = (1,)
|
o = (1,)
|
||||||
|
|
||||||
backpackCombinations :: [([(ItAmount,ItemBaseType)],Item)]
|
backpackCombinations :: [([(ItAmount,ItemType)],Item)]
|
||||||
backpackCombinations =
|
backpackCombinations =
|
||||||
[ po [CRAFT HOSE, CRAFT STEELDRUM] fuelPack
|
[ po [CRAFT HOSE, CRAFT STEELDRUM] fuelPack
|
||||||
]
|
]
|
||||||
@@ -38,7 +38,7 @@ backpackCombinations =
|
|||||||
-- po xs it = (map o xs, it)
|
-- po xs it = (map o xs, it)
|
||||||
-- o = (1,)
|
-- o = (1,)
|
||||||
|
|
||||||
magazineCombinations :: [([(ItAmount,ItemBaseType)],Item)]
|
magazineCombinations :: [([(ItAmount,ItemType)],Item)]
|
||||||
magazineCombinations =
|
magazineCombinations =
|
||||||
[ po [CRAFT TIN, CRAFT SPRING] tinMag
|
[ po [CRAFT TIN, CRAFT SPRING] tinMag
|
||||||
]
|
]
|
||||||
@@ -46,12 +46,12 @@ magazineCombinations =
|
|||||||
po xs it = (map o xs, it)
|
po xs it = (map o xs, it)
|
||||||
o = (1,)
|
o = (1,)
|
||||||
|
|
||||||
flatItemCombinations :: [([ItemBaseType], Item)]
|
flatItemCombinations :: [([ItemType], Item)]
|
||||||
flatItemCombinations = map (over _1 (concatMap f)) itemCombinations
|
flatItemCombinations = map (over _1 (concatMap f)) itemCombinations
|
||||||
where
|
where
|
||||||
f (x,it) = replicate (_getItAmount x) it
|
f (x,it) = replicate (_getItAmount x) it
|
||||||
|
|
||||||
itemCombinations :: [([(ItAmount, ItemBaseType)], Item)]
|
itemCombinations :: [([(ItAmount, ItemType)], Item)]
|
||||||
itemCombinations =
|
itemCombinations =
|
||||||
watchCombinations ++
|
watchCombinations ++
|
||||||
backpackCombinations ++
|
backpackCombinations ++
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
--{-# LANGUAGE TypeSynonymInstances #-}
|
{-# LANGUAGE LambdaCase #-}
|
||||||
--{-# LANGUAGE FlexibleInstances #-}
|
|
||||||
module Dodge.Combine.Graph where
|
module Dodge.Combine.Graph where
|
||||||
import Dodge.Data.Item
|
import Dodge.Data.Item
|
||||||
import Dodge.Combine.Combinations
|
import Dodge.Combine.Combinations
|
||||||
@@ -19,7 +18,7 @@ data CombClust
|
|||||||
| JoinClust
|
| JoinClust
|
||||||
deriving (Eq,Ord,Show,Enum,Bounded)
|
deriving (Eq,Ord,Show,Enum,Bounded)
|
||||||
|
|
||||||
newtype CombNode = CombNode {_unCombNode :: Either ItemBaseType [(ItAmount,ItemBaseType)]}
|
newtype CombNode = CombNode {_unCombNode :: Either ItemType [(ItAmount,ItemType)]}
|
||||||
deriving (Eq,Ord,Show)
|
deriving (Eq,Ord,Show)
|
||||||
|
|
||||||
instance Labellable CombNode where
|
instance Labellable CombNode where
|
||||||
@@ -32,17 +31,17 @@ instance Labellable CombEdge where
|
|||||||
toLabelValue (CombEdge 0) = StrLabel (pack "")
|
toLabelValue (CombEdge 0) = StrLabel (pack "")
|
||||||
toLabelValue (CombEdge x) = StrLabel (pack $ show x)
|
toLabelValue (CombEdge x) = StrLabel (pack $ show x)
|
||||||
|
|
||||||
bulletCombinations :: [([(ItAmount,ItemBaseType)],Item)]
|
bulletCombinations :: [([(ItAmount,ItemType)],Item)]
|
||||||
bulletCombinations = filter
|
bulletCombinations = filter
|
||||||
( (`elem` map totype bulletWeapons)
|
( (`elem` map totype bulletWeapons)
|
||||||
. totype
|
. totype
|
||||||
. snd
|
. snd
|
||||||
) itemCombinations
|
) itemCombinations
|
||||||
where
|
where
|
||||||
totype = _iyBase . _itType
|
totype = _itType
|
||||||
|
|
||||||
maxShowX :: ItemBaseType -> Maybe Int
|
maxShowX :: ItemType -> Maybe Int
|
||||||
maxShowX bt = case bt of
|
maxShowX = \case
|
||||||
HELD (BANGSTICK _) -> Just 2
|
HELD (BANGSTICK _) -> Just 2
|
||||||
HELD (VOLLEYGUN _) -> Just 3
|
HELD (VOLLEYGUN _) -> Just 3
|
||||||
HELD (MINIGUNX _) -> Just 3
|
HELD (MINIGUNX _) -> Just 3
|
||||||
@@ -53,7 +52,7 @@ maxShowX bt = case bt of
|
|||||||
_ -> Nothing
|
_ -> Nothing
|
||||||
|
|
||||||
itemCombinationsEdges :: [(CombNode,CombNode,Int)]
|
itemCombinationsEdges :: [(CombNode,CombNode,Int)]
|
||||||
itemCombinationsEdges = concatMap (f . over _2 (_iyBase . _itType)) itemCombinations
|
itemCombinationsEdges = concatMap (f . over _2 (_itType)) itemCombinations
|
||||||
--itemCombinationsEdges = concatMap (f . over _2 (_iyBase . _itType)) bulletCombinations
|
--itemCombinationsEdges = concatMap (f . over _2 (_iyBase . _itType)) bulletCombinations
|
||||||
where
|
where
|
||||||
f (abts,bt)
|
f (abts,bt)
|
||||||
@@ -74,7 +73,7 @@ combinationsGraph = FGL.labnfilter (f . _unCombNode . snd)
|
|||||||
Nothing -> True
|
Nothing -> True
|
||||||
Just i -> _xNum (_ibtHeld bt) <= i
|
Just i -> _xNum (_ibtHeld bt) <= i
|
||||||
|
|
||||||
belowNumX :: ItemBaseType -> Bool
|
belowNumX :: ItemType -> Bool
|
||||||
belowNumX bt = case maxShowX bt of
|
belowNumX bt = case maxShowX bt of
|
||||||
Nothing -> True
|
Nothing -> True
|
||||||
Just i -> _xNum (_ibtHeld bt) <= i
|
Just i -> _xNum (_ibtHeld bt) <= i
|
||||||
|
|||||||
@@ -1,53 +0,0 @@
|
|||||||
module Dodge.Combine.Module where
|
|
||||||
|
|
||||||
import Data.Foldable
|
|
||||||
import Dodge.Data.Beam
|
|
||||||
import Dodge.Data.Item
|
|
||||||
import Dodge.Tesla
|
|
||||||
import Geometry
|
|
||||||
import LensHelp
|
|
||||||
|
|
||||||
--moduleModification :: ItemModuleType -> Item -> Item
|
|
||||||
--moduleModification imt = case imt of
|
|
||||||
-- EMPTYMODULE -> id
|
|
||||||
---- BELTMAG -> itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 150
|
|
||||||
-- MAGNETMAG -> itUse . heldDelay . rateMax .~ 4
|
|
||||||
-- BULPAY BulFlak -> (itUse . amagParams . ampBullet . buPayload .~ BulFlak)
|
|
||||||
-- . (itUse . amagParams . ampBullet . buTimer .~ 3)
|
|
||||||
-- BULPAY thepayload -> itUse . amagParams . ampBullet . buPayload .~ thepayload
|
|
||||||
-- BULBODY thebody -> itUse . amagParams . ampBullet . buEffect .~ thebody
|
|
||||||
-- TARGET {} -> id -- itUse . useTargeting ?~ t
|
|
||||||
-- BULTRAJ BasicBulletTrajectoryType -> id
|
|
||||||
-- BULTRAJ MagnetTrajectoryType ->
|
|
||||||
-- (itUse . amagParams . ampBullet . buTrajectory .~ MagnetTrajectory 0)
|
|
||||||
-- . (itUse . amagParams . ampBullet . buVel .~ V2 10 0)
|
|
||||||
-- BULTRAJ FlechetteTrajectoryType ->
|
|
||||||
-- itUse . amagParams . ampBullet . buTrajectory .~ FlechetteTrajectory 0
|
|
||||||
-- BULTRAJ BezierTrajectoryType ->
|
|
||||||
-- itUse . amagParams . ampBullet . buTrajectory .~ BezierTrajectory 0 0 0
|
|
||||||
-- INCENDLAS -> itParams . lasBeam .~ BeamCombine FlameBeamCombine
|
|
||||||
-- SPLITLAS -> itParams . lasBeam .~ BeamCombine SplitBeamCombine
|
|
||||||
-- STATICLAS ->
|
|
||||||
-- (itParams . lasBeam .~ BeamCombine TeslaBeamCombine)
|
|
||||||
-- . (itParams . subParams ?~ teslaParams)
|
|
||||||
---- WEPTELE -> makeDirectedTele
|
|
||||||
-- --LAUNCHHOME -> itUse . heldConsumption . laAmmoType . amPjCreation .~ CreateTrackingShell
|
|
||||||
-- LAUNCHHOME -> id
|
|
||||||
-- ATTACHTORCH -> id
|
|
||||||
---- where
|
|
||||||
---- makeDirectedTele it =
|
|
||||||
---- it
|
|
||||||
---- & itUse . heldMods %~ ModWithDirectedTeleport -- .:~ withPosDirWallCheck directedTelPos
|
|
||||||
---- -- for the camera: the simplest option is to remove all zoom/offset
|
|
||||||
---- & itUse . heldAim . aimZoom . izFac .~ 1
|
|
||||||
---- & itUse . heldAim . aimRange .~ 0
|
|
||||||
|
|
||||||
-- a better option would be to involve a "scope" centered on the firing
|
|
||||||
-- position
|
|
||||||
-- directedTelPos it cr w = (p,a)
|
|
||||||
-- where
|
|
||||||
-- p = fromMaybe (_crPos cr) $ it ^? itTargeting . tgPos . _Just
|
|
||||||
-- a = argV (mouseWorldPos w -.- p)
|
|
||||||
|
|
||||||
--applyModules :: Item -> Item
|
|
||||||
--applyModules it = foldl' (flip moduleModification) it (it ^. itType . iyModules)
|
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
module Dodge.Combine.Trie where
|
module Dodge.Combine.Trie
|
||||||
|
( combinationsTrie
|
||||||
|
) where
|
||||||
|
|
||||||
import Data.Bifunctor
|
import Data.Bifunctor
|
||||||
import Data.List (sort)
|
import Data.List (sort)
|
||||||
@@ -7,14 +9,14 @@ import Dodge.Data.Item
|
|||||||
import SimpleTrie
|
import SimpleTrie
|
||||||
import Data.Foldable
|
import Data.Foldable
|
||||||
|
|
||||||
flatCombinationsTrie :: Trie ItemBaseType Item
|
--flatCombinationsTrie :: Trie ItemType Item
|
||||||
{-# INLINE flatCombinationsTrie #-}
|
--{-# INLINE flatCombinationsTrie #-}
|
||||||
flatCombinationsTrie = foldl'
|
--flatCombinationsTrie = foldl'
|
||||||
(flip $ uncurry insertInTrie . first sort)
|
-- (flip $ uncurry insertInTrie . first sort)
|
||||||
emptyTrie
|
-- emptyTrie
|
||||||
flatItemCombinations
|
-- flatItemCombinations
|
||||||
|
|
||||||
combinationsTrie :: Trie (ItAmount, ItemBaseType) Item
|
combinationsTrie :: Trie (ItAmount, ItemType) Item
|
||||||
{-# INLINE combinationsTrie #-}
|
{-# INLINE combinationsTrie #-}
|
||||||
combinationsTrie =
|
combinationsTrie =
|
||||||
foldl'
|
foldl'
|
||||||
|
|||||||
@@ -209,7 +209,6 @@ inventoryX c = case c of
|
|||||||
'K' ->
|
'K' ->
|
||||||
[ autoRifle
|
[ autoRifle
|
||||||
, tinMag
|
, tinMag
|
||||||
, targetingHat TargetRBPress
|
|
||||||
] <> fold
|
] <> fold
|
||||||
[ makeTypeCraftNum 7 MICROCHIP
|
[ makeTypeCraftNum 7 MICROCHIP
|
||||||
, makeTypeCraftNum 4 HARDWARE
|
, makeTypeCraftNum 4 HARDWARE
|
||||||
@@ -219,11 +218,6 @@ inventoryX c = case c of
|
|||||||
, makeTypeCraftNum 1 LIGHTSENSOR
|
, makeTypeCraftNum 1 LIGHTSENSOR
|
||||||
, makeTypeCraftNum 1 SOUNDSENSOR
|
, makeTypeCraftNum 1 SOUNDSENSOR
|
||||||
, makeTypeCraftNum 1 HEATSENSOR
|
, makeTypeCraftNum 1 HEATSENSOR
|
||||||
-- , makeTypeCraftNum 1 (BULBODYCRAFT BounceBullet)
|
|
||||||
-- , makeTypeCraftNum 1 (BULBODYCRAFT PenetrateBullet)
|
|
||||||
-- , makeTypeCraftNum 1 (ENERGYBALLCRAFT IncBall)
|
|
||||||
-- , makeTypeCraftNum 1 (ENERGYBALLCRAFT TeslaBall)
|
|
||||||
-- , makeTypeCraftNum 1 (ENERGYBALLCRAFT ConcBall)
|
|
||||||
]
|
]
|
||||||
'L' -> [scrollWatch]
|
'L' -> [scrollWatch]
|
||||||
'M' -> stackedInventory
|
'M' -> stackedInventory
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ movementSideEff cr w
|
|||||||
_ -> w
|
_ -> w
|
||||||
| otherwise = footstepSideEffect cr w
|
| otherwise = footstepSideEffect cr w
|
||||||
where
|
where
|
||||||
hasJetPack = any (\it -> it ^? itType . iyBase == Just (EQUIP JETPACK)) $ _crInv cr
|
hasJetPack = any (\it -> it ^? itType == Just (EQUIP JETPACK)) $ _crInv cr
|
||||||
oldPos = _crOldPos cr
|
oldPos = _crOldPos cr
|
||||||
momentum' = 0.97 *.* (_crPos cr -.- _crOldPos cr)
|
momentum' = 0.97 *.* (_crPos cr -.- _crOldPos cr)
|
||||||
momentum''
|
momentum''
|
||||||
@@ -252,7 +252,7 @@ invSideEff cr w =
|
|||||||
w' & maybe id (\g -> doInvEffect g it cr) (it ^? itEffect . ieInv)
|
w' & maybe id (\g -> doInvEffect g it cr) (it ^? itEffect . ieInv)
|
||||||
|
|
||||||
itemInvSideEffect :: Creature -> Item -> World -> World
|
itemInvSideEffect :: Creature -> Item -> World -> World
|
||||||
itemInvSideEffect cr itm = case _iyBase $ _itType itm of
|
itemInvSideEffect cr itm = case _itType itm of
|
||||||
TARGETING tt -> updateItemTargeting tt cr itm
|
TARGETING tt -> updateItemTargeting tt cr itm
|
||||||
_ -> id
|
_ -> id
|
||||||
--itemInvSideEffect cr it
|
--itemInvSideEffect cr it
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ strFromEquipment :: Creature -> Int
|
|||||||
strFromEquipment = sum . fmap equipmentStrValue . crCurrentEquipment
|
strFromEquipment = sum . fmap equipmentStrValue . crCurrentEquipment
|
||||||
|
|
||||||
equipmentStrValue :: Item -> Int
|
equipmentStrValue :: Item -> Int
|
||||||
equipmentStrValue itm = case _iyBase $ _itType itm of
|
equipmentStrValue itm = case _itType itm of
|
||||||
EQUIP FRONTARMOUR -> negate 3
|
EQUIP FRONTARMOUR -> negate 3
|
||||||
EQUIP POWERLEGS -> 3
|
EQUIP POWERLEGS -> 3
|
||||||
_ -> 0
|
_ -> 0
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ crIsArmouredFrom = hasFrontArmour
|
|||||||
hasFrontArmour :: Point2 -> Creature -> Bool
|
hasFrontArmour :: Point2 -> Creature -> Bool
|
||||||
hasFrontArmour p cr = fromMaybe False $ do
|
hasFrontArmour p cr = fromMaybe False $ do
|
||||||
invid <- cr ^? crEquipment . ix OnChest
|
invid <- cr ^? crEquipment . ix OnChest
|
||||||
ittype <- cr ^? crInv . ix invid . itType . iyBase
|
ittype <- cr ^? crInv . ix invid . itType
|
||||||
return $
|
return $
|
||||||
EQUIP FRONTARMOUR == ittype
|
EQUIP FRONTARMOUR == ittype
|
||||||
&& p /= _crOldPos cr
|
&& p /= _crOldPos cr
|
||||||
|
|||||||
+8
-11
@@ -1,5 +1,3 @@
|
|||||||
--{-# LANGUAGE DeriveGeneric #-}
|
|
||||||
--{-# LANGUAGE DeriveAnyClass #-}
|
|
||||||
{-# LANGUAGE StrictData #-}
|
{-# LANGUAGE StrictData #-}
|
||||||
{-# LANGUAGE TemplateHaskell #-}
|
{-# LANGUAGE TemplateHaskell #-}
|
||||||
|
|
||||||
@@ -16,20 +14,20 @@ module Dodge.Data.Item (
|
|||||||
module Dodge.Data.Item.Location,
|
module Dodge.Data.Item.Location,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import NewInt
|
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
|
import Data.Set (Set)
|
||||||
import Dodge.Data.Item.Combine
|
import Dodge.Data.Item.Combine
|
||||||
import Dodge.Data.Item.Effect
|
|
||||||
import Dodge.Data.Item.Scope
|
|
||||||
import Dodge.Data.Item.CurseStatus
|
import Dodge.Data.Item.CurseStatus
|
||||||
|
import Dodge.Data.Item.Effect
|
||||||
|
import Dodge.Data.Item.Location
|
||||||
import Dodge.Data.Item.Misc
|
import Dodge.Data.Item.Misc
|
||||||
import Dodge.Data.Item.Params
|
import Dodge.Data.Item.Params
|
||||||
|
import Dodge.Data.Item.Scope
|
||||||
import Dodge.Data.Item.Tweak
|
import Dodge.Data.Item.Tweak
|
||||||
import Dodge.Data.Item.Use
|
import Dodge.Data.Item.Use
|
||||||
import Dodge.Data.Item.Location
|
import NewInt
|
||||||
import Data.Set (Set)
|
|
||||||
|
|
||||||
data ItID = ItID
|
data ItID = ItID
|
||||||
deriving (Eq, Ord, Show, Read)
|
deriving (Eq, Ord, Show, Read)
|
||||||
@@ -40,17 +38,16 @@ data Item = Item
|
|||||||
, _itID :: NewInt ItmInt
|
, _itID :: NewInt ItmInt
|
||||||
, _itLocation :: ItemLocation
|
, _itLocation :: ItemLocation
|
||||||
, _itEffect :: ItEffect
|
, _itEffect :: ItEffect
|
||||||
, _itInvSize :: Float
|
, _itInvSize :: Int
|
||||||
, _itDimension :: ItemDimension
|
, _itDimension :: ItemDimension
|
||||||
, _itCurseStatus :: CurseStatus
|
, _itCurseStatus :: CurseStatus
|
||||||
, _itTweaks :: ItemTweaks
|
, _itTweaks :: ItemTweaks
|
||||||
-- , _itScope :: Scope
|
|
||||||
, _itParams :: ItemParams
|
, _itParams :: ItemParams
|
||||||
, _itAttachments :: Set ItemAttachment
|
, _itAttachments :: Set ItemAttachment
|
||||||
}
|
}
|
||||||
--deriving (Eq, Show, Read) --Generic, Flat)
|
|
||||||
|
|
||||||
data ItemAttachment = ScopeAttachment
|
data ItemAttachment
|
||||||
|
= ScopeAttachment
|
||||||
| BulletClipAttachment
|
| BulletClipAttachment
|
||||||
| BulletBeltAttachment
|
| BulletBeltAttachment
|
||||||
| StandAttachment
|
| StandAttachment
|
||||||
|
|||||||
@@ -5,18 +5,23 @@
|
|||||||
|
|
||||||
module Dodge.Data.Item.Combine where
|
module Dodge.Data.Item.Combine where
|
||||||
|
|
||||||
import Dodge.Data.Item.BulletMod
|
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
import qualified Data.Map.Strict as M
|
|
||||||
import Dodge.Data.Equipment.Misc
|
import Dodge.Data.Equipment.Misc
|
||||||
|
import Dodge.Data.Item.BulletMod
|
||||||
import Dodge.Data.Item.Targeting
|
import Dodge.Data.Item.Targeting
|
||||||
import Dodge.Data.Item.Use.Consumption
|
|
||||||
|
|
||||||
data ItemType = ItemType
|
data ItemType
|
||||||
{ _iyBase :: ItemBaseType
|
= HELD {_ibtHeld :: HeldItemType}
|
||||||
}
|
| LEFT {_ibtLeft :: LeftItemType}
|
||||||
|
| EQUIP {_ibtEquip :: EquipItemType}
|
||||||
|
| CONSUMABLE {_ibtConsumable :: ConsumableItemType}
|
||||||
|
| CRAFT {_ibtCraft :: CraftType}
|
||||||
|
| ATTACH {_ibtAttach :: AttachType}
|
||||||
|
| AMMOMAG {_ibtAmmoMag :: AmmoMagType}
|
||||||
|
| TARGETING {_ibtTargeting :: TargetingType}
|
||||||
|
| BULLETMOD {_ibtBulletMod :: BulletMod}
|
||||||
deriving (Eq, Ord, Show, Read)
|
deriving (Eq, Ord, Show, Read)
|
||||||
|
|
||||||
data CraftType
|
data CraftType
|
||||||
@@ -64,27 +69,15 @@ data CraftType
|
|||||||
| GASINJECTOR
|
| GASINJECTOR
|
||||||
| FLAKCRAFT
|
| FLAKCRAFT
|
||||||
| FRAGCRAFT
|
| FRAGCRAFT
|
||||||
-- | ENERGYBALLCRAFT EnergyBallType
|
| -- | ENERGYBALLCRAFT EnergyBallType
|
||||||
-- | BULBODYCRAFT BulletEffect
|
-- | BULBODYCRAFT BulletEffect
|
||||||
| TELEPORTMODULE
|
TELEPORTMODULE
|
||||||
| TIMEMODULE
|
| TIMEMODULE
|
||||||
| SIZEMODULE
|
| SIZEMODULE
|
||||||
| GRAVITYMODULE
|
| GRAVITYMODULE
|
||||||
-- | TARGETMODULE TargetingType
|
-- | TARGETMODULE TargetingType
|
||||||
deriving (Eq, Ord, Show, Read)
|
deriving (Eq, Ord, Show, Read)
|
||||||
|
|
||||||
data ItemBaseType
|
|
||||||
= HELD {_ibtHeld :: HeldItemType}
|
|
||||||
| LEFT {_ibtLeft :: LeftItemType}
|
|
||||||
| EQUIP {_ibtEquip :: EquipItemType}
|
|
||||||
| CONSUMABLE {_ibtConsumable :: ConsumableItemType}
|
|
||||||
| CRAFT CraftType
|
|
||||||
| ATTACH {_ibtAttach :: AttachType}
|
|
||||||
| AMMOMAG {_ibtAmmoMag :: AmmoMagType}
|
|
||||||
| TARGETING {_ibtTargeting :: TargetingType}
|
|
||||||
| BULLETMOD {_ibtBulletMod :: BulletMod}
|
|
||||||
deriving (Eq, Ord, Show, Read)
|
|
||||||
|
|
||||||
data AttachType
|
data AttachType
|
||||||
= ZOOMSCOPE
|
= ZOOMSCOPE
|
||||||
| BULLETSYNTHESIZER
|
| BULLETSYNTHESIZER
|
||||||
@@ -94,8 +87,7 @@ data AttachType
|
|||||||
deriving (Eq, Ord, Show, Read)
|
deriving (Eq, Ord, Show, Read)
|
||||||
|
|
||||||
data AmmoMagType
|
data AmmoMagType
|
||||||
= REVOLVEMAG
|
= TINMAG
|
||||||
| TINMAG
|
|
||||||
| DRUMMAG
|
| DRUMMAG
|
||||||
| BELTMAG
|
| BELTMAG
|
||||||
| SHELLMAG
|
| SHELLMAG
|
||||||
@@ -103,7 +95,6 @@ data AmmoMagType
|
|||||||
| CHEMFUELPOUCH
|
| CHEMFUELPOUCH
|
||||||
deriving (Eq, Ord, Show, Read)
|
deriving (Eq, Ord, Show, Read)
|
||||||
|
|
||||||
|
|
||||||
data ConsumableItemType
|
data ConsumableItemType
|
||||||
= MEDKIT Int
|
= MEDKIT Int
|
||||||
| EXPLOSIVES
|
| EXPLOSIVES
|
||||||
@@ -117,7 +108,6 @@ data EquipItemType
|
|||||||
| INVISIBILITYEQUIPMENT EquipSite
|
| INVISIBILITYEQUIPMENT EquipSite
|
||||||
| BRAINHAT
|
| BRAINHAT
|
||||||
| HAT
|
| HAT
|
||||||
| TARGETINGHAT TargetingType
|
|
||||||
| HEADLAMP
|
| HEADLAMP
|
||||||
| POWERLEGS
|
| POWERLEGS
|
||||||
| SPEEDLEGS
|
| SPEEDLEGS
|
||||||
@@ -188,7 +178,6 @@ data Detector
|
|||||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||||
|
|
||||||
makeLenses ''ItemType
|
makeLenses ''ItemType
|
||||||
makeLenses ''ItemBaseType
|
|
||||||
makeLenses ''HeldItemType
|
makeLenses ''HeldItemType
|
||||||
makeLenses ''AttachType
|
makeLenses ''AttachType
|
||||||
deriveJSON defaultOptions ''CraftType
|
deriveJSON defaultOptions ''CraftType
|
||||||
@@ -199,7 +188,6 @@ deriveJSON defaultOptions ''Detector
|
|||||||
deriveJSON defaultOptions ''EquipItemType
|
deriveJSON defaultOptions ''EquipItemType
|
||||||
deriveJSON defaultOptions ''LeftItemType
|
deriveJSON defaultOptions ''LeftItemType
|
||||||
deriveJSON defaultOptions ''HeldItemType
|
deriveJSON defaultOptions ''HeldItemType
|
||||||
deriveJSON defaultOptions ''ItemBaseType
|
|
||||||
deriveJSON defaultOptions ''ItemType
|
deriveJSON defaultOptions ''ItemType
|
||||||
|
|
||||||
--instance ToJSONKey ModuleSlot
|
--instance ToJSONKey ModuleSlot
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import Dodge.Data.Item.Use.Consumption.LoadAction
|
|||||||
data ReloadStatus = ReloadStatus
|
data ReloadStatus = ReloadStatus
|
||||||
{ _iaMax :: Int
|
{ _iaMax :: Int
|
||||||
, _iaLoaded :: Int
|
, _iaLoaded :: Int
|
||||||
-- , _iaPrimed :: Bool
|
|
||||||
}
|
}
|
||||||
deriving (Eq, Show, Read) --Generic, Flat)
|
deriving (Eq, Show, Read) --Generic, Flat)
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ data Sensor
|
|||||||
|
|
||||||
data ProximityRequirement
|
data ProximityRequirement
|
||||||
= RequireHealth {_proxReqMinHealth :: Int}
|
= RequireHealth {_proxReqMinHealth :: Int}
|
||||||
| RequireEquipment {_proxReqEquipment :: ItemBaseType}
|
| RequireEquipment {_proxReqEquipment :: ItemType}
|
||||||
| RequireImpossible
|
| RequireImpossible
|
||||||
deriving (Show)
|
deriving (Show)
|
||||||
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ applyTerminalCommandArguments command args u = case command of
|
|||||||
where
|
where
|
||||||
ypoint = uvWorld . cWorld . lWorld . creatures . ix 0
|
ypoint = uvWorld . cWorld . lWorld . creatures . ix 0
|
||||||
|
|
||||||
parseItem :: [String] -> Maybe (ItemBaseType, Int)
|
parseItem :: [String] -> Maybe (ItemType, Int)
|
||||||
parseItem (x : xs) =
|
parseItem (x : xs) =
|
||||||
(readMaybe (x ++ " {_xNum=" ++ show (parseNum xs) ++ "}") <&> (,1))
|
(readMaybe (x ++ " {_xNum=" ++ show (parseNum xs) ++ "}") <&> (,1))
|
||||||
<|> (readMaybe x <&> (,parseNum xs))
|
<|> (readMaybe x <&> (,parseNum xs))
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ defaultItemDimension = ItemDimension
|
|||||||
defaultHeldItem :: Item
|
defaultHeldItem :: Item
|
||||||
defaultHeldItem = Item
|
defaultHeldItem = Item
|
||||||
{ _itCurseStatus = Uncursed
|
{ _itCurseStatus = Uncursed
|
||||||
, _itType = ItemType (HELD PISTOL) -- mempty
|
, _itType = HELD PISTOL
|
||||||
, _itEffect = defaultItEffect
|
, _itEffect = defaultItEffect
|
||||||
, _itID = 0
|
, _itID = 0
|
||||||
, _itInvSize = 1
|
, _itInvSize = 1
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ module Dodge.DisplayInventory (
|
|||||||
updateCombinePositioning,
|
updateCombinePositioning,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
|
import Dodge.Inventory.SelectionList
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
import qualified Data.IntMap.Strict as IM
|
import qualified Data.IntMap.Strict as IM
|
||||||
--import qualified Data.IntMap.Merge.Strict as MIM
|
--import qualified Data.IntMap.Merge.Strict as MIM
|
||||||
@@ -20,7 +21,6 @@ import Dodge.Data.Config
|
|||||||
import Dodge.Data.SelectionList
|
import Dodge.Data.SelectionList
|
||||||
import Dodge.Data.Universe
|
import Dodge.Data.Universe
|
||||||
import Dodge.Inventory.CheckSlots
|
import Dodge.Inventory.CheckSlots
|
||||||
import Dodge.Inventory.SelectionList
|
|
||||||
import Dodge.ListDisplayParams
|
import Dodge.ListDisplayParams
|
||||||
import Dodge.SelectionList
|
import Dodge.SelectionList
|
||||||
import Dodge.Item.Grammar
|
import Dodge.Item.Grammar
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ useLoadedAmmo itmtree cr (cme,w) (mzid,Just (mz,x,magtree)) = (,) (cme & cmeSoun
|
|||||||
|
|
||||||
itemDetectorEffect :: Item -> Creature -> World -> World
|
itemDetectorEffect :: Item -> Creature -> World -> World
|
||||||
itemDetectorEffect itm cr w = fromMaybe w $ do
|
itemDetectorEffect itm cr w = fromMaybe w $ do
|
||||||
HELDDETECTOR dt <- itm ^? itType . iyBase . ibtHeld
|
HELDDETECTOR dt <- itm ^? itType . ibtHeld
|
||||||
return $ detectorEffect dt itm cr w
|
return $ detectorEffect dt itm cr w
|
||||||
|
|
||||||
walkNozzle :: Int -> Muzzle -> Item -> Creature -> World -> World
|
walkNozzle :: Int -> Muzzle -> Item -> Creature -> World -> World
|
||||||
|
|||||||
@@ -4,9 +4,10 @@ module Dodge.Inventory.CheckSlots (
|
|||||||
crInvSize,
|
crInvSize,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
|
import Control.Lens
|
||||||
|
import Data.Monoid
|
||||||
import Dodge.Base.You
|
import Dodge.Base.You
|
||||||
import Dodge.Data.World
|
import Dodge.Data.World
|
||||||
import Dodge.Item.SlotsTaken
|
|
||||||
import qualified IntMapHelp as IM
|
import qualified IntMapHelp as IM
|
||||||
|
|
||||||
{- | checks whether or not an item will fit in your inventory
|
{- | checks whether or not an item will fit in your inventory
|
||||||
@@ -14,7 +15,7 @@ import qualified IntMapHelp as IM
|
|||||||
-}
|
-}
|
||||||
checkInvSlotsYou :: Item -> World -> Maybe Int
|
checkInvSlotsYou :: Item -> World -> Maybe Int
|
||||||
checkInvSlotsYou it w
|
checkInvSlotsYou it w
|
||||||
| crNumFreeSlots ycr >= ceiling (_itInvSize it) =
|
| crNumFreeSlots ycr >= _itInvSize it =
|
||||||
Just $ findItemSlot (_crInv ycr)
|
Just $ findItemSlot (_crInv ycr)
|
||||||
| otherwise = Nothing
|
| otherwise = Nothing
|
||||||
where
|
where
|
||||||
@@ -38,4 +39,5 @@ crInvSize :: Creature -> Int
|
|||||||
crInvSize = invSize . _crInv
|
crInvSize = invSize . _crInv
|
||||||
|
|
||||||
invSize :: IM.IntMap Item -> Int
|
invSize :: IM.IntMap Item -> Int
|
||||||
invSize = sum . fmap itSlotsTaken
|
invSize = alaf Sum foldMap _itInvSize
|
||||||
|
--invSize = sum . fmap _itInvSize
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import Padding
|
|||||||
import Dodge.Equipment.Text
|
import Dodge.Equipment.Text
|
||||||
import Dodge.Data.SelectionList
|
import Dodge.Data.SelectionList
|
||||||
import Dodge.Data.World
|
import Dodge.Data.World
|
||||||
import Dodge.Item.SlotsTaken
|
|
||||||
import Dodge.Item.Display
|
import Dodge.Item.Display
|
||||||
import Dodge.Item.InventoryColor
|
import Dodge.Item.InventoryColor
|
||||||
import LensHelp
|
import LensHelp
|
||||||
@@ -18,7 +17,7 @@ invSelectionItem' :: Creature -> Int -> Item -> SelectionItem ()
|
|||||||
invSelectionItem' cr i it =
|
invSelectionItem' cr i it =
|
||||||
SelectionItem
|
SelectionItem
|
||||||
{ _siPictures = pics & ix 0 %~ (++ anyequippos ++ anyhotkey)
|
{ _siPictures = pics & ix 0 %~ (++ anyequippos ++ anyhotkey)
|
||||||
, _siHeight = itSlotsTaken it
|
, _siHeight = _itInvSize it
|
||||||
, _siIsSelectable = True
|
, _siIsSelectable = True
|
||||||
, _siColor = col
|
, _siColor = col
|
||||||
, _siOffX = 0
|
, _siOffX = 0
|
||||||
@@ -36,7 +35,7 @@ invSelectionItem :: Creature -> Int -> (Item,Int,a) -> SelectionItem ()
|
|||||||
invSelectionItem cr i (it,indent,_) =
|
invSelectionItem cr i (it,indent,_) =
|
||||||
SelectionItem
|
SelectionItem
|
||||||
{ _siPictures = pics & ix 0 %~ (++ anyequippos ++ anyhotkey)
|
{ _siPictures = pics & ix 0 %~ (++ anyequippos ++ anyhotkey)
|
||||||
, _siHeight = itSlotsTaken it
|
, _siHeight = _itInvSize it
|
||||||
, _siIsSelectable = True
|
, _siIsSelectable = True
|
||||||
, _siColor = col
|
, _siColor = col
|
||||||
, _siOffX = indent
|
, _siOffX = indent
|
||||||
|
|||||||
+6
-8
@@ -1,3 +1,5 @@
|
|||||||
|
{-# LANGUAGE LambdaCase #-}
|
||||||
|
|
||||||
module Dodge.Item (
|
module Dodge.Item (
|
||||||
module Dodge.Item.Weapon,
|
module Dodge.Item.Weapon,
|
||||||
module Dodge.Item.Held,
|
module Dodge.Item.Held,
|
||||||
@@ -7,17 +9,17 @@ module Dodge.Item (
|
|||||||
itemFromBase,
|
itemFromBase,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Dodge.Item.Ammo
|
|
||||||
import Dodge.Data.Item
|
import Dodge.Data.Item
|
||||||
|
import Dodge.Item.Ammo
|
||||||
import Dodge.Item.Consumable
|
import Dodge.Item.Consumable
|
||||||
import Dodge.Item.Craftable
|
import Dodge.Item.Craftable
|
||||||
import Dodge.Item.Equipment
|
import Dodge.Item.Equipment
|
||||||
import Dodge.Item.Held
|
import Dodge.Item.Held
|
||||||
import Dodge.Item.Weapon
|
|
||||||
import Dodge.Item.Scope
|
import Dodge.Item.Scope
|
||||||
|
import Dodge.Item.Weapon
|
||||||
|
|
||||||
itemFromBase :: ItemBaseType -> Item
|
itemFromBase :: ItemType -> Item
|
||||||
itemFromBase ibt = case ibt of
|
itemFromBase = \case
|
||||||
HELD ht -> itemFromHeldType ht
|
HELD ht -> itemFromHeldType ht
|
||||||
LEFT lt -> itemFromLeftType lt
|
LEFT lt -> itemFromLeftType lt
|
||||||
EQUIP et -> itemFromEquipType et
|
EQUIP et -> itemFromEquipType et
|
||||||
@@ -32,7 +34,6 @@ itemFromAmmoMag :: AmmoMagType -> Item
|
|||||||
itemFromAmmoMag at = case at of
|
itemFromAmmoMag at = case at of
|
||||||
DRUMMAG -> drumMag
|
DRUMMAG -> drumMag
|
||||||
TINMAG -> tinMag
|
TINMAG -> tinMag
|
||||||
REVOLVEMAG -> revolveMag
|
|
||||||
BELTMAG -> beltMag
|
BELTMAG -> beltMag
|
||||||
SHELLMAG -> shellMag
|
SHELLMAG -> shellMag
|
||||||
BATTERY -> battery
|
BATTERY -> battery
|
||||||
@@ -47,7 +48,6 @@ itemFromAttachType at = case at of
|
|||||||
HOMINGMODULE -> homingModule
|
HOMINGMODULE -> homingModule
|
||||||
AUGMENTEDHUD -> augmentedHUD
|
AUGMENTEDHUD -> augmentedHUD
|
||||||
|
|
||||||
|
|
||||||
itemFromConsumableType :: ConsumableItemType -> Item
|
itemFromConsumableType :: ConsumableItemType -> Item
|
||||||
itemFromConsumableType ct = case ct of
|
itemFromConsumableType ct = case ct of
|
||||||
MEDKIT i -> medkit i
|
MEDKIT i -> medkit i
|
||||||
@@ -63,7 +63,6 @@ itemFromEquipType et = case et of
|
|||||||
INVISIBILITYEQUIPMENT _ -> error "need to define invisibility for more than wrist"
|
INVISIBILITYEQUIPMENT _ -> error "need to define invisibility for more than wrist"
|
||||||
BRAINHAT -> brainHat
|
BRAINHAT -> brainHat
|
||||||
HAT -> hat
|
HAT -> hat
|
||||||
TARGETINGHAT tt -> targetingHat tt
|
|
||||||
HEADLAMP -> headLamp
|
HEADLAMP -> headLamp
|
||||||
POWERLEGS -> powerLegs
|
POWERLEGS -> powerLegs
|
||||||
SPEEDLEGS -> speedLegs
|
SPEEDLEGS -> speedLegs
|
||||||
@@ -85,4 +84,3 @@ itemFromLeftType lt = case lt of
|
|||||||
BLINKERUNSAFE -> unsafeBlinkGun
|
BLINKERUNSAFE -> unsafeBlinkGun
|
||||||
SHRINKER -> shrinkGun
|
SHRINKER -> shrinkGun
|
||||||
SPAWNER -> error "need to datify creatures first"
|
SPAWNER -> error "need to datify creatures first"
|
||||||
|
|
||||||
|
|||||||
+13
-16
@@ -12,9 +12,7 @@ megaTinMag x = tinMag
|
|||||||
|
|
||||||
tinMag :: Item
|
tinMag :: Item
|
||||||
tinMag =
|
tinMag =
|
||||||
defaultHeldItem & itType . iyBase .~ AMMOMAG TINMAG
|
defaultHeldItem & itType .~ AMMOMAG TINMAG
|
||||||
-- & itType . iyModules . at ModBulletPayload ?~ EMPTYMODULE
|
|
||||||
-- & itType . iyModules . at ModBulletTrajectory ?~ EMPTYMODULE
|
|
||||||
& itUse
|
& itUse
|
||||||
.~ AmmoMagUse
|
.~ AmmoMagUse
|
||||||
{ _amagParams = BulletParams defaultBullet
|
{ _amagParams = BulletParams defaultBullet
|
||||||
@@ -26,22 +24,22 @@ tinMag =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
revolveMag :: Item
|
--revolveMag :: Item
|
||||||
revolveMag =
|
--revolveMag =
|
||||||
tinMag
|
-- tinMag
|
||||||
& itType . iyBase .~ AMMOMAG REVOLVEMAG
|
-- & itType .~ AMMOMAG REVOLVEMAG
|
||||||
& itUse . amagLoadStatus . iaMax .~ 6
|
-- & itUse . amagLoadStatus . iaMax .~ 6
|
||||||
& itUse . amagLoadStatus . iaLoaded .~ 6
|
-- & itUse . amagLoadStatus . iaLoaded .~ 6
|
||||||
|
|
||||||
drumMag :: Item
|
drumMag :: Item
|
||||||
drumMag =
|
drumMag =
|
||||||
tinMag & itType . iyBase . ibtAmmoMag .~ DRUMMAG
|
tinMag & itType . ibtAmmoMag .~ DRUMMAG
|
||||||
& itUse . amagLoadStatus . iaLoaded .~ 30
|
& itUse . amagLoadStatus . iaLoaded .~ 30
|
||||||
& itUse . amagLoadStatus . iaMax .~ 30
|
& itUse . amagLoadStatus . iaMax .~ 30
|
||||||
|
|
||||||
beltMag :: Item
|
beltMag :: Item
|
||||||
beltMag =
|
beltMag =
|
||||||
tinMag & itType . iyBase . ibtAmmoMag .~ BELTMAG
|
tinMag & itType . ibtAmmoMag .~ BELTMAG
|
||||||
& itUse . amagLoadStatus . iaLoaded .~ 10000
|
& itUse . amagLoadStatus . iaLoaded .~ 10000
|
||||||
& itUse . amagLoadStatus . iaMax .~ 20000
|
& itUse . amagLoadStatus . iaMax .~ 20000
|
||||||
& itUse . amagType .~ BeltBulletAmmo
|
& itUse . amagType .~ BeltBulletAmmo
|
||||||
@@ -53,12 +51,11 @@ megaShellMag = shellMag
|
|||||||
|
|
||||||
shellMag :: Item
|
shellMag :: Item
|
||||||
shellMag =
|
shellMag =
|
||||||
defaultHeldItem & itType . iyBase .~ AMMOMAG SHELLMAG
|
defaultHeldItem & itType .~ AMMOMAG SHELLMAG
|
||||||
& itUse
|
& itUse
|
||||||
.~ AmmoMagUse
|
.~ AmmoMagUse
|
||||||
{ _amagParams = ProjectileParams
|
{ _amagParams = ProjectileParams
|
||||||
{ _ampPayload = ExplosionPayload
|
{ _ampPayload = ExplosionPayload
|
||||||
-- , _ampPjDraw = DrawShell
|
|
||||||
}
|
}
|
||||||
, _amagLoadStatus =
|
, _amagLoadStatus =
|
||||||
ReloadStatus
|
ReloadStatus
|
||||||
@@ -74,7 +71,7 @@ megaBattery = battery
|
|||||||
|
|
||||||
battery :: Item
|
battery :: Item
|
||||||
battery =
|
battery =
|
||||||
defaultHeldItem & itType . iyBase .~ AMMOMAG BATTERY
|
defaultHeldItem & itType .~ AMMOMAG BATTERY
|
||||||
& itUse
|
& itUse
|
||||||
.~ AmmoMagUse
|
.~ AmmoMagUse
|
||||||
{ _amagParams = BulletParams defaultBullet
|
{ _amagParams = BulletParams defaultBullet
|
||||||
@@ -88,7 +85,7 @@ battery =
|
|||||||
|
|
||||||
chemFuelPouch :: Item
|
chemFuelPouch :: Item
|
||||||
chemFuelPouch =
|
chemFuelPouch =
|
||||||
defaultHeldItem & itType . iyBase .~ AMMOMAG CHEMFUELPOUCH
|
defaultHeldItem & itType .~ AMMOMAG CHEMFUELPOUCH
|
||||||
& itUse
|
& itUse
|
||||||
.~ AmmoMagUse
|
.~ AmmoMagUse
|
||||||
{ _amagParams = GasParams ChemFuel
|
{ _amagParams = GasParams ChemFuel
|
||||||
@@ -102,5 +99,5 @@ chemFuelPouch =
|
|||||||
|
|
||||||
bulletSynthesizer :: Item
|
bulletSynthesizer :: Item
|
||||||
bulletSynthesizer = defaultHeldItem
|
bulletSynthesizer = defaultHeldItem
|
||||||
& itType . iyBase .~ ATTACH BULLETSYNTHESIZER
|
& itType .~ ATTACH BULLETSYNTHESIZER
|
||||||
& itUse .~ AttachUse Nothing
|
& itUse .~ AttachUse Nothing
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ medkit :: Int -> Item
|
|||||||
medkit i =
|
medkit i =
|
||||||
defaultConsumable
|
defaultConsumable
|
||||||
& itUse . cUse .~ CHeal i
|
& itUse . cUse .~ CHeal i
|
||||||
& itType . iyBase .~ CONSUMABLE (MEDKIT i)
|
& itType .~ CONSUMABLE (MEDKIT i)
|
||||||
|
|
||||||
heal25 :: Int -> World -> Maybe World
|
heal25 :: Int -> World -> Maybe World
|
||||||
heal25 = heal 25
|
heal25 = heal 25
|
||||||
|
|||||||
@@ -7,10 +7,9 @@ import Dodge.Data.Item
|
|||||||
makeTypeCraftNum :: Int -> CraftType -> [Item]
|
makeTypeCraftNum :: Int -> CraftType -> [Item]
|
||||||
makeTypeCraftNum i ct = replicate i $
|
makeTypeCraftNum i ct = replicate i $
|
||||||
defaultCraftItem
|
defaultCraftItem
|
||||||
& itInvSize .~ 0.5
|
& itInvSize .~ 1
|
||||||
& itCurseStatus .~ Uncursed
|
& itCurseStatus .~ Uncursed
|
||||||
-- & itUse . useAmount .~ fromIntegral i
|
& itType .~ CRAFT ct
|
||||||
& itType . iyBase .~ CRAFT ct
|
|
||||||
|
|
||||||
makeTypeCraft :: CraftType -> Item
|
makeTypeCraft :: CraftType -> Item
|
||||||
makeTypeCraft = head . makeTypeCraftNum 1
|
makeTypeCraft = head . makeTypeCraftNum 1
|
||||||
|
|||||||
@@ -11,9 +11,6 @@ module Dodge.Item.Display (
|
|||||||
import ShortShow
|
import ShortShow
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
import Dodge.Data.Creature
|
import Dodge.Data.Creature
|
||||||
--import Dodge.Item.Info
|
|
||||||
import Dodge.Item.SlotsTaken
|
|
||||||
import Dodge.Module
|
|
||||||
import LensHelp
|
import LensHelp
|
||||||
import Padding
|
import Padding
|
||||||
|
|
||||||
@@ -50,7 +47,7 @@ itemDisplayPad ls rs
|
|||||||
|
|
||||||
basicItemDisplay :: Item -> [String]
|
basicItemDisplay :: Item -> [String]
|
||||||
basicItemDisplay itm =
|
basicItemDisplay itm =
|
||||||
Prelude.take (itSlotsTaken itm) $
|
Prelude.take (_itInvSize itm) $
|
||||||
itemBaseName itm :
|
itemBaseName itm :
|
||||||
--catMaybes [maybeWarmupStatus itm, maybeRateStatus itm]
|
--catMaybes [maybeWarmupStatus itm, maybeRateStatus itm]
|
||||||
catMaybes [maybeWarmupStatus itm]
|
catMaybes [maybeWarmupStatus itm]
|
||||||
@@ -61,7 +58,7 @@ itemString :: Item -> String
|
|||||||
itemString = head . basicItemDisplay
|
itemString = head . basicItemDisplay
|
||||||
|
|
||||||
itemBaseName :: Item -> String
|
itemBaseName :: Item -> String
|
||||||
itemBaseName itm = case _iyBase $ _itType itm of
|
itemBaseName itm = case _itType itm of
|
||||||
CRAFT str -> show str
|
CRAFT str -> show str
|
||||||
HELD hit -> case hit ^? xNum of
|
HELD hit -> case hit ^? xNum of
|
||||||
Just i -> takeWhile (/= ' ') (show hit) ++ show i
|
Just i -> takeWhile (/= ' ') (show hit) ++ show i
|
||||||
@@ -87,7 +84,6 @@ showAttachItem t itm = case t of
|
|||||||
|
|
||||||
showEquipItem :: EquipItemType -> String
|
showEquipItem :: EquipItemType -> String
|
||||||
showEquipItem eit = case eit of
|
showEquipItem eit = case eit of
|
||||||
TARGETINGHAT _ -> "TARG.HAT"
|
|
||||||
_ -> show eit
|
_ -> show eit
|
||||||
|
|
||||||
showAutoRechargeProgress :: LeftConsumption -> String
|
showAutoRechargeProgress :: LeftConsumption -> String
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ module Dodge.Item.Draw.SPic (
|
|||||||
import Dodge.Data.ComposedItem
|
import Dodge.Data.ComposedItem
|
||||||
import Dodge.Data.DoubleTree
|
import Dodge.Data.DoubleTree
|
||||||
import Color
|
import Color
|
||||||
import qualified Data.Map.Strict as M
|
--import qualified Data.Map.Strict as M
|
||||||
--import Data.Maybe
|
--import Data.Maybe
|
||||||
import Dodge.Data.Item
|
import Dodge.Data.Item
|
||||||
--import Dodge.Item.AmmoPosition
|
--import Dodge.Item.AmmoPosition
|
||||||
@@ -27,9 +27,7 @@ import ShapePicture
|
|||||||
-- return mempty
|
-- return mempty
|
||||||
|
|
||||||
itemSPic :: LabelDoubleTree ComposeLinkType PartiallyComposedItem -> SPic
|
itemSPic :: LabelDoubleTree ComposeLinkType PartiallyComposedItem -> SPic
|
||||||
itemSPic itmtree =
|
itemSPic itmtree = case it ^. itType of
|
||||||
--M.foldMapWithKey (modulesSPic it) (_iyModules $ _itType it) <> case it ^. itType . iyBase of
|
|
||||||
case it ^. itType . iyBase of
|
|
||||||
CRAFT _ -> defSPic
|
CRAFT _ -> defSPic
|
||||||
HELD ht -> heldItemSPic ht it
|
HELD ht -> heldItemSPic ht it
|
||||||
LEFT lt -> leftItemSPic lt it
|
LEFT lt -> leftItemSPic lt it
|
||||||
@@ -58,7 +56,6 @@ equipItemSPic et _ = case et of
|
|||||||
INVISIBILITYEQUIPMENT _ -> noPic (colorSH chartreuse $ upperPrismPolySI 3 $ rectWH 2 2)
|
INVISIBILITYEQUIPMENT _ -> noPic (colorSH chartreuse $ upperPrismPolySI 3 $ rectWH 2 2)
|
||||||
BRAINHAT -> noPic (colorSH yellow $ upperPrismPolySU 3 $ rectWH 4 4)
|
BRAINHAT -> noPic (colorSH yellow $ upperPrismPolySU 3 $ rectWH 4 4)
|
||||||
HAT -> noPic (colorSH yellow $ upperPrismPolySU 3 $ rectWH 4 4)
|
HAT -> noPic (colorSH yellow $ upperPrismPolySU 3 $ rectWH 4 4)
|
||||||
TARGETINGHAT _ -> noPic (colorSH yellow $ upperPrismPolySU 3 $ rectWH 4 4)
|
|
||||||
HEADLAMP -> noPic headLampShape
|
HEADLAMP -> noPic headLampShape
|
||||||
POWERLEGS -> legsSPic yellow
|
POWERLEGS -> legsSPic yellow
|
||||||
SPEEDLEGS -> legsSPic green
|
SPEEDLEGS -> legsSPic green
|
||||||
|
|||||||
+22
-23
@@ -4,7 +4,6 @@ module Dodge.Item.Equipment (
|
|||||||
powerLegs,
|
powerLegs,
|
||||||
wristInvisibility,
|
wristInvisibility,
|
||||||
wristArmour,
|
wristArmour,
|
||||||
targetingHat,
|
|
||||||
hat,
|
hat,
|
||||||
brainHat,
|
brainHat,
|
||||||
frontArmour,
|
frontArmour,
|
||||||
@@ -32,19 +31,19 @@ magShield =
|
|||||||
& itParams .~ MagShieldParams Nothing
|
& itParams .~ MagShieldParams Nothing
|
||||||
& itUse . equipEffect . eeUse .~ EMagShield
|
& itUse . equipEffect . eeUse .~ EMagShield
|
||||||
& itUse . equipEffect . eeSite .~ GoesOnWrist
|
& itUse . equipEffect . eeSite .~ GoesOnWrist
|
||||||
& itType . iyBase .~ EQUIP MAGSHIELD
|
& itType .~ EQUIP MAGSHIELD
|
||||||
|
|
||||||
flameShield :: Item
|
flameShield :: Item
|
||||||
flameShield =
|
flameShield =
|
||||||
defaultEquipment
|
defaultEquipment
|
||||||
& itUse . equipEffect . eeSite .~ GoesOnChest
|
& itUse . equipEffect . eeSite .~ GoesOnChest
|
||||||
& itType . iyBase .~ EQUIP FLAMESHIELD
|
& itType .~ EQUIP FLAMESHIELD
|
||||||
|
|
||||||
frontArmour :: Item
|
frontArmour :: Item
|
||||||
frontArmour =
|
frontArmour =
|
||||||
defaultEquipment
|
defaultEquipment
|
||||||
& itUse . equipEffect . eeSite .~ GoesOnChest
|
& itUse . equipEffect . eeSite .~ GoesOnChest
|
||||||
& itType . iyBase .~ EQUIP FRONTARMOUR
|
& itType .~ EQUIP FRONTARMOUR
|
||||||
|
|
||||||
wristArmour :: Item
|
wristArmour :: Item
|
||||||
wristArmour =
|
wristArmour =
|
||||||
@@ -53,13 +52,13 @@ wristArmour =
|
|||||||
& itUse . equipEffect . eeOnEquip .~ EonWristShield
|
& itUse . equipEffect . eeOnEquip .~ EonWristShield
|
||||||
& itUse . equipEffect . eeUse .~ EWristShield
|
& itUse . equipEffect . eeUse .~ EWristShield
|
||||||
& itUse . equipEffect . eeOnRemove .~ EoffWristShield
|
& itUse . equipEffect . eeOnRemove .~ EoffWristShield
|
||||||
& itType . iyBase .~ EQUIP WRISTARMOUR
|
& itType .~ EQUIP WRISTARMOUR
|
||||||
|
|
||||||
batteryPack :: Item
|
batteryPack :: Item
|
||||||
batteryPack =
|
batteryPack =
|
||||||
defaultEquipment
|
defaultEquipment
|
||||||
& itUse . equipEffect . eeSite .~ GoesOnBack
|
& itUse . equipEffect . eeSite .~ GoesOnBack
|
||||||
& itType . iyBase .~ EQUIP BATTERYPACK
|
& itType .~ EQUIP BATTERYPACK
|
||||||
& itUse . equipEffect . eeAttachPos .~ V3 (-8) 0 10
|
& itUse . equipEffect . eeAttachPos .~ V3 (-8) 0 10
|
||||||
& itUse . equipEffect . eeUse .~ EBatterySource 10000 10000
|
& itUse . equipEffect . eeUse .~ EBatterySource 10000 10000
|
||||||
|
|
||||||
@@ -67,7 +66,7 @@ fuelPack :: Item
|
|||||||
fuelPack =
|
fuelPack =
|
||||||
defaultEquipment
|
defaultEquipment
|
||||||
& itUse . equipEffect . eeSite .~ GoesOnBack
|
& itUse . equipEffect . eeSite .~ GoesOnBack
|
||||||
& itType . iyBase .~ EQUIP FUELPACK
|
& itType .~ EQUIP FUELPACK
|
||||||
& itUse . equipEffect . eeAttachPos .~ V3 (-9) 0 10
|
& itUse . equipEffect . eeAttachPos .~ V3 (-9) 0 10
|
||||||
& itUse . equipEffect . eeUse .~ EFuelSource 10000 10000
|
& itUse . equipEffect . eeUse .~ EFuelSource 10000 10000
|
||||||
|
|
||||||
@@ -75,7 +74,7 @@ bulletBeltPack :: Item
|
|||||||
bulletBeltPack =
|
bulletBeltPack =
|
||||||
defaultEquipment
|
defaultEquipment
|
||||||
& itUse . equipEffect . eeSite .~ GoesOnBack
|
& itUse . equipEffect . eeSite .~ GoesOnBack
|
||||||
& itType . iyBase .~ EQUIP BULLETBELTPACK
|
& itType .~ EQUIP BULLETBELTPACK
|
||||||
& itUse . equipEffect . eeAttachPos .~ V3 (-9) 0 10
|
& itUse . equipEffect . eeAttachPos .~ V3 (-9) 0 10
|
||||||
& itUse . equipEffect . eeUse .~ EAmmoSource 2000 2000 --BulletSource
|
& itUse . equipEffect . eeUse .~ EAmmoSource 2000 2000 --BulletSource
|
||||||
Nothing
|
Nothing
|
||||||
@@ -84,7 +83,7 @@ bulletBeltBracer :: Item
|
|||||||
bulletBeltBracer =
|
bulletBeltBracer =
|
||||||
defaultEquipment
|
defaultEquipment
|
||||||
& itUse . equipEffect . eeSite .~ GoesOnWrist
|
& itUse . equipEffect . eeSite .~ GoesOnWrist
|
||||||
& itType . iyBase .~ EQUIP BULLETBELTBRACER
|
& itType .~ EQUIP BULLETBELTBRACER
|
||||||
& itUse . equipEffect . eeAttachPos .~ V3 (-9) 0 10
|
& itUse . equipEffect . eeAttachPos .~ V3 (-9) 0 10
|
||||||
& itUse . equipEffect . eeUse .~ EAmmoSource 100 100 --BulletSource
|
& itUse . equipEffect . eeUse .~ EAmmoSource 100 100 --BulletSource
|
||||||
Nothing
|
Nothing
|
||||||
@@ -93,46 +92,46 @@ jetPack :: Item
|
|||||||
jetPack =
|
jetPack =
|
||||||
defaultEquipment
|
defaultEquipment
|
||||||
& itUse . equipEffect . eeSite .~ GoesOnBack
|
& itUse . equipEffect . eeSite .~ GoesOnBack
|
||||||
& itType . iyBase .~ EQUIP JETPACK
|
& itType .~ EQUIP JETPACK
|
||||||
& itUse . equipEffect . eeAttachPos .~ V3 (-8) 0 10
|
& itUse . equipEffect . eeAttachPos .~ V3 (-8) 0 10
|
||||||
|
|
||||||
brainHat :: Item
|
brainHat :: Item
|
||||||
brainHat =
|
brainHat =
|
||||||
defaultEquipment
|
defaultEquipment
|
||||||
& itUse . equipEffect . eeSite .~ GoesOnHead
|
& itUse . equipEffect . eeSite .~ GoesOnHead
|
||||||
& itType . iyBase .~ EQUIP BRAINHAT
|
& itType .~ EQUIP BRAINHAT
|
||||||
|
|
||||||
hat :: Item
|
hat :: Item
|
||||||
hat =
|
hat =
|
||||||
defaultEquipment
|
defaultEquipment
|
||||||
& itUse . equipEffect . eeSite .~ GoesOnHead
|
& itUse . equipEffect . eeSite .~ GoesOnHead
|
||||||
& itType . iyBase .~ EQUIP HAT
|
& itType .~ EQUIP HAT
|
||||||
|
|
||||||
targetingHat :: TargetingType -> Item
|
--targetingHat :: TargetingType -> Item
|
||||||
targetingHat tt =
|
--targetingHat tt =
|
||||||
defaultEquipment
|
-- defaultEquipment
|
||||||
& itUse . equipEffect . eeSite .~ GoesOnHead
|
-- & itUse . equipEffect . eeSite .~ GoesOnHead
|
||||||
& itType . iyBase .~ EQUIP (TARGETINGHAT tt)
|
-- & itType .~ EQUIP (TARGETINGHAT tt)
|
||||||
& itUse . equipTargeting ?~ tt
|
-- & itUse . equipTargeting ?~ tt
|
||||||
|
|
||||||
headLamp :: Item
|
headLamp :: Item
|
||||||
headLamp =
|
headLamp =
|
||||||
defaultEquipment
|
defaultEquipment
|
||||||
& itUse . equipEffect . eeUse .~ EHeadLamp
|
& itUse . equipEffect . eeUse .~ EHeadLamp
|
||||||
& itUse . equipEffect . eeSite .~ GoesOnHead
|
& itUse . equipEffect . eeSite .~ GoesOnHead
|
||||||
& itType . iyBase .~ EQUIP HEADLAMP
|
& itType .~ EQUIP HEADLAMP
|
||||||
|
|
||||||
powerLegs :: Item
|
powerLegs :: Item
|
||||||
powerLegs =
|
powerLegs =
|
||||||
defaultEquipment
|
defaultEquipment
|
||||||
& itUse . equipEffect . eeSite .~ GoesOnLegs
|
& itUse . equipEffect . eeSite .~ GoesOnLegs
|
||||||
& itType . iyBase .~ EQUIP POWERLEGS
|
& itType .~ EQUIP POWERLEGS
|
||||||
|
|
||||||
speedLegs :: Item
|
speedLegs :: Item
|
||||||
speedLegs = powerLegs & itType . iyBase .~ EQUIP SPEEDLEGS
|
speedLegs = powerLegs & itType .~ EQUIP SPEEDLEGS
|
||||||
|
|
||||||
jumpLegs :: Item
|
jumpLegs :: Item
|
||||||
jumpLegs = powerLegs & itType . iyBase .~ EQUIP JUMPLEGS
|
jumpLegs = powerLegs & itType .~ EQUIP JUMPLEGS
|
||||||
|
|
||||||
wristInvisibility :: Item
|
wristInvisibility :: Item
|
||||||
wristInvisibility =
|
wristInvisibility =
|
||||||
@@ -140,4 +139,4 @@ wristInvisibility =
|
|||||||
& itUse . equipEffect . eeSite .~ GoesOnWrist
|
& itUse . equipEffect . eeSite .~ GoesOnWrist
|
||||||
& itUse . equipEffect . eeOnEquip .~ ECamouflage Invisible --overCID (crCamouflage .~ Invisible)
|
& itUse . equipEffect . eeOnEquip .~ ECamouflage Invisible --overCID (crCamouflage .~ Invisible)
|
||||||
& itUse . equipEffect . eeOnRemove .~ ECamouflage FullyVisible --overCID (crCamouflage .~ FullyVisible)
|
& itUse . equipEffect . eeOnRemove .~ ECamouflage FullyVisible --overCID (crCamouflage .~ FullyVisible)
|
||||||
& itType . iyBase .~ EQUIP (INVISIBILITYEQUIPMENT GoesOnWrist)
|
& itType .~ EQUIP (INVISIBILITYEQUIPMENT GoesOnWrist)
|
||||||
|
|||||||
@@ -11,4 +11,4 @@ boosterGun =
|
|||||||
defaultLeftItem
|
defaultLeftItem
|
||||||
& itUse . leftUse .~ LBoost
|
& itUse . leftUse .~ LBoost
|
||||||
& itUse . leftDelay .~ NoDelay
|
& itUse . leftDelay .~ NoDelay
|
||||||
& itType . iyBase .~ LEFT BOOSTER
|
& itType .~ LEFT BOOSTER
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ useBreakListsLinkTest llist rlist = LinkTest ltest rtest
|
|||||||
return $ LinkUpdate linktype (set _3 (useBreakListsLinkTest llist (tail xs))) id
|
return $ LinkUpdate linktype (set _3 (useBreakListsLinkTest llist (tail xs))) id
|
||||||
|
|
||||||
basePartiallyComposedItem :: Item -> PartiallyComposedItem
|
basePartiallyComposedItem :: Item -> PartiallyComposedItem
|
||||||
basePartiallyComposedItem itm = case itm ^. itType . iyBase of
|
basePartiallyComposedItem itm = case itm ^. itType of
|
||||||
HELD _ -> (itm, WeaponPlatformSF, useBreakListsLinkTest
|
HELD _ -> (itm, WeaponPlatformSF, useBreakListsLinkTest
|
||||||
(map (\(i,a) -> (AmmoMagSF a,AmmoInLink i a)) (IM.toList $ itm ^. itUse . heldAmmoTypes))
|
(map (\(i,a) -> (AmmoMagSF a,AmmoInLink i a)) (IM.toList $ itm ^. itUse . heldAmmoTypes))
|
||||||
[(WeaponTargetingSF,WeaponTargetingLink), (WeaponScopeSF,WeaponScopeLink)]
|
[(WeaponTargetingSF,WeaponTargetingLink), (WeaponScopeSF,WeaponScopeLink)]
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
module Dodge.Item.Held.BatteryGuns where
|
module Dodge.Item.Held.BatteryGuns
|
||||||
|
( sparkGun
|
||||||
|
, teslaGun
|
||||||
|
, lasGun
|
||||||
|
, tractorGun
|
||||||
|
) where
|
||||||
|
|
||||||
import Dodge.SoundLogic.ExternallyGeneratedSounds
|
import Dodge.SoundLogic.ExternallyGeneratedSounds
|
||||||
import Dodge.Default.Item
|
import Dodge.Default.Item
|
||||||
@@ -6,7 +11,7 @@ import Dodge.Default.Item
|
|||||||
--import Dodge.Data.Beam
|
--import Dodge.Data.Beam
|
||||||
import Color
|
import Color
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import qualified Data.Map.Strict as M
|
--import qualified Data.Map.Strict as M
|
||||||
import Dodge.Data.Item
|
import Dodge.Data.Item
|
||||||
--import Dodge.Reloading.Action
|
--import Dodge.Reloading.Action
|
||||||
import Dodge.Tesla.ItemParams
|
import Dodge.Tesla.ItemParams
|
||||||
@@ -16,36 +21,30 @@ import qualified IntMapHelp as IM
|
|||||||
sparkGun :: Item
|
sparkGun :: Item
|
||||||
sparkGun =
|
sparkGun =
|
||||||
teslaGun
|
teslaGun
|
||||||
& itType . iyBase .~ HELD SPARKGUN
|
& itType .~ HELD SPARKGUN
|
||||||
& itParams . arcSize .~ 10
|
& itParams . arcSize .~ 10
|
||||||
|
|
||||||
teslaGun :: Item
|
teslaGun :: Item
|
||||||
teslaGun =
|
teslaGun =
|
||||||
--defaultBatteryGun
|
|
||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
& itUse . heldParams .~ BeamShooterParams (Just (elecCrackleS,2))
|
& itUse . heldParams .~ BeamShooterParams (Just (elecCrackleS,2))
|
||||||
& itDimension . dimRad .~ 9
|
& itDimension . dimRad .~ 9
|
||||||
& itDimension . dimCenter .~ V3 4 0 0
|
& itDimension . dimCenter .~ V3 4 0 0
|
||||||
& itParams .~ teslaParams
|
& itParams .~ teslaParams
|
||||||
-- & itUse . heldUse .~ HeldTeslaArc --shootTeslaArc
|
|
||||||
& itUse . heldDelay .~ NoDelay
|
& itUse . heldDelay .~ NoDelay
|
||||||
-- & itUse . heldMods .~ PistolMod
|
|
||||||
& itUse . heldAim . aimWeight .~ 6
|
& itUse . heldAim . aimWeight .~ 6
|
||||||
& itUse . heldAim . aimStance .~ TwoHandFlat
|
& itUse . heldAim . aimStance .~ TwoHandFlat
|
||||||
-- & itUse . heldAim . aimMuzPos .~ 4
|
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 4 0
|
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 4 0
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ TeslaGunFlare
|
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ TeslaGunFlare
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleTesla
|
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleTesla
|
||||||
& itType . iyBase .~ HELD TESLAGUN
|
& itType .~ HELD TESLAGUN
|
||||||
& itUse . heldAmmoTypes .~ singleAmmo ElectricalAmmo
|
& itUse . heldAmmoTypes .~ singleAmmo ElectricalAmmo
|
||||||
& itUse . heldTriggerType .~ AutoTrigger
|
& itUse . heldTriggerType .~ AutoTrigger
|
||||||
|
|
||||||
lasGun :: Item
|
lasGun :: Item
|
||||||
lasGun =
|
lasGun =
|
||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
-- & itType . iyModules .~ batteryModules
|
|
||||||
-- & itUse . heldMods .~ PistolMod
|
|
||||||
& itUse . heldParams .~ BeamShooterParams (Just (tone440sawtoothquietS,2))
|
& itUse . heldParams .~ BeamShooterParams (Just (tone440sawtoothquietS,2))
|
||||||
& itUse . heldAmmoTypes .~ singleAmmo ElectricalAmmo
|
& itUse . heldAmmoTypes .~ singleAmmo ElectricalAmmo
|
||||||
& itUse . heldDelay .~ NoDelay
|
& itUse . heldDelay .~ NoDelay
|
||||||
@@ -74,7 +73,7 @@ lasGun =
|
|||||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||||
-- & itUse . heldAim . aimHandlePos .~ 5
|
-- & itUse . heldAim . aimHandlePos .~ 5
|
||||||
-- & itUse . heldAim . aimMuzPos .~ 30
|
-- & itUse . heldAim . aimMuzPos .~ 30
|
||||||
& itType . iyBase .~ HELD LASGUN
|
& itType .~ HELD LASGUN
|
||||||
|
|
||||||
lasGunTweak :: TweakParam
|
lasGunTweak :: TweakParam
|
||||||
lasGunTweak =
|
lasGunTweak =
|
||||||
@@ -92,15 +91,12 @@ tractorGun =
|
|||||||
.~ Tweakable
|
.~ Tweakable
|
||||||
{ _tweakParams = IM.fromList [(0, tractorGunTweak)]
|
{ _tweakParams = IM.fromList [(0, tractorGunTweak)]
|
||||||
}
|
}
|
||||||
-- & itUse . heldUse .~ HeldTractor --aTractorBeam
|
|
||||||
& itUse . heldDelay .~ NoDelay
|
& itUse . heldDelay .~ NoDelay
|
||||||
-- & itUse . heldMods .~ AmmoCheckMod
|
|
||||||
-- & itUse . heldMods .~ TractorMod
|
|
||||||
& itUse . heldAim . aimWeight .~ 6
|
& itUse . heldAim . aimWeight .~ 6
|
||||||
& itUse . heldAim . aimRange .~ 1
|
& itUse . heldAim . aimRange .~ 1
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ DefaultFlareType
|
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ DefaultFlareType
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleTractor
|
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleTractor
|
||||||
& itType . iyBase .~ HELD TRACTORGUN
|
& itType .~ HELD TRACTORGUN
|
||||||
|
|
||||||
tractorGunTweak :: TweakParam
|
tractorGunTweak :: TweakParam
|
||||||
tractorGunTweak =
|
tractorGunTweak =
|
||||||
|
|||||||
@@ -45,14 +45,14 @@ volleyGun i =
|
|||||||
)
|
)
|
||||||
& itUse . heldParams . torqueAfter .~ 0.15 + 0.05 * fromIntegral i
|
& itUse . heldParams . torqueAfter .~ 0.15 + 0.05 * fromIntegral i
|
||||||
& itUse . heldParams . recoil .~ 20 + 10 * fromIntegral i
|
& itUse . heldParams . recoil .~ 20 + 10 * fromIntegral i
|
||||||
& itType . iyBase .~ HELD (VOLLEYGUN i)
|
& itType .~ HELD (VOLLEYGUN i)
|
||||||
& itUse . heldAmmoTypes .~ IM.fromList (zip [0..i-1] $ repeat BulletAmmo)
|
& itUse . heldAmmoTypes .~ IM.fromList (zip [0..i-1] $ repeat BulletAmmo)
|
||||||
|
|
||||||
rifle :: Item
|
rifle :: Item
|
||||||
rifle =
|
rifle =
|
||||||
defaultBangCane
|
defaultBangCane
|
||||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||||
& itType . iyBase .~ HELD RIFLE
|
& itType .~ HELD RIFLE
|
||||||
& 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}
|
||||||
@@ -68,20 +68,15 @@ rifle =
|
|||||||
autoRifle :: Item
|
autoRifle :: Item
|
||||||
autoRifle =
|
autoRifle =
|
||||||
rifle
|
rifle
|
||||||
& itType . iyBase .~ HELD AUTORIFLE
|
& itType .~ HELD AUTORIFLE
|
||||||
& itUse . heldTriggerType .~ AutoTrigger
|
& itUse . heldTriggerType .~ AutoTrigger
|
||||||
-- & itUse . heldMods .~ AutoRifleMod
|
|
||||||
-- & itType . iyModules . at ModAutoMag ?~ EMPTYMODULE
|
|
||||||
|
|
||||||
-- & itUse . useDelay . rateMax .~ 6
|
|
||||||
burstRifle :: Item
|
burstRifle :: Item
|
||||||
burstRifle =
|
burstRifle =
|
||||||
rifle
|
rifle
|
||||||
& itType . iyBase .~ HELD BURSTRIFLE
|
& itType .~ HELD BURSTRIFLE
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0.05
|
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0.05
|
||||||
-- & itUse . heldDelay . rateMax .~ 18
|
|
||||||
& itUse . heldDelay . rateMax .~ 6
|
& itUse . heldDelay . rateMax .~ 6
|
||||||
-- & itUse . heldMods .~ BurstRifleMod
|
|
||||||
& itUse . heldParams . weaponInvLock .~ 7
|
& itUse . heldParams . weaponInvLock .~ 7
|
||||||
& itUse . heldParams . weaponRepeat .~ [3,6]
|
& itUse . heldParams . weaponRepeat .~ [3,6]
|
||||||
|
|
||||||
@@ -102,8 +97,8 @@ miniGunX i =
|
|||||||
& itUse . heldParams . sidePush .~ 10 * fromIntegral i
|
& itUse . heldParams . sidePush .~ 10 * fromIntegral i
|
||||||
& itUse . heldParams . randomOffset .~ 10
|
& itUse . heldParams . randomOffset .~ 10
|
||||||
& itUse . heldParams . rifling .~ UniRandFloat 0.8 0.9
|
& itUse . heldParams . rifling .~ UniRandFloat 0.8 0.9
|
||||||
& itInvSize .~ fromIntegral i + 1
|
& itInvSize .~ (i + 3) `div` 2
|
||||||
& itDimension . dimRad .~ 20
|
& itDimension . dimRad .~ 20
|
||||||
& itDimension . dimCenter .~ V3 5 0 0
|
& itDimension . dimCenter .~ V3 5 0 0
|
||||||
& itDimension . dimAttachPos .~ V3 5 (-5) 0
|
& itDimension . dimAttachPos .~ V3 5 (-5) 0
|
||||||
& itType . iyBase .~ HELD (MINIGUNX i)
|
& itType .~ HELD (MINIGUNX i)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ bangCone =
|
|||||||
& itUse . heldParams . torqueAfter .~ 0.1
|
& itUse . heldParams . torqueAfter .~ 0.1
|
||||||
& itUse . heldParams . randomOffset .~ 12
|
& itUse . heldParams . randomOffset .~ 12
|
||||||
& itUse . heldParams . bulGunSound ?~ (bangEchoS,0)
|
& itUse . heldParams . bulGunSound ?~ (bangEchoS,0)
|
||||||
& itType . iyBase .~ HELD BANGCONE
|
& itType .~ HELD BANGCONE
|
||||||
|
|
||||||
blunderbuss :: Item
|
blunderbuss :: Item
|
||||||
blunderbuss =
|
blunderbuss =
|
||||||
@@ -33,12 +33,12 @@ blunderbuss =
|
|||||||
& itUse . heldAim . aimWeight .~ 6
|
& itUse . heldAim . aimWeight .~ 6
|
||||||
-- & itUse . heldAim . aimHandlePos .~ 5
|
-- & itUse . heldAim . aimHandlePos .~ 5
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos . _x .~ 30
|
& itUse . heldAim . aimMuzzles . ix 0 . mzPos . _x .~ 30
|
||||||
& itType . iyBase .~ HELD BLUNDERBUSS
|
& itType .~ HELD BLUNDERBUSS
|
||||||
|
|
||||||
grapeCannon :: Int -> Item
|
grapeCannon :: Int -> Item
|
||||||
grapeCannon i =
|
grapeCannon i =
|
||||||
blunderbuss
|
blunderbuss
|
||||||
& itType . iyBase .~ HELD (GRAPECANNON i)
|
& itType .~ HELD (GRAPECANNON i)
|
||||||
& itUse . heldParams . recoil .~ (150 + fromIntegral i * 50)
|
& itUse . heldParams . recoil .~ (150 + fromIntegral i * 50)
|
||||||
& itUse . heldParams . torqueAfter .~ (0.1 + 0.2 * fromIntegral i)
|
& itUse . heldParams . torqueAfter .~ (0.1 + 0.2 * fromIntegral i)
|
||||||
& itUse . heldParams . randomOffset .~ (12 + 4 * fromIntegral i)
|
& itUse . heldParams . randomOffset .~ (12 + 4 * fromIntegral i)
|
||||||
|
|||||||
@@ -26,19 +26,13 @@ launcher =
|
|||||||
& itDimension . dimRad .~ 9
|
& itDimension . dimRad .~ 9
|
||||||
& itDimension . dimCenter .~ V3 10 0 0
|
& itDimension . dimCenter .~ V3 10 0 0
|
||||||
& itUse . heldDelay . rateMax .~ 20
|
& itUse . heldDelay . rateMax .~ 20
|
||||||
-- & itUse . heldUse .~ HeldPJCreation --usePjCreation
|
|
||||||
-- & itUse . heldMods .~ LauncherMod
|
|
||||||
-- & itUse . heldMods .~ PistolMod
|
|
||||||
& itUse . heldAim . aimWeight .~ 8
|
& itUse . heldAim . aimWeight .~ 8
|
||||||
& itUse . heldAim . aimRange .~ 0.5
|
& itUse . heldAim . aimRange .~ 0.5
|
||||||
& itUse . heldAim . aimStance .~ TwoHandOver
|
& itUse . heldAim . aimStance .~ TwoHandOver
|
||||||
-- & itUse . heldAim . aimHandlePos .~ V2 3 0
|
|
||||||
-- & itUse . heldAim . aimMuzPos .~ 20
|
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleLauncher
|
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleLauncher
|
||||||
& itUse . heldAmmoTypes .~ singleAmmo ProjectileAmmo
|
& itUse . heldAmmoTypes .~ singleAmmo ProjectileAmmo
|
||||||
& itType . iyBase .~ HELD LAUNCHER
|
& itType .~ HELD LAUNCHER
|
||||||
-- & itType . iyModules . at ModLauncherHoming ?~ EMPTYMODULE
|
|
||||||
& itUse . heldParams . muzVel .~ ConstFloat 0
|
& itUse . heldParams . muzVel .~ ConstFloat 0
|
||||||
& itUse . heldParams . rifling .~ ConstFloat 0
|
& itUse . heldParams . rifling .~ ConstFloat 0
|
||||||
& itUse . heldParams . recoil .~ 0
|
& itUse . heldParams . recoil .~ 0
|
||||||
@@ -48,9 +42,7 @@ launcher =
|
|||||||
launcherX :: Int -> Item
|
launcherX :: Int -> Item
|
||||||
launcherX i =
|
launcherX i =
|
||||||
launcher
|
launcher
|
||||||
& itType . iyBase .~ HELD (LAUNCHERX i)
|
& itType .~ HELD (LAUNCHERX i)
|
||||||
-- & itUse . heldUse .~ HeldPJCreationX i
|
|
||||||
-- & itUse . heldMods .~ LauncherXMod i
|
|
||||||
& itUse . heldAim . aimMuzzles .~ getZipList
|
& itUse . heldAim . aimMuzzles .~ getZipList
|
||||||
(ZipList [Muzzle (V2 20 0) a 0 | a <- angles]
|
(ZipList [Muzzle (V2 20 0) a 0 | a <- angles]
|
||||||
<*> ZipList [0..]
|
<*> ZipList [0..]
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ bangRod =
|
|||||||
& itUse . heldDelay . rateMax .~ 12
|
& itUse . heldDelay . rateMax .~ 12
|
||||||
& itDimension . dimRad .~ 12
|
& itDimension . dimRad .~ 12
|
||||||
& itDimension . dimCenter .~ V3 5 0 0
|
& itDimension . dimCenter .~ V3 5 0 0
|
||||||
& itType . iyBase .~ HELD BANGROD
|
& itType .~ HELD BANGROD
|
||||||
& itUse . heldAim . aimWeight .~ 8
|
& itUse . heldAim . aimWeight .~ 8
|
||||||
& itUse . heldAim . aimRange .~ 1
|
& itUse . heldAim . aimRange .~ 1
|
||||||
& itUse . heldAim . aimStance .~ OneHand
|
& itUse . heldAim . aimStance .~ OneHand
|
||||||
@@ -38,7 +38,7 @@ bangRod =
|
|||||||
elephantGun :: Item
|
elephantGun :: Item
|
||||||
elephantGun =
|
elephantGun =
|
||||||
bangRod
|
bangRod
|
||||||
& itType . iyBase .~ HELD ELEPHANTGUN
|
& itType .~ HELD ELEPHANTGUN
|
||||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0.05
|
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0.05
|
||||||
& itUse . heldParams . recoil .~ 50
|
& itUse . heldParams . recoil .~ 50
|
||||||
@@ -46,17 +46,17 @@ elephantGun =
|
|||||||
amr :: Item
|
amr :: Item
|
||||||
amr =
|
amr =
|
||||||
elephantGun
|
elephantGun
|
||||||
& itType . iyBase .~ HELD AMR
|
& itType .~ HELD AMR
|
||||||
|
|
||||||
autoAmr :: Item
|
autoAmr :: Item
|
||||||
autoAmr =
|
autoAmr =
|
||||||
amr
|
amr
|
||||||
& itType . iyBase .~ HELD AUTOAMR
|
& itType .~ HELD AUTOAMR
|
||||||
|
|
||||||
sniperRifle :: Item
|
sniperRifle :: Item
|
||||||
sniperRifle =
|
sniperRifle =
|
||||||
elephantGun
|
elephantGun
|
||||||
& itType . iyBase .~ HELD SNIPERRIFLE
|
& itType .~ HELD SNIPERRIFLE
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 0.5, _izMin = 0.5,_izFac = 1}
|
& itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 0.5, _izMin = 0.5,_izFac = 1}
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,8 @@ import LensHelp
|
|||||||
poisonSprayer :: Item
|
poisonSprayer :: Item
|
||||||
poisonSprayer =
|
poisonSprayer =
|
||||||
flameThrower
|
flameThrower
|
||||||
& itType . iyBase .~ HELD POISONSPRAYER
|
& itType .~ HELD POISONSPRAYER
|
||||||
& itUse . heldAmmoTypes .~ singleAmmo GasAmmo
|
& itUse . heldAmmoTypes .~ singleAmmo GasAmmo
|
||||||
-- & itUse . heldMods .~ PoisonSprayerMod
|
|
||||||
& itUse . heldParams . gasCreation .~ CreatePoisonGas --aGasCloud
|
& itUse . heldParams . gasCreation .~ CreatePoisonGas --aGasCloud
|
||||||
& itUse . heldParams . recoil .~ 0
|
& itUse . heldParams . recoil .~ 0
|
||||||
& itUse . heldParams . torqueAfter .~ 0
|
& itUse . heldParams . torqueAfter .~ 0
|
||||||
@@ -30,11 +29,9 @@ poisonSprayer =
|
|||||||
flameSpitter :: Item
|
flameSpitter :: Item
|
||||||
flameSpitter =
|
flameSpitter =
|
||||||
flameThrower
|
flameThrower
|
||||||
& itType . iyBase .~ HELD FLAMESPITTER
|
& itType .~ HELD FLAMESPITTER
|
||||||
-- & itParams . sprayNozzles . ix 0 . nzPressure .~ 4
|
|
||||||
& itUse . heldAim . aimStance .~ OneHand
|
& itUse . heldAim . aimStance .~ OneHand
|
||||||
& itUse . heldDelay .~ FixedRate{_rateMax = 3, _rateTime = 0}
|
& itUse . heldDelay .~ FixedRate{_rateMax = 3, _rateTime = 0}
|
||||||
-- & itUse . heldMods .~ FlameSpitterMod
|
|
||||||
& itUse . heldParams . weaponInvLock .~ 10
|
& itUse . heldParams . weaponInvLock .~ 10
|
||||||
& itUse . heldParams . weaponRepeat .~ [1..9]
|
& itUse . heldParams . weaponRepeat .~ [1..9]
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect . nzPressure .~ UniRandFloat 3 4
|
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect . nzPressure .~ UniRandFloat 3 4
|
||||||
@@ -43,7 +40,7 @@ flameSpitter =
|
|||||||
flameTorrent :: Item
|
flameTorrent :: Item
|
||||||
flameTorrent =
|
flameTorrent =
|
||||||
flameThrower
|
flameThrower
|
||||||
& itType . iyBase .~ HELD FLAMETORRENT
|
& itType .~ HELD FLAMETORRENT
|
||||||
& itUse . heldAim . aimZoom .~ defaultItZoom
|
& itUse . heldAim . aimZoom .~ defaultItZoom
|
||||||
-- & itParams . sprayNozzles . ix 0
|
-- & itParams . sprayNozzles . ix 0
|
||||||
-- %~ ( (nzPressure .~ 10)
|
-- %~ ( (nzPressure .~ 10)
|
||||||
@@ -54,12 +51,12 @@ flameTorrent =
|
|||||||
blowTorch :: Item
|
blowTorch :: Item
|
||||||
blowTorch =
|
blowTorch =
|
||||||
flameThrower
|
flameThrower
|
||||||
& itType . iyBase .~ HELD BLOWTORCH
|
& itType .~ HELD BLOWTORCH
|
||||||
|
|
||||||
flameWall :: Item
|
flameWall :: Item
|
||||||
flameWall =
|
flameWall =
|
||||||
flameThrower
|
flameThrower
|
||||||
& itType . iyBase .~ HELD FLAMEWALL
|
& itType .~ HELD FLAMEWALL
|
||||||
-- & itParams . sprayNozzles .~ zipWith makeNozzle [0, 0.6, -0.6] [2, 2.5, 2.5]
|
-- & itParams . sprayNozzles .~ zipWith makeNozzle [0, 0.6, -0.6] [2, 2.5, 2.5]
|
||||||
-- where
|
-- where
|
||||||
-- makeNozzle dir pres =
|
-- makeNozzle dir pres =
|
||||||
@@ -94,7 +91,7 @@ flameThrower =
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
& itUse . heldAmmoTypes .~ singleAmmo GasAmmo
|
& itUse . heldAmmoTypes .~ singleAmmo GasAmmo
|
||||||
& itType . iyBase .~ HELD FLAMETHROWER
|
& itType .~ HELD FLAMETHROWER
|
||||||
& itUse . heldParams .~ GasSprayParams
|
& itUse . heldParams .~ GasSprayParams
|
||||||
{_gasCreation = CreateFlame
|
{_gasCreation = CreateFlame
|
||||||
, _recoil = 0
|
, _recoil = 0
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ bangStick i =
|
|||||||
defaultBulletWeapon
|
defaultBulletWeapon
|
||||||
& itUse . heldParams . recoil .~ 25
|
& itUse . heldParams . recoil .~ 25
|
||||||
& itUse . heldParams . torqueAfter .~ 0.18 + 0.02 * fromIntegral i
|
& itUse . heldParams . torqueAfter .~ 0.18 + 0.02 * fromIntegral i
|
||||||
& itType . iyBase .~ HELD (BANGSTICK i)
|
& itType .~ HELD (BANGSTICK i)
|
||||||
& itInvSize .~ fromIntegral i / 3
|
& itInvSize .~ max 1 (i `div` 2)
|
||||||
& itDimension . dimRad .~ 5
|
& itDimension . dimRad .~ 5
|
||||||
& itDimension . dimCenter .~ V3 5 0 0
|
& itDimension . dimCenter .~ V3 5 0 0
|
||||||
& itUse . heldDelay . rateMax .~ 8
|
& itUse . heldDelay . rateMax .~ 8
|
||||||
@@ -35,9 +35,7 @@ baseStickSpread = 0.2
|
|||||||
pistol :: Item
|
pistol :: Item
|
||||||
pistol =
|
pistol =
|
||||||
bangStick 1
|
bangStick 1
|
||||||
-- & itUse . heldAmmoTypes .~ [BulletAmmo]
|
|
||||||
& itUse . heldDelay . rateMax .~ 6
|
& itUse . heldDelay . rateMax .~ 6
|
||||||
-- & itUse . heldMods .~ PistolMod
|
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos %~ const (V2 10 0)
|
& itUse . heldAim . aimMuzzles . ix 0 . mzPos %~ const (V2 10 0)
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy %~ const 0.05
|
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy %~ const 0.05
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType %~ const PistolFlare
|
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType %~ const PistolFlare
|
||||||
@@ -48,35 +46,28 @@ pistol =
|
|||||||
. (torqueAfter .~ 0.2)
|
. (torqueAfter .~ 0.2)
|
||||||
. (sidePush .~ 50)
|
. (sidePush .~ 50)
|
||||||
)
|
)
|
||||||
& itType . iyBase .~ HELD PISTOL
|
& itType .~ HELD PISTOL
|
||||||
|
|
||||||
autoPistol :: Item
|
autoPistol :: Item
|
||||||
autoPistol =
|
autoPistol =
|
||||||
pistol
|
pistol
|
||||||
-- & itUse . heldMods .~ PistolMod
|
|
||||||
& itUse . heldTriggerType .~ AutoTrigger
|
& itUse . heldTriggerType .~ AutoTrigger
|
||||||
& itUse . heldParams . bulGunSound ?~ (tap1S,0)
|
& itUse . heldParams . bulGunSound ?~ (tap1S,0)
|
||||||
& itType . iyBase .~ HELD AUTOPISTOL
|
& itType .~ HELD AUTOPISTOL
|
||||||
-- & itType . iyModules . at ModAutoMag ?~ EMPTYMODULE
|
|
||||||
|
|
||||||
machinePistol :: Item
|
machinePistol :: Item
|
||||||
machinePistol =
|
machinePistol =
|
||||||
autoPistol
|
autoPistol
|
||||||
& itUse . heldDelay .~ WarmUpNoDelay {_warmTime = 0, _warmMax = 50, _warmSound = crankSlowS}
|
& itUse . heldDelay .~ WarmUpNoDelay {_warmTime = 0, _warmMax = 50, _warmSound = crankSlowS}
|
||||||
--rateMax .~ 2
|
& itType .~ HELD MACHINEPISTOL
|
||||||
-- & itUse . heldMods .~ PistolMod -- (ammoCheckI : machinePistolAfterHamMods)
|
|
||||||
& itType . iyBase .~ HELD MACHINEPISTOL
|
|
||||||
-- & itType . iyModules . at ModAutoMag .~ Nothing
|
|
||||||
& itUse . heldParams . recoil .~ 20
|
& itUse . heldParams . recoil .~ 20
|
||||||
|
|
||||||
smg :: Item
|
smg :: Item
|
||||||
smg =
|
smg =
|
||||||
autoPistol -- & some parameter affecting stability
|
autoPistol -- & some parameter affecting stability
|
||||||
-- & itUse . heldMods .~ PistolMod --(ammoCheckI : smgAfterHamMods)
|
& itType .~ HELD SMG
|
||||||
& itType . iyBase .~ HELD SMG
|
|
||||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 20 0
|
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 20 0
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||||
-- & itUse . heldAim . aimHandlePos .~ 2
|
|
||||||
& itUse . heldParams . torqueAfter .~ 0.05
|
& itUse . heldParams . torqueAfter .~ 0.05
|
||||||
& itUse . heldParams . sidePush .~ 30
|
& itUse . heldParams . sidePush .~ 30
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ flatShield =
|
|||||||
& itUse . heldAim . aimStance .~ TwoHandFlat
|
& itUse . heldAim . aimStance .~ TwoHandFlat
|
||||||
-- & itUse . heldAim . aimHandlePos .~ 0
|
-- & itUse . heldAim . aimHandlePos .~ 0
|
||||||
& itInvSize .~ 3
|
& itInvSize .~ 3
|
||||||
& itType . iyBase .~ HELD FLATSHIELD
|
& itType .~ HELD FLATSHIELD
|
||||||
|
|
||||||
keyCard :: Int -> Item
|
keyCard :: Int -> Item
|
||||||
keyCard n = defaultHeldItem & itType . iyBase .~ HELD (KEYCARD n)
|
keyCard n = defaultHeldItem & itType .~ HELD (KEYCARD n)
|
||||||
|
|
||||||
latchkey :: Int -> Item
|
latchkey :: Int -> Item
|
||||||
latchkey _ = defaultHeldItem
|
latchkey _ = defaultHeldItem
|
||||||
@@ -27,7 +27,7 @@ torch :: Item
|
|||||||
torch =
|
torch =
|
||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
& itEffect . ieInv .~ EffectWhileRoot CreateHeldLight
|
& itEffect . ieInv .~ EffectWhileRoot CreateHeldLight
|
||||||
& itType . iyBase .~ HELD TORCH
|
& itType .~ HELD TORCH
|
||||||
-- & itUse . heldAim . aimHandlePos .~ 5
|
-- & itUse . heldAim . aimHandlePos .~ 5
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos . _x .~ 10
|
& itUse . heldAim . aimMuzzles . ix 0 . mzPos . _x .~ 10
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ forceFieldGun =
|
|||||||
-- & itUse . heldMods .~ ForceFieldMod -- this is slightly different
|
-- & itUse . heldMods .~ ForceFieldMod -- this is slightly different
|
||||||
-- than the list below
|
-- than the list below
|
||||||
--[ hammerCheckI , ammoCheckI , useAmmoAmount 1]
|
--[ hammerCheckI , ammoCheckI , useAmmoAmount 1]
|
||||||
& itType . iyBase .~ HELD FORCEFIELDGUN
|
& itType .~ HELD FORCEFIELDGUN
|
||||||
& itUse . heldAmmoTypes .~ singleAmmo ElectricalAmmo
|
& itUse . heldAmmoTypes .~ singleAmmo ElectricalAmmo
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleForceField
|
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleForceField
|
||||||
|
|
||||||
@@ -54,10 +54,7 @@ clickDetector :: Detector -> Item
|
|||||||
clickDetector dt =
|
clickDetector dt =
|
||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
& itUse . heldDelay . rateMax .~ 20
|
& itUse . heldDelay . rateMax .~ 20
|
||||||
-- & itUse . heldUse .~ HeldDetectorEffect dt --detectorEffect dt
|
|
||||||
-- & itUse . heldMods .~ AmmoUseCheckMod
|
|
||||||
-- & itUse . heldMods .~ DetectorMod dt --detectorEffect dt
|
|
||||||
& itUse . heldAim . aimRange .~ 1
|
& itUse . heldAim . aimRange .~ 1
|
||||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1}
|
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1}
|
||||||
& itType . iyBase .~ HELD (HELDDETECTOR dt)
|
& itType .~ HELD (HELDDETECTOR dt)
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleDetector
|
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleDetector
|
||||||
|
|||||||
@@ -8,12 +8,10 @@ import Linear.V2
|
|||||||
shatterGun :: Item
|
shatterGun :: Item
|
||||||
shatterGun =
|
shatterGun =
|
||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
& itType . iyBase .~ HELD SHATTERGUN
|
& itType .~ HELD SHATTERGUN
|
||||||
& itUse . heldDelay . rateMax .~ 10
|
& itUse . heldDelay . rateMax .~ 10
|
||||||
& itUse . heldAmmoTypes .~ singleAmmo ElectricalAmmo
|
& itUse . heldAmmoTypes .~ singleAmmo ElectricalAmmo
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 30 0
|
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 30 0
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleShatter
|
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleShatter
|
||||||
-- & itUse . heldUse .~ HeldShatter --shootShatter
|
|
||||||
-- & itUse . heldMods .~ ShatterMod
|
|
||||||
& itUse . heldAim . aimStance .~ TwoHandFlat
|
& itUse . heldAim . aimStance .~ TwoHandFlat
|
||||||
|
|||||||
+21
-54
@@ -1,25 +1,26 @@
|
|||||||
module Dodge.Item.Info where
|
module Dodge.Item.Info
|
||||||
|
( itemInfo
|
||||||
|
) where
|
||||||
|
|
||||||
import Data.Char
|
import Data.Char
|
||||||
import qualified Data.Map.Strict as M
|
--import qualified Data.Map.Strict as M
|
||||||
import Dodge.Data.Item
|
import Dodge.Data.Item
|
||||||
import Dodge.Module.Info
|
--import Dodge.Module.Info
|
||||||
import LensHelp
|
import LensHelp
|
||||||
import StringHelp
|
--import StringHelp
|
||||||
|
|
||||||
itemInfo :: Item -> String
|
itemInfo :: Item -> String
|
||||||
itemInfo itm =
|
itemInfo itm =
|
||||||
itmBaseInfo itm ++ " " ++ itmUsageInfo itm
|
itmBaseInfo itm ++ " " ++ itmUsageInfo itm
|
||||||
++ itmSpaceInfo itm
|
++ itmSpaceInfo itm
|
||||||
-- ++ itmModuleInfo (itm ^. itType . iyModules)
|
|
||||||
|
|
||||||
itmSpaceInfo :: Item -> String
|
itmSpaceInfo :: Item -> String
|
||||||
itmSpaceInfo itm = case ceiling $ _itInvSize itm of
|
itmSpaceInfo itm = case _itInvSize itm of
|
||||||
1 -> " It takes up one inventory slot. "
|
1 -> " It takes up one inventory slot. "
|
||||||
x -> " It takes up " ++ showInt x ++ " inventory slots. "
|
x -> " It takes up " ++ showInt x ++ " inventory slots. "
|
||||||
|
|
||||||
itmBaseInfo :: Item -> String
|
itmBaseInfo :: Item -> String
|
||||||
itmBaseInfo itm = case itm ^. itType . iyBase of
|
itmBaseInfo itm = case itm ^. itType of
|
||||||
HELD hit -> heldInfo hit
|
HELD hit -> heldInfo hit
|
||||||
LEFT lit -> leftInfo lit
|
LEFT lit -> leftInfo lit
|
||||||
EQUIP eit -> equipInfo eit
|
EQUIP eit -> equipInfo eit
|
||||||
@@ -112,7 +113,6 @@ equipInfo eit = case eit of
|
|||||||
INVISIBILITYEQUIPMENT _ -> "A device that bends light around its user."
|
INVISIBILITYEQUIPMENT _ -> "A device that bends light around its user."
|
||||||
BRAINHAT -> "An iq enhancer. Useless."
|
BRAINHAT -> "An iq enhancer. Useless."
|
||||||
HAT -> "A hat."
|
HAT -> "A hat."
|
||||||
TARGETINGHAT tt -> "Headwear that " ++ targetingInfo tt
|
|
||||||
HEADLAMP -> "A torch strapped to a hat."
|
HEADLAMP -> "A torch strapped to a hat."
|
||||||
POWERLEGS -> "Strength enhancing legs."
|
POWERLEGS -> "Strength enhancing legs."
|
||||||
SPEEDLEGS -> "Speed enhancing legs."
|
SPEEDLEGS -> "Speed enhancing legs."
|
||||||
@@ -124,13 +124,13 @@ equipInfo eit = case eit of
|
|||||||
BATTERYPACK -> "A collection of batteries with a universal adapter."
|
BATTERYPACK -> "A collection of batteries with a universal adapter."
|
||||||
AUTODETECTOR d -> "A device that detects " ++ detectorInfo d ++ " in an expanding radius. Pulses automatically. "
|
AUTODETECTOR d -> "A device that detects " ++ detectorInfo d ++ " in an expanding radius. Pulses automatically. "
|
||||||
|
|
||||||
targetingInfo :: TargetingType -> String
|
--targetingInfo :: TargetingType -> String
|
||||||
targetingInfo tt = case tt of
|
--targetingInfo tt = case tt of
|
||||||
TARGETLASER -> "creates a laser, the end of which becomes the target."
|
-- TARGETLASER -> "creates a laser, the end of which becomes the target."
|
||||||
TargetRBPress -> "creates a fixed target."
|
-- TargetRBPress -> "creates a fixed target."
|
||||||
TargetRBLine -> "creates a line target."
|
-- TargetRBLine -> "creates a line target."
|
||||||
TargetRBCreature -> "targets a creature."
|
-- TargetRBCreature -> "targets a creature."
|
||||||
TargetCursor -> "creates a moving target."
|
-- TargetCursor -> "creates a moving target."
|
||||||
|
|
||||||
consumableInfo :: ConsumableItemType -> String
|
consumableInfo :: ConsumableItemType -> String
|
||||||
consumableInfo cit = case cit of
|
consumableInfo cit = case cit of
|
||||||
@@ -199,7 +199,7 @@ detectorInfo d = case d of
|
|||||||
WALLDETECTOR -> "walls"
|
WALLDETECTOR -> "walls"
|
||||||
|
|
||||||
itmUsageInfo :: Item -> String
|
itmUsageInfo :: Item -> String
|
||||||
itmUsageInfo itm = case itm ^. itType . iyBase of
|
itmUsageInfo itm = case itm ^. itType of
|
||||||
HELD _ -> heldPositionInfo itm
|
HELD _ -> heldPositionInfo itm
|
||||||
LEFT _ ->
|
LEFT _ ->
|
||||||
"This item can be equipped" ++ itmEquipSiteInfo itm
|
"This item can be equipped" ++ itmEquipSiteInfo itm
|
||||||
@@ -219,8 +219,6 @@ aimStanceInfo as = case as of
|
|||||||
TwoHandFlat -> "It is held in two hands at its sides."
|
TwoHandFlat -> "It is held in two hands at its sides."
|
||||||
OneHand -> "It is held in one hand."
|
OneHand -> "It is held in one hand."
|
||||||
|
|
||||||
-- LeaveHolstered -> "It is to be left holstered."
|
|
||||||
|
|
||||||
itmEquipSiteInfo :: Item -> String
|
itmEquipSiteInfo :: Item -> String
|
||||||
itmEquipSiteInfo = maybe "" equipSiteInfo . (^? itUse . equipEffect . eeSite)
|
itmEquipSiteInfo = maybe "" equipSiteInfo . (^? itUse . equipEffect . eeSite)
|
||||||
|
|
||||||
@@ -232,39 +230,8 @@ equipSiteInfo es = case es of
|
|||||||
GoesOnWrist -> " on a wrist"
|
GoesOnWrist -> " on a wrist"
|
||||||
GoesOnLegs -> " on both legs"
|
GoesOnLegs -> " on both legs"
|
||||||
|
|
||||||
--itmModuleInfo :: M.Map ModuleSlot ItemModuleType -> String
|
--makeCommaList :: [String] -> String
|
||||||
--itmModuleInfo m
|
--makeCommaList [] = ""
|
||||||
-- | m == mempty = ""
|
--makeCommaList [x] = x ++ "."
|
||||||
-- | otherwise = mms ++ ems
|
--makeCommaList [x, y] = x ++ " and " ++ y ++ "."
|
||||||
-- where
|
--makeCommaList (x : xs) = x ++ ", " ++ makeCommaList xs
|
||||||
-- (mademods, emptymods) = M.partition (/= EMPTYMODULE) m
|
|
||||||
-- mms
|
|
||||||
-- | mademods == mempty = ""
|
|
||||||
-- | otherwise =
|
|
||||||
-- " Modifications have been made "
|
|
||||||
-- ++ makeCommaList (map moduleInfo $ M.keys mademods)
|
|
||||||
-- ems
|
|
||||||
-- | emptymods == mempty = ""
|
|
||||||
-- | otherwise =
|
|
||||||
-- " Modifications can be made "
|
|
||||||
-- ++ makeCommaList (map moduleInfo $ M.keys emptymods)
|
|
||||||
|
|
||||||
makeCommaList :: [String] -> String
|
|
||||||
makeCommaList [] = ""
|
|
||||||
makeCommaList [x] = x ++ "."
|
|
||||||
makeCommaList [x, y] = x ++ " and " ++ y ++ "."
|
|
||||||
makeCommaList (x : xs) = x ++ ", " ++ makeCommaList xs
|
|
||||||
|
|
||||||
--moduleInfo :: ModuleSlot -> String
|
|
||||||
--moduleInfo imt = case imt of
|
|
||||||
-- ModBulletCollision -> "to affect how fired bullets collide with objects"
|
|
||||||
-- ModBulletPayload -> "to bullet payloads"
|
|
||||||
-- ModRifleMag -> "to the magazine"
|
|
||||||
-- ModAutoMag -> "to the magazine"
|
|
||||||
-- ModTarget -> "to add a targeting system or scope"
|
|
||||||
-- ModBulletTrajectory -> "to utilize any installed targeting system to affect the trajectory of fired bullets"
|
|
||||||
-- ModLauncherHoming -> "to add a homing system"
|
|
||||||
-- ModBattery -> "to its battery system"
|
|
||||||
-- ModTeleport -> "to add a teleporation system"
|
|
||||||
-- ModDualBeam -> "to the dual beams"
|
|
||||||
-- ModHeldAttach -> "to add an attachment that may have any number of effects"
|
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
module Dodge.Item.InventoryColor where
|
module Dodge.Item.InventoryColor
|
||||||
|
( itemInvColor
|
||||||
|
) where
|
||||||
|
|
||||||
import Color
|
import Color
|
||||||
import Dodge.Data.Item
|
import Dodge.Data.Item
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
|
|
||||||
itemInvColor :: Item -> Color
|
itemInvColor :: Item -> Color
|
||||||
itemInvColor itm = case itm ^. itType . iyBase of
|
itemInvColor itm = case itm ^. itType of
|
||||||
HELD {} -> white
|
HELD {} -> white
|
||||||
LEFT {} -> cyan
|
LEFT {} -> cyan
|
||||||
EQUIP {} -> yellow
|
EQUIP {} -> yellow
|
||||||
|
|||||||
+9
-13
@@ -15,22 +15,18 @@ import Dodge.Data.Item
|
|||||||
import Dodge.Default.Item
|
import Dodge.Default.Item
|
||||||
|
|
||||||
zoomScope :: Item
|
zoomScope :: Item
|
||||||
zoomScope =
|
zoomScope = defaultHeldItem
|
||||||
defaultHeldItem
|
& itType .~ ATTACH ZOOMSCOPE
|
||||||
& itType . iyBase .~ ATTACH ZOOMSCOPE
|
|
||||||
-- & itUse .~ AttachUse (ScrollAttachParams (ZoomScrollParams{_opticPos = 0, _opticZoom = 1, _opticDefaultZoom = 0.5}))
|
|
||||||
& itUse .~ ScopeUse OpticScope{_opticPos = 0, _opticZoom = 1, _opticDefaultZoom = 0.5}
|
& itUse .~ ScopeUse OpticScope{_opticPos = 0, _opticZoom = 1, _opticDefaultZoom = 0.5}
|
||||||
|
|
||||||
targetingScope :: TargetingType -> Item
|
targetingScope :: TargetingType -> Item
|
||||||
targetingScope tt =
|
targetingScope tt = defaultHeldItem
|
||||||
defaultHeldItem
|
& itType .~ TARGETING tt
|
||||||
& itType . iyBase .~ TARGETING tt
|
|
||||||
& itUse .~ TargetingUse Nothing Nothing False
|
& itUse .~ TargetingUse Nothing Nothing False
|
||||||
|
|
||||||
homingModule :: Item
|
homingModule :: Item
|
||||||
homingModule =
|
homingModule = defaultHeldItem
|
||||||
defaultHeldItem
|
& itType .~ ATTACH HOMINGMODULE
|
||||||
& itType . iyBase .~ ATTACH HOMINGMODULE
|
|
||||||
& itUse .~ AttachUse Nothing
|
& itUse .~ AttachUse Nothing
|
||||||
|
|
||||||
fletchingModule :: Item
|
fletchingModule :: Item
|
||||||
@@ -39,7 +35,7 @@ fletchingModule = bulletTargetingModule FlechetteTrajectoryType
|
|||||||
bulletModule :: BulletMod -> Item
|
bulletModule :: BulletMod -> Item
|
||||||
bulletModule bm =
|
bulletModule bm =
|
||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
& itType . iyBase .~ BULLETMOD bm
|
& itType .~ BULLETMOD bm
|
||||||
& itUse .~ BulletModUse bm
|
& itUse .~ BulletModUse bm
|
||||||
|
|
||||||
bulletTargetingModule :: BulletTrajectoryType -> Item
|
bulletTargetingModule :: BulletTrajectoryType -> Item
|
||||||
@@ -50,11 +46,11 @@ bulletPayloadModule = bulletModule . BulletModPayload
|
|||||||
|
|
||||||
augmentedHUD :: Item
|
augmentedHUD :: Item
|
||||||
augmentedHUD = defaultHeldItem
|
augmentedHUD = defaultHeldItem
|
||||||
& itType . iyBase .~ ATTACH AUGMENTEDHUD
|
& itType .~ ATTACH AUGMENTEDHUD
|
||||||
& itUse .~ AttachUse Nothing
|
& itUse .~ AttachUse Nothing
|
||||||
|
|
||||||
remoteScreen :: Item
|
remoteScreen :: Item
|
||||||
remoteScreen =
|
remoteScreen =
|
||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
& itType . iyBase .~ ATTACH REMOTESCREEN
|
& itType .~ ATTACH REMOTESCREEN
|
||||||
& itUse .~ AttachUse Nothing
|
& itUse .~ AttachUse Nothing
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
module Dodge.Item.SlotsTaken (
|
|
||||||
itSlotsTaken,
|
|
||||||
) where
|
|
||||||
|
|
||||||
--import Control.Lens
|
|
||||||
import Dodge.Data.Item
|
|
||||||
import Dodge.Module
|
|
||||||
|
|
||||||
itSlotsTaken :: Item -> Int
|
|
||||||
itSlotsTaken it = ceiling (_itInvSize it)
|
|
||||||
--itSlotsTaken it = moduleSizes it + ceiling (_itInvSize it)
|
|
||||||
|
|
||||||
--itSlotsTaken :: Item -> Int
|
|
||||||
--itSlotsTaken it = case it ^? itUse . useAmount of
|
|
||||||
-- Nothing -> moduleSizes it + ceiling (_itInvSize it)
|
|
||||||
-- Just i -> moduleSizes it + ceiling (_itInvSize it * fromIntegral i)
|
|
||||||
@@ -17,7 +17,7 @@ droneLauncher =
|
|||||||
& itUse . heldAim . aimRange .~ 0.5
|
& itUse . heldAim . aimRange .~ 0.5
|
||||||
& itUse . heldAim . aimStance .~ TwoHandOver
|
& itUse . heldAim . aimStance .~ TwoHandOver
|
||||||
& itUse . heldAmmoTypes .~ singleAmmo DroneAmmo
|
& itUse . heldAmmoTypes .~ singleAmmo DroneAmmo
|
||||||
& itType . iyBase .~ HELD DRONELAUNCHER
|
& itType .~ HELD DRONELAUNCHER
|
||||||
|
|
||||||
lasDronesPic :: Item -> SPic
|
lasDronesPic :: Item -> SPic
|
||||||
lasDronesPic _ =
|
lasDronesPic _ =
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ autoDetector dt =
|
|||||||
& itUse . equipEffect . eeUse .~ EDetector dt --autoEffect (detectorEffect dt) 100 click1S
|
& itUse . equipEffect . eeUse .~ EDetector dt --autoEffect (detectorEffect dt) 100 click1S
|
||||||
& itUse . equipEffect . eeParams .~ EquipCounter 0
|
& itUse . equipEffect . eeParams .~ EquipCounter 0
|
||||||
& itUse . equipEffect . eeViewDist ?~ 350
|
& itUse . equipEffect . eeViewDist ?~ 350
|
||||||
& itType . iyBase .~ EQUIP (AUTODETECTOR dt)
|
& itType .~ EQUIP (AUTODETECTOR dt)
|
||||||
|
|
||||||
-- , _itEffect = autoRadarEffect
|
-- , _itEffect = autoRadarEffect
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ spawnGun _ =
|
|||||||
& itUse . heldDelay . rateMax .~ 100
|
& itUse . heldDelay . rateMax .~ 100
|
||||||
-- & itUse . heldUse .~ HeldDoNothing --(\_ -> spawnCrNextTo cr)
|
-- & itUse . heldUse .~ HeldDoNothing --(\_ -> spawnCrNextTo cr)
|
||||||
-- & itUse . heldMods .~ DoNothingMod
|
-- & itUse . heldMods .~ DoNothingMod
|
||||||
& itType . iyBase .~ LEFT SPAWNER
|
& itType .~ LEFT SPAWNER
|
||||||
|
|
||||||
spawnCrNextTo ::
|
spawnCrNextTo ::
|
||||||
-- | Creature to spawn
|
-- | Creature to spawn
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ stopWatch =
|
|||||||
)
|
)
|
||||||
& itEffect . ieInv .~ ChargeIfEquipped
|
& itEffect . ieInv .~ ChargeIfEquipped
|
||||||
& itEffect . ieOnDrop .~ SetCharge 0
|
& itEffect . ieOnDrop .~ SetCharge 0
|
||||||
& itType . iyBase .~ LEFT STOPWATCH
|
& itType .~ LEFT STOPWATCH
|
||||||
& itUse . leftConsumption
|
& itUse . leftConsumption
|
||||||
.~ ChargeableAmmo
|
.~ ChargeableAmmo
|
||||||
{ _wpMaxCharge = 100
|
{ _wpMaxCharge = 100
|
||||||
@@ -32,13 +32,13 @@ scrollWatch :: Item
|
|||||||
scrollWatch =
|
scrollWatch =
|
||||||
stopWatch
|
stopWatch
|
||||||
& itUse . leftUse .~ LTimeScroll
|
& itUse . leftUse .~ LTimeScroll
|
||||||
& itType . iyBase .~ LEFT SCROLLWATCH
|
& itType .~ LEFT SCROLLWATCH
|
||||||
|
|
||||||
rewindWatch :: Item
|
rewindWatch :: Item
|
||||||
rewindWatch =
|
rewindWatch =
|
||||||
stopWatch
|
stopWatch
|
||||||
& itUse . leftUse .~ LRewind --useRewindGun
|
& itUse . leftUse .~ LRewind --useRewindGun
|
||||||
& itType . iyBase .~ LEFT REWINDWATCH
|
& itType .~ LEFT REWINDWATCH
|
||||||
|
|
||||||
-- needs to shift this item to the current inventory slot
|
-- needs to shift this item to the current inventory slot
|
||||||
shrinkGun :: Item
|
shrinkGun :: Item
|
||||||
@@ -46,7 +46,7 @@ shrinkGun =
|
|||||||
defaultLeftItem
|
defaultLeftItem
|
||||||
& itUse .~ (defaultLeftUse & leftUse .~ LShrink)
|
& itUse .~ (defaultLeftUse & leftUse .~ LShrink)
|
||||||
& itParams .~ ShrinkGunParams FullSize
|
& itParams .~ ShrinkGunParams FullSize
|
||||||
& itType . iyBase .~ LEFT SHRINKER
|
& itType .~ LEFT SHRINKER
|
||||||
|
|
||||||
blinkGun :: Item
|
blinkGun :: Item
|
||||||
blinkGun =
|
blinkGun =
|
||||||
@@ -57,12 +57,12 @@ blinkGun =
|
|||||||
& equipEffect . eeSite .~ GoesOnWrist
|
& equipEffect . eeSite .~ GoesOnWrist
|
||||||
-- , _itFloorPict = const . noPic . colorSH chartreuse $ upperPrismPoly 2 $ square 2
|
-- , _itFloorPict = const . noPic . colorSH chartreuse $ upperPrismPoly 2 $ square 2
|
||||||
}
|
}
|
||||||
& itType . iyBase .~ LEFT BLINKER
|
& itType .~ LEFT BLINKER
|
||||||
|
|
||||||
unsafeBlinkGun :: Item
|
unsafeBlinkGun :: Item
|
||||||
unsafeBlinkGun =
|
unsafeBlinkGun =
|
||||||
blinkGun
|
blinkGun
|
||||||
& itType . iyBase .~ LEFT BLINKERUNSAFE
|
& itType .~ LEFT BLINKERUNSAFE
|
||||||
& itUse . leftUse .~ LUnsafeBlink --hammerCheckL (shootL $ const unsafeBlinkAction)
|
& itUse . leftUse .~ LUnsafeBlink --hammerCheckL (shootL $ const unsafeBlinkAction)
|
||||||
& itUse . equipEffect . eeViewDist ?~ 400
|
& itUse . equipEffect . eeViewDist ?~ 400
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import Dodge.Room
|
|||||||
import Dodge.Tree
|
import Dodge.Tree
|
||||||
import RandomHelp
|
import RandomHelp
|
||||||
|
|
||||||
bossKeyItems :: RandomGen g => [(State g (Tree Room), State g ItemBaseType)]
|
bossKeyItems :: RandomGen g => [(State g (Tree Room), State g ItemType)]
|
||||||
bossKeyItems = [(return . cleatOnward <$> bossRoom autoCrit, takeOne [HELD PISTOL])]
|
bossKeyItems = [(return . cleatOnward <$> bossRoom autoCrit, takeOne [HELD PISTOL])]
|
||||||
|
|
||||||
lockRoomMultiItems :: RandomGen g => [(State g (MetaTree Room String), State g [ItemBaseType])]
|
lockRoomMultiItems :: RandomGen g => [(State g (MetaTree Room String), State g [ItemType])]
|
||||||
lockRoomMultiItems =
|
lockRoomMultiItems =
|
||||||
[
|
[
|
||||||
( blinkAcrossChallenge
|
( blinkAcrossChallenge
|
||||||
@@ -22,7 +22,7 @@ lockRoomMultiItems =
|
|||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
lockRoomKeyItems :: RandomGen g => [(Int -> State g (MetaTree Room String), State g ItemBaseType)]
|
lockRoomKeyItems :: RandomGen g => [(Int -> State g (MetaTree Room String), State g ItemType)]
|
||||||
lockRoomKeyItems =
|
lockRoomKeyItems =
|
||||||
[ (lasCenSensEdge, takeOne [HELD LAUNCHER, HELD LASGUN, HELD SPARKGUN, HELD FLATSHIELD, HELD FORCEFIELDGUN])
|
[ (lasCenSensEdge, takeOne [HELD LAUNCHER, HELD LASGUN, HELD SPARKGUN, HELD FLATSHIELD, HELD FORCEFIELDGUN])
|
||||||
-- , (sensorRoomRunPast ELECTRICAL, takeOne [CRAFT (ENERGYBALLCRAFT TeslaBall), HELD SPARKGUN])
|
-- , (sensorRoomRunPast ELECTRICAL, takeOne [CRAFT (ENERGYBALLCRAFT TeslaBall), HELD SPARKGUN])
|
||||||
@@ -35,10 +35,10 @@ lockRoomKeyItems =
|
|||||||
, (keyCardRoomRunPast 0, return (HELD $ KEYCARD 0))
|
, (keyCardRoomRunPast 0, return (HELD $ KEYCARD 0))
|
||||||
]
|
]
|
||||||
|
|
||||||
keyCardRunPastRand :: RandomGen g => [(Int -> State g (MetaTree Room String), State g ItemBaseType)]
|
keyCardRunPastRand :: RandomGen g => [(Int -> State g (MetaTree Room String), State g ItemType)]
|
||||||
keyCardRunPastRand = [(keyCardRoomRunPast 0, return (HELD $ KEYCARD 0))]
|
keyCardRunPastRand = [(keyCardRoomRunPast 0, return (HELD $ KEYCARD 0))]
|
||||||
|
|
||||||
itemRooms :: RandomGen g => [(ItemBaseType, State g (MetaTree Room String))]
|
itemRooms :: RandomGen g => [(ItemType, State g (MetaTree Room String))]
|
||||||
itemRooms =
|
itemRooms =
|
||||||
[
|
[
|
||||||
( HELD LAUNCHER
|
( HELD LAUNCHER
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ mcUseItem :: Machine -> World -> World
|
|||||||
mcUseItem mc = fromMaybe id $ do
|
mcUseItem mc = fromMaybe id $ do
|
||||||
tu <- mc ^? mcType . _McTurret
|
tu <- mc ^? mcType . _McTurret
|
||||||
let it = tu ^. tuWeapon
|
let it = tu ^. tuWeapon
|
||||||
hit <- it ^? itType . iyBase . ibtHeld
|
hit <- it ^? itType . ibtHeld
|
||||||
guard (_tuFireTime tu > 0)
|
guard (_tuFireTime tu > 0)
|
||||||
return $ mcUseHeld hit it mc
|
return $ mcUseHeld hit it mc
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ mcProximitySensorUpdate mc w = case ( _proxStatus sens
|
|||||||
mcProxTest :: Machine -> World -> Bool
|
mcProxTest :: Machine -> World -> Bool
|
||||||
mcProxTest mc w = case mc ^? mcType . _McSensor . proxRequirement of
|
mcProxTest mc w = case mc ^? mcType . _McSensor . proxRequirement of
|
||||||
Just (RequireHealth x) -> _crHP cr >= x
|
Just (RequireHealth x) -> _crHP cr >= x
|
||||||
Just (RequireEquipment ct) -> any (\itm -> _iyBase (_itType itm) == ct) (_crInv cr)
|
Just (RequireEquipment ct) -> any (\itm -> _itType itm == ct) (_crInv cr)
|
||||||
_ -> False
|
_ -> False
|
||||||
where
|
where
|
||||||
cr = you w
|
cr = you w
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
module Dodge.Module (
|
|
||||||
-- moduleSizes,
|
|
||||||
-- moduleStrings,
|
|
||||||
-- moduleName,
|
|
||||||
) where
|
|
||||||
|
|
||||||
import qualified Data.Map.Strict as M
|
|
||||||
import Dodge.Data.Item
|
|
||||||
import Dodge.Module.Info
|
|
||||||
|
|
||||||
--moduleSizes :: Item -> Int
|
|
||||||
--moduleSizes = sum . fmap moduleSize . _iyModules . _itType
|
|
||||||
--
|
|
||||||
--moduleSize :: ItemModuleType -> Int
|
|
||||||
--moduleSize imt = case imt of
|
|
||||||
-- EMPTYMODULE -> 0
|
|
||||||
-- _ -> 1
|
|
||||||
|
|
||||||
--moduleStrings :: Item -> [String]
|
|
||||||
--moduleStrings = M.elems . M.mapMaybe moduleName . _iyModules . _itType
|
|
||||||
|
|
||||||
--moduleName :: ItemModuleType -> Maybe String
|
|
||||||
--moduleName imt = case imt of
|
|
||||||
-- EMPTYMODULE -> Nothing
|
|
||||||
---- BELTMAG -> Just "+BELT FEED"
|
|
||||||
-- MAGNETMAG -> Just "+MAGNET FEED"
|
|
||||||
-- BULPAY thepayload -> Just $ "+" ++ displayBulletPayload thepayload
|
|
||||||
-- BULBODY thebody -> Just $ "+" ++ displayBulletBody thebody
|
|
||||||
-- BULTRAJ thetraj -> Just $ "+" ++ displayBulletTraj thetraj
|
|
||||||
-- TARGET TargetRBCreature -> Just "+CREATURETARGETING"
|
|
||||||
-- TARGET TARGETLASER -> Just "+LASERTARGETING"
|
|
||||||
-- TARGET TargetRBPress -> Just "+POSTIONALTARGETING"
|
|
||||||
-- TARGET TargetCursor -> Just "+CURSORTARGETING"
|
|
||||||
-- TARGET TargetRBLine -> Just "+LINETARGETING"
|
|
||||||
-- INCENDLAS -> Just "+INCENDIARY"
|
|
||||||
-- SPLITLAS -> Just "+SPLIT"
|
|
||||||
-- STATICLAS -> Just "+STATIC"
|
|
||||||
---- WEPTELE -> Just "+DIRECTEDTELE"
|
|
||||||
-- LAUNCHHOME -> Just "+TARGET HOMING"
|
|
||||||
-- ATTACHTORCH -> Just "+TORCH"
|
|
||||||
|
|
||||||
|
|
||||||
--moduleFold :: (m -> m -> m) -> (ItemModule -> Maybe m) -> m -> Item -> m
|
|
||||||
--moduleFold g f e = foldr (g . fromMaybe e . f) e
|
|
||||||
-- . fmap fromModuleType
|
|
||||||
-- . _iyModules
|
|
||||||
-- . _itType
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
module Dodge.Module.Info
|
|
||||||
()
|
|
||||||
where
|
|
||||||
--import qualified Data.Map.Strict as M
|
|
||||||
import Dodge.Data.Item
|
|
||||||
|
|
||||||
displayBulletBody :: BulletEffect -> String
|
|
||||||
displayBulletBody be = case be of
|
|
||||||
DestroyBullet -> "DESBUL-shouldn't display"
|
|
||||||
BounceBullet -> "bouncing"
|
|
||||||
PenetrateBullet -> "penetrating"
|
|
||||||
|
|
||||||
displayBulletPayload :: BulletPayload -> String
|
|
||||||
displayBulletPayload x = case x of
|
|
||||||
BulSpark -> ""
|
|
||||||
BulFrag -> "fragmentation"
|
|
||||||
BulFlak -> "flak"
|
|
||||||
BulGas -> "gaseous"
|
|
||||||
BulBall y -> displayEnergyBallType y
|
|
||||||
|
|
||||||
displayEnergyBallType :: EnergyBallType -> String
|
|
||||||
displayEnergyBallType ebt = case ebt of
|
|
||||||
IncBall -> "incendiary"
|
|
||||||
TeslaBall -> "static"
|
|
||||||
ConcBall -> "concussive"
|
|
||||||
FlashBall -> "blinding"
|
|
||||||
|
|
||||||
displayBulletTraj :: BulletTrajectoryType -> String
|
|
||||||
displayBulletTraj x = case x of
|
|
||||||
BasicBulletTrajectoryType-> "BTRAJ-shouldn't display"
|
|
||||||
BezierTrajectoryType -> "magnet"
|
|
||||||
FlechetteTrajectoryType -> "flechette"
|
|
||||||
MagnetTrajectoryType -> "bezier curve"
|
|
||||||
@@ -118,7 +118,7 @@ closeObjectInfo n x = case x of
|
|||||||
|
|
||||||
floorItemPickupInfo :: Int -> Item -> String
|
floorItemPickupInfo :: Int -> Item -> String
|
||||||
floorItemPickupInfo n itm
|
floorItemPickupInfo n itm
|
||||||
| n >= ceiling (_itInvSize itm) = ", but you have space to pick it up."
|
| n >= _itInvSize itm = ", but you have space to pick it up."
|
||||||
| otherwise = ", and you don't have space to pick it up."
|
| otherwise = ", and you don't have space to pick it up."
|
||||||
|
|
||||||
-- note the use of ^?!
|
-- note the use of ^?!
|
||||||
|
|||||||
Reference in New Issue
Block a user