mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-26 21:22:27 -06:00
27 lines
619 B
Python
27 lines
619 B
Python
|
from direct.directnotify import DirectNotifyGlobal
|
||
|
import random
|
||
|
|
||
|
from otp.otpbase import OTPLocalizer
|
||
|
|
||
|
|
||
|
notify = DirectNotifyGlobal.directNotify.newCategory('SuitDialog')
|
||
|
|
||
|
|
||
|
def getBrushOffIndex(suitName):
|
||
|
if suitName in SuitBrushOffs:
|
||
|
brushoffs = SuitBrushOffs[suitName]
|
||
|
else:
|
||
|
brushoffs = SuitBrushOffs[None]
|
||
|
return random.randrange(len(brushoffs))
|
||
|
|
||
|
|
||
|
def getBrushOffText(suitName, index):
|
||
|
if suitName in SuitBrushOffs:
|
||
|
brushoffs = SuitBrushOffs[suitName]
|
||
|
else:
|
||
|
brushoffs = SuitBrushOffs[None]
|
||
|
return brushoffs[index]
|
||
|
|
||
|
|
||
|
SuitBrushOffs = OTPLocalizer.SuitBrushOffs
|