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