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