227 {
229 {
230 case LogicCheckType.Day:
231 return Main.dayTime;
232 case LogicCheckType.Night:
233 return !Main.dayTime;
234 case LogicCheckType.PlayerAbove:
235 {
236 bool result = false;
239 {
241 {
242 result = true;
243 break;
244 }
245 }
246 return result;
247 }
248 case LogicCheckType.Water:
249 case LogicCheckType.Lava:
250 case LogicCheckType.Honey:
251 case LogicCheckType.Liquid:
252 {
253 if (instance == null)
254 {
255 return false;
256 }
257 Tile tile = Main.tile[x, y];
258 bool flag = true;
259 if (tile == null || tile.liquid == 0)
260 {
261 flag = false;
262 }
263 if (!tile.lava() &&
type == LogicCheckType.Lava)
264 {
265 flag = false;
266 }
267 if (!tile.honey() &&
type == LogicCheckType.Honey)
268 {
269 flag = false;
270 }
271 if ((tile.honey() || tile.lava()) &&
type == LogicCheckType.Water)
272 {
273 flag = false;
274 }
275 if (!flag && instance.On)
276 {
277 if (instance.CountedData == 0)
278 {
279 instance.CountedData = 15;
280 }
281 else if (instance.CountedData > 0)
282 {
283 instance.CountedData--;
284 }
285 flag = instance.CountedData > 0;
286 }
287 return flag;
288 }
289 default:
290 return false;
291 }
292 }
static Dictionary< int, Rectangle > playerBox