|
Oolite 1.91.0.7712-251017-85ce217
|
#include <OOCommodityMarket.h>
Instance Methods | |
| (NSUInteger) | - count |
| (void) | - setGood:withInfo: |
| (NSArray *) | - goods |
| (NSDictionary *) | - dictionaryForScripting |
| (BOOL) | - setPrice:forGood: |
| (BOOL) | - setQuantity:forGood: |
| (BOOL) | - addQuantity:forGood: |
| (BOOL) | - removeQuantity:forGood: |
| (void) | - removeAllGoods |
| (BOOL) | - setComment:forGood: |
| (BOOL) | - setShortComment:forGood: |
| (NSString *) | - nameForGood: |
| (NSString *) | - commentForGood: |
| (NSString *) | - shortCommentForGood: |
| (OOCreditsQuantity) | - priceForGood: |
| (OOCargoQuantity) | - quantityForGood: |
| (OOMassUnit) | - massUnitForGood: |
| (NSUInteger) | - exportLegalityForGood: |
| (NSUInteger) | - importLegalityForGood: |
| (OOCargoQuantity) | - capacityForGood: |
| (float) | - trumbleOpinionForGood: |
| (NSDictionary *) | - definitionForGood: |
| (NSArray *) | - savePlayerAmounts |
| (void) | - loadPlayerAmounts: |
| (NSArray *) | - saveStationAmounts |
| (void) | - loadStationAmounts: |
| (id) | - init [implementation] |
| (void) | - dealloc [implementation] |
Private Attributes | |
| NSMutableDictionary * | _commodityList |
| NSArray * | _sortedKeys |
Definition at line 31 of file OOCommodityMarket.h.
| - (BOOL) addQuantity: | (OOCargoQuantity) | quantity | |
| forGood: | (OOCommodityType) | good |
Definition at line 112 of file OOCommodityMarket.m.
References quantityForGood:, and setQuantity:forGood:.
Referenced by PlayerEntity::tryBuyingCommodity:all:, PlayerEntity::trySellingCommodity:all:, and PlayerEntity::unloadAllCargoPodsForType:toManifest:.
| - (OOCargoQuantity) capacityForGood: | (OOCommodityType) | good |
Definition at line 258 of file OOCommodityMarket.m.
References nil.
Referenced by PlayerEntity::tryBuyingCommodity:all:, and PlayerEntity::trySellingCommodity:all:.
| - (NSString *) commentForGood: | (OOCommodityType) | good |
Definition at line 181 of file OOCommodityMarket.m.
References kOOCommodityComment, nil, and OOExpand.
Referenced by PlayerEntity::setGuiToMarketInfoScreen.
| - (NSUInteger) count |
Definition at line 57 of file OOCommodityMarket.m.
References count.
Referenced by PlayerEntity::cargoListForScripting, count, Universe::getContainersOfGoods:scarce:legal:, savePlayerAmounts, saveStationAmounts, PlayerEntity::setGuiToMarketInfoScreen, and PlayerEntity::setGuiToMarketScreen.
|
implementation |
Definition at line 49 of file OOCommodityMarket.m.
References _commodityList, _sortedKeys, dealloc, and DESTROY.
Referenced by dealloc.
| - (NSDictionary *) definitionForGood: | (OOCommodityType) | good |
Definition at line 282 of file OOCommodityMarket.m.
Referenced by Universe::commodityDataForType:.
| - (NSDictionary *) dictionaryForScripting |
Definition at line 82 of file OOCommodityMarket.m.
References dictionaryForScripting.
Referenced by dictionaryForScripting, and StationEntity::localMarketForScripting.
| - (NSUInteger) exportLegalityForGood: | (OOCommodityType) | good |
Definition at line 236 of file OOCommodityMarket.m.
References nil.
Referenced by PlayerEntity::legalStatusOfCargoList, StationEntity::legalStatusOfManifest:export:, and PlayerEntity(OOPrivate)::showMarketScreenDataLine:forGood:inMarket:holdQuantity:.
| - (NSArray *) goods |
Definition at line 71 of file OOCommodityMarket.m.
References _sortedKeys, goods, and nil.
Referenced by PlayerEntity::cargoListForScripting, Universe::getContainersOfGoods:scarce:legal:, goods, loadPlayerAmounts:, loadStationAmounts:, PlayerEntity(OOControlsPrivate)::pollMarketScreenControls, savePlayerAmounts, saveStationAmounts, PlayerEntity::setGuiToMarketInfoScreen, and PlayerEntity::setGuiToMarketScreen.
| - (NSUInteger) importLegalityForGood: | (OOCommodityType) | good |
Definition at line 247 of file OOCommodityMarket.m.
References nil.
Referenced by StationEntity::legalStatusOfManifest:export:, and PlayerEntity(OOPrivate)::showMarketScreenDataLine:forGood:inMarket:holdQuantity:.
|
implementation |
Definition at line 36 of file OOCommodityMarket.m.
References _commodityList, _sortedKeys, init, and nil.
Referenced by init.
| - (void) loadPlayerAmounts: | (NSArray *) | amounts |
Definition at line 301 of file OOCommodityMarket.m.
References goods, nil, OOLog, and setQuantity:forGood:.
Referenced by PlayerEntity::setCommanderDataFromDictionary:.
| - (void) loadStationAmounts: | (NSArray *) | amounts |
Definition at line 360 of file OOCommodityMarket.m.
References goods, nil, OOLog, setPrice:forGood:, and setQuantity:forGood:.
Referenced by StationEntity::setLocalMarket:.
| - (OOMassUnit) massUnitForGood: | (OOCommodityType) | good |
Definition at line 225 of file OOCommodityMarket.m.
References nil, and UNITS_TONS.
Referenced by PlayerEntity::cargoQuantityOnBoard, Universe::describeCommodity:amount:, PlayerEntity::loadCargoPodsForType:amount:, PlayerEntity::loadCargoPodsForType:fromManifest:, marketSorterByMassUnit(), PlayerEntity::setCargoQuantityForType:amount:, PlayerEntity::setCommanderDataFromDictionary:, PlayerEntity::setGuiToMarketInfoScreen, and PlayerEntity::tryBuyingCommodity:all:.
| - (NSString *) nameForGood: | (OOCommodityType) | good |
Definition at line 170 of file OOCommodityMarket.m.
References kOOCommodityName, nil, and OOExpand.
Referenced by PlayerEntity::cargoListForScripting, Universe::describeCommodity:amount:, Universe::displayNameForCommodity:, marketSorterByName(), and PlayerEntity::setGuiToMarketInfoScreen.
| - (OOCreditsQuantity) priceForGood: | (OOCommodityType) | good |
Definition at line 203 of file OOCommodityMarket.m.
References nil.
Referenced by OOCommodities::generateMarketForStation:, marketSorterByPrice(), saveStationAmounts, PlayerEntity(OOPrivate)::showMarketScreenDataLine:forGood:inMarket:holdQuantity:, PlayerEntity::tryBuyingCommodity:all:, and PlayerEntity::trySellingCommodity:all:.
| - (OOCargoQuantity) quantityForGood: | (OOCommodityType) | good |
Definition at line 214 of file OOCommodityMarket.m.
References nil.
Referenced by addQuantity:forGood:, PlayerEntity::cargoListForScripting, PlayerEntity::cargoQuantityForType:, PlayerEntity::cargoQuantityOnBoard, OOCommodities::generateMarketForStation:, Universe::getContainersOfGoods:scarce:legal:, PlayerEntity::legalStatusOfCargoList, StationEntity::legalStatusOfManifest:export:, PlayerEntity::loadCargoPodsForType:amount:, PlayerEntity::loadCargoPodsForType:fromManifest:, marketSorterByQuantity(), removeQuantity:forGood:, savePlayerAmounts, saveStationAmounts, PlayerEntity::setCargoQuantityForType:amount:, PlayerEntity::setCommanderDataFromDictionary:, PlayerEntity::setGuiToMarketInfoScreen, PlayerEntity::setGuiToMarketScreen, PlayerEntity(OOPrivate)::showMarketScreenDataLine:forGood:inMarket:holdQuantity:, PlayerEntity::tryBuyingCommodity:all:, and PlayerEntity::trySellingCommodity:all:.
| - (void) removeAllGoods |
Definition at line 136 of file OOCommodityMarket.m.
References _commodityList, nil, removeAllGoods, and setQuantity:forGood:.
Referenced by removeAllGoods.
| - (BOOL) removeQuantity: | (OOCargoQuantity) | quantity | |
| forGood: | (OOCommodityType) | good |
Definition at line 124 of file OOCommodityMarket.m.
References quantityForGood:, and setQuantity:forGood:.
Referenced by PlayerEntity::setCommanderDataFromDictionary:, PlayerEntity::tryBuyingCommodity:all:, PlayerEntity::trySellingCommodity:all:, and PlayerEntity::unloadCargoPodsForType:amount:.
| - (NSArray *) savePlayerAmounts |
Definition at line 289 of file OOCommodityMarket.m.
References count, goods, nil, quantityForGood:, and savePlayerAmounts.
Referenced by PlayerEntity::commanderDataDictionary, and savePlayerAmounts.
| - (NSArray *) saveStationAmounts |
Definition at line 348 of file OOCommodityMarket.m.
References count, goods, nil, priceForGood:, quantityForGood:, and saveStationAmounts.
Referenced by Universe::getStationMarkets, and saveStationAmounts.
| - (BOOL) setComment: | (NSString *) | comment | |
| forGood: | (OOCommodityType) | good |
Definition at line 146 of file OOCommodityMarket.m.
References nil.
| - (void) setGood: | (OOCommodityType) | key | |
| withInfo: | (NSDictionary *) | info |
Definition at line 63 of file OOCommodityMarket.m.
References _sortedKeys, and DESTROY.
Referenced by OOCommodities::generateBlankMarket, OOCommodities::generateManifestForPlayer, OOCommodities::generateMarketForStation:, and OOCommodities::generateMarketForSystemWithEconomy:andScript:.
| - (BOOL) setPrice: | (OOCreditsQuantity) | price | |
| forGood: | (OOCommodityType) | good |
Definition at line 88 of file OOCommodityMarket.m.
References nil.
Referenced by loadStationAmounts:, and StationEntity::setPrice:forCommodity:.
| - (BOOL) setQuantity: | (OOCargoQuantity) | quantity | |
| forGood: | (OOCommodityType) | good |
Definition at line 100 of file OOCommodityMarket.m.
References nil.
Referenced by addQuantity:forGood:, PlayerEntity::loadCargoPodsForType:amount:, PlayerEntity::loadCargoPodsForType:fromManifest:, loadPlayerAmounts:, loadStationAmounts:, removeAllGoods, removeQuantity:forGood:, PlayerEntity::setCargoQuantityForType:amount:, and StationEntity::setQuantity:forCommodity:.
| - (BOOL) setShortComment: | (NSString *) | comment | |
| forGood: | (OOCommodityType) | good |
Definition at line 158 of file OOCommodityMarket.m.
References nil.
| - (NSString *) shortCommentForGood: | (OOCommodityType) | good |
Definition at line 192 of file OOCommodityMarket.m.
References kOOCommodityShortComment, nil, and OOExpand.
| - (float) trumbleOpinionForGood: | (OOCommodityType) | good |
Definition at line 271 of file OOCommodityMarket.m.
References nil.
|
private |
Definition at line 34 of file OOCommodityMarket.h.
Referenced by dealloc, init, and removeAllGoods.
|
private |
Definition at line 35 of file OOCommodityMarket.h.
Referenced by dealloc, goods, init, and setGood:withInfo:.