2125 {
2126 super.OnRightClick();
2127
2129 {
2131 {
2132 if (ScriptInputUserData.CanStoreInputUserData())
2133 {
2134 EntityAI root = GetHierarchyRoot();
2135 Man playerOwner = GetHierarchyRootPlayer();
2136 InventoryLocation dst = new InventoryLocation;
2137
2138
2139 if (!playerOwner && root && root == this)
2140 {
2142 }
2143 else
2144 {
2145
2146 GetInventory().GetCurrentInventoryLocation(dst);
2148 {
2149 PlayerBase player = PlayerBase.Cast(
g_Game.GetPlayer());
2151 {
2153 }
2154 else
2155 {
2157
2158
2159 if (
g_Game.GetPlayer().GetInventory().HasInventoryReservation(
this, dst))
2160 {
2162 }
2163 else
2164 {
2165 g_Game.GetPlayer().GetInventory().AddInventoryReservationEx(null, dst, GameInventory.c_InventoryReservationTimeoutShortMS);
2166 }
2167 }
2168 }
2169 }
2170
2171 ScriptInputUserData ctx = new ScriptInputUserData;
2179 }
2180 }
2181 else if (!
g_Game.IsMultiplayer())
2182 {
2184 }
2185 }
2186 }
FindInventoryLocationType
flags for searching locations in inventory
void SplitItem(PlayerBase player)
override bool CanBeSplit()
void SetInventoryLocationToVicinityOrCurrent(EntityAI root, inout InventoryLocation dst)
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)