Oolite 1.91.0.7645-241119-222d325
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{
33@private
34 NSMutableDictionary *_commodityList;
35 NSArray *_sortedKeys;
36}
37
38
39- (NSUInteger) count;
40
41- (void) setGood:(OOCommodityType)key withInfo:(NSDictionary *)info;
42
43- (NSArray *) goods;
44- (NSDictionary *) dictionaryForScripting;
45
46- (BOOL) setPrice:(OOCreditsQuantity)price forGood:(OOCommodityType)good;
47- (BOOL) setQuantity:(OOCargoQuantity)quantity forGood:(OOCommodityType)good;
48- (BOOL) addQuantity:(OOCargoQuantity)quantity forGood:(OOCommodityType)good;
49- (BOOL) removeQuantity:(OOCargoQuantity)quantity forGood:(OOCommodityType)good;
50- (void) removeAllGoods;
51- (BOOL) setComment:(NSString *)comment forGood:(OOCommodityType)good;
52- (BOOL) setShortComment:(NSString *)comment forGood:(OOCommodityType)good;
53
54- (NSString *) nameForGood:(OOCommodityType)good;
55- (NSString *) commentForGood:(OOCommodityType)good;
56- (NSString *) shortCommentForGood:(OOCommodityType)good;
57- (OOCreditsQuantity) priceForGood:(OOCommodityType)good;
58- (OOCargoQuantity) quantityForGood:(OOCommodityType)good;
59- (OOMassUnit) massUnitForGood:(OOCommodityType)good;
60- (NSUInteger) exportLegalityForGood:(OOCommodityType)good;
61- (NSUInteger) importLegalityForGood:(OOCommodityType)good;
62- (OOCargoQuantity) capacityForGood:(OOCommodityType)good;
63- (float) trumbleOpinionForGood:(OOCommodityType)good;
64
65- (NSDictionary *) definitionForGood:(OOCommodityType)good;
66
67
68- (NSArray *) savePlayerAmounts;
69- (void) loadPlayerAmounts:(NSArray *)amounts;
70
71- (NSArray *) saveStationAmounts;
72- (void) loadStationAmounts:(NSArray *)amounts;
73
74@end
unsigned count
NSString * OOCommodityType
Definition OOTypes.h:106
uint64_t OOCreditsQuantity
Definition OOTypes.h:182
uint32_t OOCargoQuantity
Definition OOTypes.h:176
OOMassUnit
Definition OOTypes.h:123
NSMutableDictionary * _commodityList