2
0
Эх сурвалжийг харах

Change to allow values to be different from choices

Mark Mine 22 жил өмнө
parent
commit
9615596dd9

+ 1 - 1
direct/src/level/EditorGlobals.py

@@ -8,7 +8,7 @@ username2entIdBase = {
     'samir':  2*EntIdRange,
     'samir':  2*EntIdRange,
     'skyler': 3*EntIdRange,
     'skyler': 3*EntIdRange,
     'joe':    4*EntIdRange,
     'joe':    4*EntIdRange,
-    'mark':   5*EntIdRange,
+    'DrEvil': 5*EntIdRange,
     }
     }
 assert uniqueElements(username2entIdBase.values())
 assert uniqueElements(username2entIdBase.values())
 
 

+ 12 - 2
direct/src/level/EntityTypes.py

@@ -222,7 +222,12 @@ class Stomper(Nodepath):
     attribs = (
     attribs = (
         ('headScale', Vec3(1,1,1), 'scale'),
         ('headScale', Vec3(1,1,1), 'scale'),
         ('motion', 3, 'choice',
         ('motion', 3, 'choice',
-         {'choiceSet':['linear','sinus','half sinus','slow fast']}),
+         {'choiceSet':['linear','sinus','half sinus','slow fast'],
+          'valueDict':{'linear':0,
+                       'sinus':1,
+                       'half sinus':2,
+                       'slow fast':3}
+          }),
         ('period', 2., 'float'),
         ('period', 2., 'float'),
         ('phaseShift', 0., 'float', {'min':0, 'max':1}),
         ('phaseShift', 0., 'float', {'min':0, 'max':1}),
         ('range', 6, 'float'),
         ('range', 6, 'float'),
@@ -239,7 +244,12 @@ class StomperPair(Nodepath):
     attribs = (
     attribs = (
         ('headScale', Vec3(1,1,1), 'scale'),
         ('headScale', Vec3(1,1,1), 'scale'),
         ('motion', 3, 'choice',
         ('motion', 3, 'choice',
-         {'choiceSet':['linear','sinus','half sinus','slow fast']}),
+         {'choiceSet':['linear','sinus','half sinus','slow fast'],
+          'valueDict':{'linear':0,
+                       'sinus':1,
+                       'half sinus':2,
+                       'slow fast':3}
+          }),
         ('period', 2., 'float'),
         ('period', 2., 'float'),
         ('phaseShift', 0., {'min':0, 'max':1}),
         ('phaseShift', 0., {'min':0, 'max':1}),
         ('range', 6, 'float'),
         ('range', 6, 'float'),