equal
deleted
inserted
replaced
35 |
35 |
36 /* Bzzt: check if cl is just an index into the cargo table */ |
36 /* Bzzt: check if cl is just an index into the cargo table */ |
37 if (cl < lengthof(_default_cargo)) { |
37 if (cl < lengthof(_default_cargo)) { |
38 /* Copy the indexed cargo */ |
38 /* Copy the indexed cargo */ |
39 _cargo[i] = _default_cargo[cl]; |
39 _cargo[i] = _default_cargo[cl]; |
40 SETBIT(_cargo_mask, i); |
40 SetBit(_cargo_mask, i); |
41 continue; |
41 continue; |
42 } |
42 } |
43 |
43 |
44 /* Loop through each of the default cargo types to see if |
44 /* Loop through each of the default cargo types to see if |
45 * the label matches */ |
45 * the label matches */ |
46 for (uint j = 0; j < lengthof(_default_cargo); j++) { |
46 for (uint j = 0; j < lengthof(_default_cargo); j++) { |
47 if (_default_cargo[j].label == cl) { |
47 if (_default_cargo[j].label == cl) { |
48 _cargo[i] = _default_cargo[j]; |
48 _cargo[i] = _default_cargo[j]; |
49 |
49 |
50 /* Populate the available cargo mask */ |
50 /* Populate the available cargo mask */ |
51 SETBIT(_cargo_mask, i); |
51 SetBit(_cargo_mask, i); |
52 break; |
52 break; |
53 } |
53 } |
54 } |
54 } |
55 } |
55 } |
56 } |
56 } |