Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
quest_surplus Namespace Reference

Data Structures

class  quest_surplus
 
class  quest_surplus_factory
 

Functions

def makeSurplusShortage
 

Function Documentation

def quest_surplus.makeSurplusShortage ( )

Definition at line 36 of file quest_surplus.py.

References universe.getAdjacentSystems(), dospath.join(), vsrandom.randrange(), and log_faction_ships.tuple.

36 
38  (sys,mylist)=universe.getAdjacentSystems(VS.getSystemFile(),vsrandom.randrange(1,3))
39  adj=vsrandom.uniform (-.5,.5)
40  myquest=0
41  cats = tuple(set([VS.getRandCargo(1,"").GetCategory(), VS.getRandCargo(1,"").GetCategory()]))
42  news=""
43  if (adj<0):
44  news = "SURPLUS IN %s: There are reports of surpluses of %s items in the %s system. Wise Privateers have been purchasing the surpluses in hopes of future gains elsewhere." % (sys," and ".join(cats),sys)
45  else:
46  news = "DEMAND FOR %s in %s: Citizens in the %s system have been frusterated by the expensive prices and low quantities of %s goods. Privateers are currently banding together to try to bring supply to meet the demand. But while prices are still high, some big traders could certainly capitalize on this shortage." % (" AND ".join(cats),sys,sys," and ".join(cats))
47  return (sys,quest_surplus_factory(cats,1+adj,1-adj,1,1),news)
48