82327c1d |
1 | /* |
2 | * Decompiled with CFR 0.151. |
3 | * |
4 | * Could not load the following classes: |
5 | * com.wurmonline.client.game.CaveDataBuffer |
6 | * com.wurmonline.client.game.NearTerrainDataBuffer |
7 | * com.wurmonline.client.renderer.PickRenderer |
8 | * com.wurmonline.client.renderer.gui.HeadsUpDisplay |
9 | * org.gotti.wurmunlimited.modloader.interfaces.Configurable |
10 | * org.gotti.wurmunlimited.modloader.interfaces.Initable |
11 | * org.gotti.wurmunlimited.modloader.interfaces.WurmClientMod |
12 | */ |
13 | package net.encode.wurmesp; |
14 | |
15 | import java.util.ArrayList; |
16 | import java.util.List; |
17 | import java.util.Properties; |
18 | import java.util.concurrent.CopyOnWriteArrayList; |
19 | import java.util.logging.Level; |
20 | import java.util.logging.Logger; |
21 | |
22 | import org.gotti.wurmunlimited.modloader.interfaces.Configurable; |
23 | import org.gotti.wurmunlimited.modloader.interfaces.Initable; |
24 | import org.gotti.wurmunlimited.modloader.interfaces.WurmClientMod; |
25 | |
26 | import com.wurmonline.client.game.CaveDataBuffer; |
27 | import com.wurmonline.client.game.NearTerrainDataBuffer; |
28 | import com.wurmonline.client.renderer.PickRenderer; |
29 | import com.wurmonline.client.renderer.gui.HeadsUpDisplay; |
30 | |
31 | import net.encode.wurmesp.feature.FeatureFlowerTiles; |
32 | import net.encode.wurmesp.feature.FeatureTilesCloseBy; |
33 | import net.encode.wurmesp.feature.FeatureTilesHighlight; |
34 | import net.encode.wurmesp.feature.FeatureTilesWalkable; |
35 | import net.encode.wurmesp.feature.FeatureXRay; |
36 | import net.encode.wurmesp.feature.hook.CmdShowDeedPlan; |
37 | import net.encode.wurmesp.feature.hook.GroundItemCellRenderableInit; |
38 | import net.encode.wurmesp.feature.hook.GroundItemCellRenderableRemove; |
39 | import net.encode.wurmesp.feature.hook.HandleDevInput; |
40 | import net.encode.wurmesp.feature.hook.HeadsUpDisplayInit; |
41 | import net.encode.wurmesp.feature.hook.MobileModelRenderableInit; |
42 | import net.encode.wurmesp.feature.hook.MobileModelRenderableRemove; |
43 | import net.encode.wurmesp.feature.hook.ProjectileCellRenderable; |
44 | import net.encode.wurmesp.feature.hook.RenderPickedItem; |
45 | import net.encode.wurmesp.util.ConfigUtils; |
46 | import net.encode.wurmesp.util.CronoManager; |
47 | |
48 | public class WurmEspMod |
49 | implements WurmClientMod, |
50 | Initable, |
51 | Configurable { |
52 | public static HeadsUpDisplay hud; |
53 | public static Logger logger; |
54 | public static Properties modProperties; |
55 | public static List<Unit> pickableUnits; |
56 | public static List<Unit> toRemove; |
57 | public static CronoManager xrayCronoManager; |
58 | public static CronoManager tilesFlowerCronoManager; |
59 | public static CronoManager tilesCloseByCronoManager; |
60 | public static CronoManager tilesHighlightCronoManager; |
61 | public static CronoManager tilesCloseByWalkableCronoManager; |
62 | public static FeatureXRay xrayManager; |
63 | public static FeatureFlowerTiles tilesFlowerManager; |
64 | public static FeatureTilesCloseBy tilesCloseByManager; |
65 | public static FeatureTilesHighlight tilesHighlightManager; |
66 | public static FeatureTilesWalkable tilesCloseByWalkableManager; |
67 | public static CaveDataBuffer _caveBuffer; |
68 | public static NearTerrainDataBuffer _terrainBuffer; |
69 | public static NearTerrainDataBuffer _terrainBuffer2; |
70 | public static CopyOnWriteArrayList<float[]> _terrain; |
71 | public static CopyOnWriteArrayList<float[]> _flowerTerrain; |
72 | public static CopyOnWriteArrayList<float[]> _closeByTerrain; |
73 | public static CopyOnWriteArrayList<float[]> _closeByWalkableTerrain; |
74 | public static CopyOnWriteArrayList<int[]> _tilesHighlightBase; |
75 | public static CopyOnWriteArrayList<float[]> _tilesHighlightTerrain; |
76 | public static String search; |
77 | public static SEARCHTYPE searchType; |
78 | public static boolean players; |
79 | public static boolean mobs; |
80 | public static boolean animals; |
81 | public static boolean specials; |
82 | public static boolean items; |
83 | public static boolean tilesFlower; |
84 | public static boolean uniques; |
85 | public static boolean conditioned; |
86 | public static boolean tilescloseby; |
87 | public static boolean deedsize; |
88 | public static boolean tileshighlight; |
89 | public static boolean tilesclosebynotrideable; |
90 | public static boolean xray; |
91 | public static boolean xraythread; |
92 | public static boolean xrayrefreshthread; |
93 | public static int xraydiameter; |
94 | public static int xrayrefreshrate; |
95 | public static int tilenotrideable; |
96 | public static int flowerdiameter; |
97 | public static boolean playsoundspecial; |
98 | public static boolean playsounditem; |
99 | public static boolean playsoundunique; |
100 | public static String soundspecial; |
101 | public static String sounditem; |
102 | public static String soundunique; |
103 | public static boolean conditionedcolorsallways; |
104 | public static boolean championmcoloralways; |
105 | public static String[] tilesFlowerSearch; |
106 | public static PickRenderer _pickRenderer; |
107 | |
108 | public void init() { |
109 | logger.log(Level.INFO, "[WurmEspMod] Initializing"); |
110 | xrayManager = new FeatureXRay(); |
111 | tilesFlowerManager = new FeatureFlowerTiles(); |
112 | tilesCloseByManager = new FeatureTilesCloseBy(); |
113 | tilesHighlightManager = new FeatureTilesHighlight(); |
114 | tilesCloseByWalkableManager = new FeatureTilesWalkable(); |
115 | xrayCronoManager = new CronoManager(xrayrefreshrate * 1000); |
116 | tilesFlowerCronoManager = new CronoManager(1000L); |
117 | tilesCloseByCronoManager = new CronoManager(1000L); |
118 | tilesHighlightCronoManager = new CronoManager(1000L); |
119 | tilesCloseByWalkableCronoManager = new CronoManager(1000L); |
120 | new HandleDevInput(); |
121 | new ProjectileCellRenderable(); |
122 | new HeadsUpDisplayInit(); |
123 | new RenderPickedItem(); |
124 | new MobileModelRenderableInit(); |
125 | new MobileModelRenderableRemove(); |
126 | new GroundItemCellRenderableInit(); |
127 | new GroundItemCellRenderableRemove(); |
128 | new CmdShowDeedPlan(); |
129 | } |
130 | |
131 | public void configure(Properties properties) { |
132 | ConfigUtils.DoConfig(properties); |
133 | logger.log(Level.INFO, "[WurmEspMod] Config loaded"); |
134 | } |
135 | |
136 | static { |
137 | logger = Logger.getLogger("WurmEspMod"); |
138 | modProperties = new Properties(); |
139 | pickableUnits = new ArrayList<Unit>(); |
140 | toRemove = new ArrayList<Unit>(); |
141 | _caveBuffer = null; |
142 | _terrainBuffer = null; |
143 | _terrainBuffer2 = null; |
144 | _terrain = new CopyOnWriteArrayList<float[]>(); |
145 | _flowerTerrain = new CopyOnWriteArrayList<float[]>(); |
146 | _closeByTerrain = new CopyOnWriteArrayList<float[]>(); |
147 | _closeByWalkableTerrain = new CopyOnWriteArrayList<float[]>(); |
148 | _tilesHighlightBase = new CopyOnWriteArrayList<int[]>(); |
149 | _tilesHighlightTerrain = new CopyOnWriteArrayList<float[]>(); |
150 | search = "defaultnosearch"; |
151 | searchType = SEARCHTYPE.NONE; |
152 | players = true; |
153 | mobs = false; |
154 | animals = false; |
155 | specials = true; |
156 | items = true; |
157 | tilesFlower = false; |
158 | uniques = true; |
159 | conditioned = true; |
160 | tilescloseby = false; |
161 | deedsize = false; |
162 | tileshighlight = false; |
163 | tilesclosebynotrideable = false; |
164 | xray = false; |
165 | xraythread = true; |
166 | xrayrefreshthread = true; |
167 | xraydiameter = 32; |
168 | xrayrefreshrate = 5; |
169 | tilenotrideable = 40; |
170 | flowerdiameter = 64; |
171 | playsoundspecial = true; |
172 | playsounditem = true; |
173 | playsoundunique = true; |
174 | soundspecial = "sound.fx.conch"; |
175 | sounditem = "sound.fx.conch"; |
176 | soundunique = "sound.fx.conch"; |
177 | conditionedcolorsallways = false; |
178 | championmcoloralways = false; |
179 | } |
180 | |
181 | public static enum SEARCHTYPE { |
182 | NONE, |
183 | HOVER, |
184 | MODEL, |
185 | BOTH; |
186 | |
187 | } |
188 | } |
189 | |