Vega strike Python Modules doc
0.5.1
Documentation of the " Modules " folder of Vega strike
|
Public Member Functions | |
def | __init__ |
def | translateDynamicString |
def | getPOV |
def | sTovarlist |
def | updateDockedAtFaction |
def | isStoryRelevant |
def | writeDynamicString |
Data Fields | |
dockedat_faction | |
data | |
translator | |
Static Public Attributes | |
int | RANDOM_INTEGER_INDEX = 0 |
int | STARDATE_INDEX = 1 |
int | EVENT_TYPE_INDEX = 2 |
int | EVENT_STAGE_INDEX = 3 |
int | AGGRESSOR_INDEX = 4 |
int | DEFENDER_INDEX = 5 |
int | AGGRESSOR_SUCCESS_INDEX = 6 |
int | EVENT_SCALE_INDEX = 7 |
int | EVENT_SYSTEM_INDEX = 8 |
int | EVENT_KEYWORD_INDEX = 9 |
int | AGGRESSOR_FLIGHTGROUP_INDEX = 10 |
int | AGGRESSOR_SHIPTYPE_INDEX = 11 |
int | DEFENDER_FLIGHTGROUP_INDEX = 12 |
int | DEFENDER_SHIPTYPE_INDEX = 13 |
string | KEYWORD_DEFAULT = "all" |
string | TYPE_SIEGE = "siege" |
string | TYPE_EXPLORATION = "exploration" |
string | TYPE_BATTLE = "battle" |
string | TYPE_FLEETBATTLE = "fleetbattle" |
string | TYPE_DESTROYED = "destroyed" |
string | STAGE_BEGIN = "start" |
string | STAGE_MIDDLE = "middle" |
string | STAGE_END = "end" |
string | SUCCESS_WIN = '1' |
string | SUCCESS_DRAW = '0' |
string | SUCCESS_LOSS = '-1' |
int | POV_GOOD = 5 |
int | POV_BAD = 6 |
int | POV_NEUTRAL = 7 |
float | POV_CUTOFF = 0.25 |
This class is used to manage dynamic news, it is designed to be used as a global object, but can be used otherwise.
Definition at line 252 of file dynamic_news.py.
def __init__ | ( | self) |
Definition at line 294 of file dynamic_news.py.
def getPOV | ( | self, | |
varlist | |||
) |
Returns the corresponding POV_* class variable for the reaction of the dockedat faction to the status of the event.
Definition at line 319 of file dynamic_news.py.
References NewsManager.AGGRESSOR_INDEX, debug.debug, NewsManager.DEFENDER_INDEX, NewsManager.dockedat_faction, NewsManager.POV_BAD, NewsManager.POV_CUTOFF, NewsManager.POV_GOOD, NewsManager.POV_NEUTRAL, NewsManager.SUCCESS_DRAW, NewsManager.SUCCESS_LOSS, and NewsManager.SUCCESS_WIN.
def isStoryRelevant | ( | self, | |
strin | |||
) |
Is the event in this string relevant to the current system and dockedat faction?
Definition at line 374 of file dynamic_news.py.
References NewsManager.EVENT_SYSTEM_INDEX, NewsManager.EVENT_TYPE_INDEX, NewsManager.sTovarlist(), NewsManager.TYPE_BATTLE, and NewsManager.TYPE_DESTROYED.
def sTovarlist | ( | self, | |
s | |||
) |
Converts a stored dynamic news string into a variable list usable by other methods and classes.
Definition at line 346 of file dynamic_news.py.
References NewsManager.EVENT_SCALE_INDEX, NewsManager.RANDOM_INTEGER_INDEX, and NewsManager.STARDATE_INDEX.
def translateDynamicString | ( | self, | |
strin | |||
) |
Takes an argument, of type str (this is not checked), that is of the same format as that stored by self.writeDynamicString(varlist)
Definition at line 300 of file dynamic_news.py.
References NewsManager.AGGRESSOR_FLIGHTGROUP_INDEX, NewsManager.dockedat_faction, NewsManager.EVENT_KEYWORD_INDEX, NewsManager.getPOV(), and NewsManager.sTovarlist().
def updateDockedAtFaction | ( | self) |
Updates the current self.dockedat_faction to its current value. Should be called before translating a batch of stores.
Definition at line 355 of file dynamic_news.py.
References NewsManager.dockedat_faction.
def writeDynamicString | ( | self, | |
varlist | |||
) |
Stores a news story list into the \"dynamic news\" key in the save game.
Definition at line 401 of file dynamic_news.py.
References string.join(), vsrandom.randrange(), and locale.str().
|
static |
Definition at line 267 of file dynamic_news.py.
|
static |
Definition at line 261 of file dynamic_news.py.
|
static |
Definition at line 268 of file dynamic_news.py.
|
static |
Definition at line 263 of file dynamic_news.py.
data |
Definition at line 297 of file dynamic_news.py.
|
static |
Definition at line 269 of file dynamic_news.py.
|
static |
Definition at line 262 of file dynamic_news.py.
|
static |
Definition at line 270 of file dynamic_news.py.
dockedat_faction |
Definition at line 295 of file dynamic_news.py.
|
static |
Definition at line 266 of file dynamic_news.py.
|
static |
Definition at line 264 of file dynamic_news.py.
|
static |
Definition at line 260 of file dynamic_news.py.
|
static |
Definition at line 265 of file dynamic_news.py.
|
static |
Definition at line 259 of file dynamic_news.py.
|
static |
Definition at line 272 of file dynamic_news.py.
|
static |
Definition at line 289 of file dynamic_news.py.
|
static |
Definition at line 292 of file dynamic_news.py.
|
static |
Definition at line 288 of file dynamic_news.py.
|
static |
Definition at line 290 of file dynamic_news.py.
|
static |
Definition at line 257 of file dynamic_news.py.
|
static |
Definition at line 280 of file dynamic_news.py.
|
static |
Definition at line 282 of file dynamic_news.py.
|
static |
Definition at line 281 of file dynamic_news.py.
|
static |
Definition at line 258 of file dynamic_news.py.
|
static |
Definition at line 285 of file dynamic_news.py.
|
static |
Definition at line 286 of file dynamic_news.py.
|
static |
Definition at line 284 of file dynamic_news.py.
translator |
Definition at line 298 of file dynamic_news.py.
|
static |
Definition at line 276 of file dynamic_news.py.
|
static |
Definition at line 278 of file dynamic_news.py.
|
static |
Definition at line 275 of file dynamic_news.py.
|
static |
Definition at line 277 of file dynamic_news.py.
|
static |
Definition at line 274 of file dynamic_news.py.