2060 {
2061 super.OnRightClick();
2062
2064 {
2066 {
2068 {
2069 EntityAI root = GetHierarchyRoot();
2070 Man playerOwner = GetHierarchyRootPlayer();
2072
2073
2074 if (!playerOwner && root && root == this)
2075 {
2077 }
2078 else
2079 {
2080
2081 GetInventory().GetCurrentInventoryLocation(dst);
2083 {
2086 {
2088 }
2089 else
2090 {
2092
2093
2094 if (
g_Game.GetPlayer().GetInventory().HasInventoryReservation(
this, dst))
2095 {
2097 }
2098 else
2099 {
2101 }
2102 }
2103 }
2104 }
2105
2114 }
2115 }
2116 else if (!
g_Game.IsMultiplayer())
2117 {
2119 }
2120 }
2121 }
FindInventoryLocationType
flags for searching locations in inventory
override bool CanBeSplit()
void SetInventoryLocationToVicinityOrCurrent(EntityAI root, inout InventoryLocation dst)
void SplitItem(PlayerBase player)
const int c_InventoryReservationTimeoutShortMS
script counterpart to engine's class Inventory
proto native EntityAI GetParent()
returns parent of current inventory location
proto native int GetCol()
returns column of cargo if current type is Cargo / ProxyCargo
proto native int GetRow()
returns row of cargo if current type is Cargo / ProxyCargo
bool WriteToContext(ParamsWriteContext ctx)
proto native int GetIdx()
returns index of cargo if current type is Cargo / ProxyCargo
proto native void SetCargo(notnull EntityAI parent, EntityAI e, int idx, int row, int col, bool flip)
sets current inventory location type to Cargo with coordinates (idx, row, col)
proto native bool GetFlip()
returns flip status of cargo
proto bool Write(void value_out)