Fix tend not to leak which commodities are loaded on friendlies
Tending a negative number of commodities takes from the target ships. The target ships must be owned. Tend complains when the target doesn't have the commodity loaded. It does that even for friendly foreign ships. Don't. Broken when Chainsaw 2 added tending to allies.
This commit is contained in:
parent
20b2598214
commit
e16fc41b2e
1 changed files with 4 additions and 4 deletions
|
@ -141,16 +141,16 @@ tend(void)
|
|||
tender.shp_y != target.shp_y)
|
||||
continue;
|
||||
ontarget = target.shp_item[ip->i_uid];
|
||||
if (ontarget == 0 && amt < 0) {
|
||||
pr("No %s on %s\n", ip->i_name, prship(&target));
|
||||
continue;
|
||||
}
|
||||
vbase = &mchr[(int)target.shp_type];
|
||||
maxtarget = vbase->m_item[ip->i_uid];
|
||||
if (amt < 0) {
|
||||
/* take from target and give to tender */
|
||||
if (!player->owner)
|
||||
continue;
|
||||
if (ontarget == 0) {
|
||||
pr("No %s on %s\n", ip->i_name, prship(&target));
|
||||
continue;
|
||||
}
|
||||
transfer = MIN(ontarget, -amt);
|
||||
transfer = MIN(maxtender - ontender, transfer);
|
||||
if (transfer == 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue