# Class definitions, hierarchical: # (Not exact syntax.) # Variables are typed. The 'ShowPriority' part hints # to the GUI if they are to be emphasised. ClassDef name=Chassis sup=CWSpace type=abstract DefVal name="vehicletype" type=enum inherit=true ShowPriority=high enumvalues=(car motorbike trike) # These depends upon other objects. # (Code updating these is called when they changes.) DefVal name=acceleration type=int inherit=true ShowPriority=( 0 high 5 low default normal) #(Hints to GUI.) DefVal name=maxspeed type=int inherit=true ShowPriority=high DefVal name=maxload min=0 type=int inherit=true ShowPriority=high #(Maxweight) # Objects below in hierarchy checks these. DefVal name=FP type=bool usermod=true inherit=true ShowPriority=high description="Fire Proof armor?" # (And lots of other details.) EndClassDef # ... # This is a (simplifed) specification for the Driver # object, which is added automatically to a design. # The 'allowbelow' list specifies those objects that # are lelal sub-objects to Driver. (Those that # classify themselves as 'personal'.) # The '_class_0-1' is a specification of the number # of objects allowed. ClassDef name=Driver sup=People type=obj allowbelow= ( personal _class_0-1 ) setDefaultValue name=space value=2 ShowPriority=low setDefaultValue name=weight value=150 ShowPriority=low EndClassDef # There are some code overrides that check additions # below the Driver object, too.