As per Eric's suggestion, -(void) checkForFullHold now sends the AI messages NO_CARGO_BAY if the ship has no cargo carrying capability, HOLD_FULL when maximum cargo quantity has been collected and HOLD_NOT_FULL otherwise.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1918 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
803b943d1c
commit
0d07dd1673
@ -325,8 +325,18 @@ MA 02110-1301, USA.
|
|||||||
|
|
||||||
- (void) checkForFullHold
|
- (void) checkForFullHold
|
||||||
{
|
{
|
||||||
if ([cargo count] >= max_cargo)
|
if (!max_cargo)
|
||||||
|
{
|
||||||
|
[shipAI message:@"NO_CARGO_BAY"];
|
||||||
|
}
|
||||||
|
else if ([cargo count] >= max_cargo)
|
||||||
|
{
|
||||||
[shipAI message:@"HOLD_FULL"];
|
[shipAI message:@"HOLD_FULL"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[shipAI message:@"HOLD_NOT_FULL"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user