playerBoughtCargo and playerSoldCargo world events

Also add commodity-name translations for the modern names for multi-word goods


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4851 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Chris Morris 2012-04-14 18:46:30 +00:00
parent b630213cab
commit 3c91e03e9e
2 changed files with 9 additions and 1 deletions

View File

@ -1313,7 +1313,11 @@
"commodity-name platinum" = "Platinum";
"commodity-name gem-stones" = "Gem-Stones";
"commodity-name alien items" = "Alien Items";
// Commodity names: new spellings
"commodity-name liquor_wines" = "Liquor/Wines";
"commodity-name gem_stones" = "Gem-Stones";
"commodity-name alien_items" = "Alien Items";
// autosave filename identifier
"autosave-commander-suffix" = " (autosave)";

View File

@ -7335,6 +7335,8 @@ static NSString *last_outfitting_key=nil;
shipCommodityData = [[NSArray arrayWithArray:manifest] retain];
if ([UNIVERSE autoSave]) [UNIVERSE setAutoSaveNow:YES];
[self doScriptEvent:OOJSID("playerBoughtCargo") withArguments:[NSArray arrayWithObjects:CommodityTypeToString(index), [NSNumber numberWithInt:purchase], [NSNumber numberWithInt: pricePerUnit], nil]];
return YES;
}
@ -7379,6 +7381,8 @@ static NSString *last_outfitting_key=nil;
if ([UNIVERSE autoSave]) [UNIVERSE setAutoSaveNow:YES];
[self doScriptEvent:OOJSID("playerSoldCargo") withArguments:[NSArray arrayWithObjects:CommodityTypeToString(index), [NSNumber numberWithInt:sell], [NSNumber numberWithInt: pricePerUnit], nil]];
return YES;
}