Line data Source code
1 0 : /* 2 : 3 : OOCommodityMarket.h 4 : 5 : Commodity price and quantity list for a particular station/system 6 : Also used for the player ship's docked manifest 7 : 8 : Oolite 9 : Copyright (C) 2004-2013 Giles C Williams and contributors 10 : 11 : This program is free software; you can redistribute it and/or 12 : modify it under the terms of the GNU General Public License 13 : as published by the Free Software Foundation; either version 2 14 : of the License, or (at your option) any later version. 15 : 16 : This program is distributed in the hope that it will be useful, 17 : but WITHOUT ANY WARRANTY; without even the implied warranty of 18 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 : GNU General Public License for more details. 20 : 21 : You should have received a copy of the GNU General Public License 22 : along with this program; if not, write to the Free Software 23 : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 24 : MA 02110-1301, USA. 25 : 26 : */ 27 : 28 : #import "OOCommodities.h" 29 : #import "OOTypes.h" 30 : 31 0 : @interface OOCommodityMarket: NSObject 32 : { 33 : @private 34 0 : NSMutableDictionary *_commodityList; 35 0 : NSArray *_sortedKeys; 36 : } 37 : 38 : 39 0 : - (NSUInteger) count; 40 : 41 0 : - (void) setGood:(OOCommodityType)key withInfo:(NSDictionary *)info; 42 : 43 0 : - (NSArray *) goods; 44 0 : - (NSDictionary *) dictionaryForScripting; 45 : 46 0 : - (BOOL) setPrice:(OOCreditsQuantity)price forGood:(OOCommodityType)good; 47 0 : - (BOOL) setQuantity:(OOCargoQuantity)quantity forGood:(OOCommodityType)good; 48 0 : - (BOOL) addQuantity:(OOCargoQuantity)quantity forGood:(OOCommodityType)good; 49 0 : - (BOOL) removeQuantity:(OOCargoQuantity)quantity forGood:(OOCommodityType)good; 50 0 : - (void) removeAllGoods; 51 0 : - (BOOL) setComment:(NSString *)comment forGood:(OOCommodityType)good; 52 0 : - (BOOL) setShortComment:(NSString *)comment forGood:(OOCommodityType)good; 53 : 54 0 : - (NSString *) nameForGood:(OOCommodityType)good; 55 0 : - (NSString *) commentForGood:(OOCommodityType)good; 56 0 : - (NSString *) shortCommentForGood:(OOCommodityType)good; 57 0 : - (OOCreditsQuantity) priceForGood:(OOCommodityType)good; 58 0 : - (OOCargoQuantity) quantityForGood:(OOCommodityType)good; 59 0 : - (OOMassUnit) massUnitForGood:(OOCommodityType)good; 60 0 : - (NSUInteger) exportLegalityForGood:(OOCommodityType)good; 61 0 : - (NSUInteger) importLegalityForGood:(OOCommodityType)good; 62 0 : - (OOCargoQuantity) capacityForGood:(OOCommodityType)good; 63 0 : - (float) trumbleOpinionForGood:(OOCommodityType)good; 64 : 65 0 : - (NSDictionary *) definitionForGood:(OOCommodityType)good; 66 : 67 : 68 0 : - (NSArray *) savePlayerAmounts; 69 0 : - (void) loadPlayerAmounts:(NSArray *)amounts; 70 : 71 0 : - (NSArray *) saveStationAmounts; 72 0 : - (void) loadStationAmounts:(NSArray *)amounts; 73 : 74 : @end