1478 {
1480 {
1481 ItemPreviewWidget iw = ItemPreviewWidget.Cast(w.FindAnyWidget("Render"));
1482 if (!iw)
1483 {
1484 string name = w.GetName();
1485 name.Replace(
"PanelWidget",
"Render");
1486 iw = ItemPreviewWidget.Cast(w.FindAnyWidget(
name));
1487 }
1488
1489 if (!iw)
1490 iw = ItemPreviewWidget.Cast(w);
1491
1493 if (item)
1494 {
1496 EntityAI itemInHands = controlledPlayer.GetHumanInventory().GetEntityInHands();
1497
1498 if (!item.GetInventory().CanRemoveEntity())
1499 return;
1500
1501 if (controlledPlayer.GetInventory().HasEntityInInventory(item) && controlledPlayer.GetHumanInventory().CanAddEntityInHands(item))
1502 {
1503 controlledPlayer.PredictiveTakeEntityToHands(item);
1504 }
1505 else
1506 {
1507 if (controlledPlayer.GetInventory().CanAddEntityToInventory(item) && controlledPlayer.GetHumanInventory().CanRemoveEntityInHands())
1508 {
1510 }
1511 else
1512 {
1513 if (controlledPlayer.GetHumanInventory().CanAddEntityInHands(item))
1514 controlledPlayer.PredictiveTakeEntityToHands(item);
1515 }
1516 }
1517
1518 HideOwnedTooltip();
1519
1521 name.Replace(
"PanelWidget",
"Temperature");
1522 w.FindAnyWidget(
name).Show(
false);
1523 }
1524 }
1525 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
class GP5GasMask extends MaskBase ItemBase
FindInventoryLocationType
flags for searching locations in inventory
proto native CGame GetGame()