#NEWLINE# def add( self , entity ) : #NEWLINE# #INDENT# 'Add the entity to the set and all necessary class sets\n\t\tReturn the unique entity id for the entity, creating one\n\t\tas needed.\n\t\t' #NEWLINE# super ( WorldEntitySet , self ) . add ( entity ) #NEWLINE# for cls in entity . __class__ . __mro__ : #NEWLINE# #INDENT# if issubclass ( cls , Entity ) : #NEWLINE# #INDENT# self . world [ cls ] . entities . add ( entity )