6140 {
6142 {
6143 int type = -1;
6146 bool use_stack_max = false;
6147 int slot_id = -1;
6148
6149 if (!ctx.
Read(type))
6150 return false;
6151
6152 if (type == 4)
6153 {
6154 if (!ctx.
Read(item1))
6155 return false;
6156
6157 InventoryLocation dst = new InventoryLocation;
6159 {
6160
6161 bool dummy;
6162 if (ctx.
Read(dummy))
6163 item1.SplitItemToInventoryLocation(dst);
6164 else
6165 item1.SplitIntoStackMaxToInventoryLocation(dst);
6166 return true;
6167 }
6168 return false;
6169 }
6170
6171 if (!ctx.
Read(item1))
6172 return false;
6173 if (!ctx.
Read(item2))
6174 return false;
6175 if (!ctx.
Read(use_stack_max))
6176 return false;
6177 if (!ctx.
Read(slot_id))
6178 return false;
6179
6180 if (type == -1 && item1 && item2)
6181 {
6182 item1.CombineItems(item2, use_stack_max);
6183 }
6184 else if (type == 1 && item1)
6185 {
6186 if (use_stack_max)
6187 item1.SplitIntoStackMax(item2, slot_id, this);
6188 else
6189 item1.SplitItem(this);
6190 }
6191 else if (type == 2 && item1)
6192 {
6193 int row, col;
6195 return false;
6197 return false;
6198 item1.SplitIntoStackMaxCargo(item2, slot_id, row, col);
6199 }
6200 else if (type == 3 && item1)
6201 {
6202 item1.SplitIntoStackMaxHands(this);
6203 }
6204 return true;
6205 }
6206 return false;
6207 }
class GP5GasMask extends MaskBase ItemBase
bool ReadFromContext(ParamsReadContext ctx)
proto bool Read(void value_in)