335 {
338 {
340 }
342 if (
NotUsingGamepad && Options.DisableLeftShiftTrashCan && !shiftForcedOn)
343 {
345 {
346 if (
item.type > 0 &&
item.stack > 0 && !inv[slot].favorited)
347 {
348 switch (context)
349 {
350 case 0:
351 case 1:
352 case 2:
353 if (Main.npcShop > 0 && !
item.favorited)
354 {
355 Main.cursorOverride = 10;
356 }
357 else
358 {
359 Main.cursorOverride = 6;
360 }
361 break;
362 case 3:
363 case 4:
364 case 7:
365 case 32:
366 if (Main.player[Main.myPlayer].ItemSpace(
item).CanTakeItemToPersonalInventory)
367 {
368 Main.cursorOverride = 6;
369 }
370 break;
371 }
372 }
373 }
375 {
376 bool flag = false;
377 if (Main.LocalPlayer.tileEntityAnchor.IsInValidUseTileEntity())
378 {
379 flag = Main.LocalPlayer.tileEntityAnchor.GetTileEntity().OverrideItemSlotHover(inv, context, slot);
380 }
381 if (
item.type > 0 &&
item.stack > 0 && !inv[slot].favorited && !flag)
382 {
383 switch (context)
384 {
385 case 0:
386 if (Main.CreativeMenu.IsShowingResearchMenu())
387 {
388 Main.cursorOverride = 9;
389 break;
390 }
391 goto case 1;
392 case 1:
393 case 2:
394 if (context == 0 && Main.InReforgeMenu)
395 {
396 if (
item.maxStack == 1 &&
item.Prefix(-3))
397 {
398 Main.cursorOverride = 9;
399 }
400 }
401 else if (context == 0 && Main.InGuideCraftMenu)
402 {
404 {
405 Main.cursorOverride = 9;
406 }
407 }
408 else if (Main.player[Main.myPlayer].chest != -1 && ChestUI.TryPlacingInChest(
item, justCheck: true, context))
409 {
410 Main.cursorOverride = 9;
411 }
412 break;
413 case 3:
414 case 4:
415 case 32:
416 if (Main.player[Main.myPlayer].ItemSpace(
item).CanTakeItemToPersonalInventory)
417 {
418 Main.cursorOverride = 8;
419 }
420 break;
421 case 5:
422 case 7:
423 case 8:
424 case 9:
425 case 10:
426 case 11:
427 case 12:
428 case 16:
429 case 17:
430 case 18:
431 case 19:
432 case 20:
433 case 23:
434 case 24:
435 case 25:
436 case 26:
437 case 27:
438 case 29:
439 case 33:
440 if (Main.player[Main.myPlayer].ItemSpace(inv[slot]).CanTakeItemToPersonalInventory)
441 {
442 Main.cursorOverride = 7;
443 }
444 break;
445 }
446 }
447 }
448 }
450 {
451 bool flag2 = false;
452 if (Main.LocalPlayer.tileEntityAnchor.IsInValidUseTileEntity())
453 {
454 flag2 = Main.LocalPlayer.tileEntityAnchor.GetTileEntity().OverrideItemSlotHover(inv, context, slot);
455 }
456 if (
item.type > 0 &&
item.stack > 0 && !inv[slot].favorited && !flag2)
457 {
458 switch (context)
459 {
460 case 0:
461 case 1:
462 case 2:
463 if (Main.npcShop > 0 && !
item.favorited)
464 {
465 if (!Options.DisableQuickTrash)
466 {
467 Main.cursorOverride = 10;
468 }
469 }
470 else if (context == 0 && Main.CreativeMenu.IsShowingResearchMenu())
471 {
472 Main.cursorOverride = 9;
473 }
474 else if (context == 0 && Main.InReforgeMenu)
475 {
476 if (
item.maxStack == 1 &&
item.Prefix(-3))
477 {
478 Main.cursorOverride = 9;
479 }
480 }
481 else if (context == 0 && Main.InGuideCraftMenu)
482 {
484 {
485 Main.cursorOverride = 9;
486 }
487 }
488 else if (Main.player[Main.myPlayer].chest != -1)
489 {
490 if (ChestUI.TryPlacingInChest(
item, justCheck: true, context))
491 {
492 Main.cursorOverride = 9;
493 }
494 }
495 else if (!Options.DisableQuickTrash)
496 {
497 Main.cursorOverride = 6;
498 }
499 break;
500 case 3:
501 case 4:
502 case 32:
503 if (Main.player[Main.myPlayer].ItemSpace(
item).CanTakeItemToPersonalInventory)
504 {
505 Main.cursorOverride = 8;
506 }
507 break;
508 case 5:
509 case 7:
510 case 8:
511 case 9:
512 case 10:
513 case 11:
514 case 12:
515 case 16:
516 case 17:
517 case 18:
518 case 19:
519 case 20:
520 case 23:
521 case 24:
522 case 25:
523 case 26:
524 case 27:
525 case 29:
526 case 33:
527 if (Main.player[Main.myPlayer].ItemSpace(inv[slot]).CanTakeItemToPersonalInventory)
528 {
529 Main.cursorOverride = 7;
530 }
531 break;
532 }
533 }
534 }
535 if (Main.keyState.IsKeyDown(Main.FavoriteKey) && (
canFavoriteAt[context] || (Main.drawingPlayerChat &&
canShareAt[context])))
536 {
537 if (
item.type > 0 &&
item.stack > 0 && Main.drawingPlayerChat)
538 {
539 Main.cursorOverride = 2;
540 }
541 else if (
item.type > 0 &&
item.stack > 0)
542 {
543 Main.cursorOverride = 3;
544 }
545 }
546 }
static void SuggestUsage(int PointID)
static bool ShiftForcedOn
static bool NotUsingGamepad
static bool[] canFavoriteAt
static int GetGamepadPointForSlot(Item[] inv, int context, int slot)