From 9615596dd955663d2802bccc1c82d733cc496edc Mon Sep 17 00:00:00 2001 From: Mark Mine Date: Wed, 15 Oct 2003 03:01:26 +0000 Subject: [PATCH] Change to allow values to be different from choices --- direct/src/level/EditorGlobals.py | 2 +- direct/src/level/EntityTypes.py | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/direct/src/level/EditorGlobals.py b/direct/src/level/EditorGlobals.py index f037a62213..b4229176c5 100755 --- a/direct/src/level/EditorGlobals.py +++ b/direct/src/level/EditorGlobals.py @@ -8,7 +8,7 @@ username2entIdBase = { 'samir': 2*EntIdRange, 'skyler': 3*EntIdRange, 'joe': 4*EntIdRange, - 'mark': 5*EntIdRange, + 'DrEvil': 5*EntIdRange, } assert uniqueElements(username2entIdBase.values()) diff --git a/direct/src/level/EntityTypes.py b/direct/src/level/EntityTypes.py index 34190bc4a5..2ae75f790d 100755 --- a/direct/src/level/EntityTypes.py +++ b/direct/src/level/EntityTypes.py @@ -222,7 +222,12 @@ class Stomper(Nodepath): attribs = ( ('headScale', Vec3(1,1,1), 'scale'), ('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'), ('phaseShift', 0., 'float', {'min':0, 'max':1}), ('range', 6, 'float'), @@ -239,7 +244,12 @@ class StomperPair(Nodepath): attribs = ( ('headScale', Vec3(1,1,1), 'scale'), ('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'), ('phaseShift', 0., {'min':0, 'max':1}), ('range', 6, 'float'),