|
Oolite
|
#include <OOCommodities.h>
Class Methods | |
| (OOCommodityType) | + legacyCommodityType: |
Private Attributes | |
| NSDictionary * | _commodityLists |
Definition at line 78 of file OOCommodities.h.
|
implementation |
Provided by category OOCommodities(OOPrivate).
Definition at line 483 of file OOCommodities.m.
References randf().
Referenced by generateMarketForStation:.
|
implementation |
Provided by category OOCommodities(OOPrivate).
Definition at line 503 of file OOCommodities.m.
References randf().
Referenced by generateMarketForStation:.
| - (NSUInteger) count |
Definition at line 347 of file OOCommodities.m.
References count.
Referenced by count.
|
implementation |
Provided by category OOCommodities(OOPrivate).
Definition at line 169 of file OOCommodities.m.
References kOOCommodityCapacity, modifyGood:withScript:atStation:inSystem:localMode:, and nil.
Referenced by generateMarketForStation:, generateMarketForSystemWithEconomy:andScript:, and samplePriceForCommodity:inEconomy:withScript:inSystem:.
|
implementation |
Definition at line 122 of file OOCommodities.m.
References _commodityLists, dealloc, and DESTROY.
Referenced by dealloc.
|
implementation |
Provided by category OOCommodities(OOPrivate).
Definition at line 440 of file OOCommodities.m.
References distance().
Referenced by OOCommodities(OOPrivate)::generatePriceForGood:inEconomy:, and OOCommodities(OOPrivate)::generateQuantityForGood:inEconomy:.
|
implementation |
Provided by category OOCommodities(OOPrivate).
Definition at line 462 of file OOCommodities.m.
References kOOCommodityMarketTypeValueClass, kOOCommodityMarketTypeValueDefault, kOOCommodityMarketTypeValueGood, and nil.
Referenced by generateMarketForStation:.
| - (OOCommodityMarket *) generateBlankMarket |
Definition at line 150 of file OOCommodities.m.
References _commodityLists, foreachkey, generateBlankMarket, nil, and OOCommodityMarket::setGood:withInfo:.
Referenced by generateBlankMarket, and generateMarketForStation:.
| - (OOCommodityMarket *) generateManifestForPlayer |
Definition at line 129 of file OOCommodities.m.
References _commodityLists, foreachkey, generateManifestForPlayer, nil, and OOCommodityMarket::setGood:withInfo:.
Referenced by generateManifestForPlayer.
| - (OOCommodityMarket *) generateMarketForStation: | (StationEntity*) | station |
Definition at line 289 of file OOCommodities.m.
References _commodityLists, adjustPrice:byRule:, adjustQuantity:byRule:, createDefinitionFrom:price:andQuantity:forKey:atStation:inSystem:, firstModifierForGood:inClasses:fromList:, foreachkey, generateBlankMarket, MAIN_SYSTEM_MARKET_LIMIT, StationEntity::marketCapacity, StationEntity::marketDefinition, StationEntity::marketScriptName, modifyGood:withScript:atStation:inSystem:localMode:, nil, OOCommodityMarket::priceForGood:, OOCommodityMarket::quantityForGood:, OOCommodityMarket::setGood:withInfo:, and updateInfoFor:byRule:maxCapacity:.
| - (OOCommodityMarket *) generateMarketForSystemWithEconomy: | (OOEconomyID) | economy | |
| andScript: | (NSString*) | scriptName |
Definition at line 261 of file OOCommodities.m.
References _commodityLists, createDefinitionFrom:price:andQuantity:forKey:atStation:inSystem:, foreachkey, generatePriceForGood:inEconomy:, generateQuantityForGood:inEconomy:, modifyGood:withScript:atStation:inSystem:localMode:, nil, and OOCommodityMarket::setGood:withInfo:.
Referenced by Universe::setSystemTo:.
|
implementation |
Provided by category OOCommodities(OOPrivate).
Definition at line 406 of file OOCommodities.m.
References economicBiasForGood:inEconomy:, and randf().
Referenced by generateMarketForSystemWithEconomy:andScript:, and samplePriceForCommodity:inEconomy:withScript:inSystem:.
|
implementation |
Provided by category OOCommodities(OOPrivate).
Definition at line 391 of file OOCommodities.m.
References economicBiasForGood:inEconomy:, and randf().
Referenced by generateMarketForSystemWithEconomy:andScript:.
| - (NSString *) getRandomCommodity |
Definition at line 375 of file OOCommodities.m.
References getRandomCommodity, and Ranrot().
Referenced by getRandomCommodity, and Universe::getRandomCommodity.
| - (BOOL) goodDefined: | (NSString*) | key |
Definition at line 357 of file OOCommodities.m.
References _commodityLists, and nil.
| - (NSString *) goodNamed: | (NSString*) | name |
Definition at line 362 of file OOCommodities.m.
References _commodityLists, foreachkey, kOOCommodityName, nil, and OOExpand.
| - (NSArray *) goods |
Definition at line 352 of file OOCommodities.m.
References goods.
Referenced by goods.
|
implementation |
Definition at line 97 of file OOCommodities.m.
References _commodityLists, ResourceManager::dictionaryFromFilesNamed:inFolder:mergeMode:cache:, init, and nil.
Referenced by init.
| + (OOCommodityType) legacyCommodityType: | (NSUInteger) | i |
Definition at line 55 of file OOCommodities.m.
Referenced by PlayerEntity::setCommanderDataFromDictionary:.
| - (OOMassUnit) massUnitForGood: | (NSString*) | good |
Definition at line 382 of file OOCommodities.m.
References nil, and UNITS_TONS.
Referenced by Universe::getRandomAmountOfCommodity:.
|
implementation |
Provided by category OOCommodities(OOPrivate).
Definition at line 196 of file OOCommodities.m.
References OOScript::callMethod:inContext:withArguments:count:result:, kOOCommodityKey, kOOCommodityName, nil, OOJSAcquireContext(), OOJSFreeValue, OOJSNativeObjectFromJSObject(), OOJSRelinquishContext(), OOJSUndefinedValue, OOJSValueFromDouble(), OOJSValueFromNativeObject(), and OOLog.
Referenced by OOCommodities(OOPrivate)::createDefinitionFrom:price:andQuantity:forKey:atStation:inSystem:, generateMarketForStation:, generateMarketForSystemWithEconomy:andScript:, and samplePriceForCommodity:inEconomy:withScript:inSystem:.
| - (OOCreditsQuantity) samplePriceForCommodity: | (OOCommodityType) | commodity | |
| inEconomy: | (OOEconomyID) | economy | |
| withScript: | (NSString*) | scriptName | |
| inSystem: | (OOSystemID) | system |
Definition at line 421 of file OOCommodities.m.
References createDefinitionFrom:price:andQuantity:forKey:atStation:inSystem:, generatePriceForGood:inEconomy:, modifyGood:withScript:atStation:inSystem:localMode:, and nil.
Referenced by SystemInfoSamplePrice(), and SystemInfoSamplePrice().
|
implementation |
Provided by category OOCommodities(OOPrivate).
Definition at line 524 of file OOCommodities.m.
Referenced by generateMarketForStation:.
|
private |
Definition at line 80 of file OOCommodities.h.
Referenced by dealloc, generateBlankMarket, generateManifestForPlayer, generateMarketForStation:, generateMarketForSystemWithEconomy:andScript:, goodDefined:, goodNamed:, and init.