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