#NEWLINE# def create_gib( life , icon , size , limb , velocity , color = ( tcod . white , None ) ) : #NEWLINE# #INDENT# _gib = { #NEWLINE# #INDENT# 'name' : 'gib' , #NEWLINE# 'prefix' : 'a' , #NEWLINE# 'type' : 'magazine' , #NEWLINE# 'icon' : icon , #NEWLINE# 'flags' : [ 'BLOODY' ] , #NEWLINE# 'description' : ( "%s's %s." % ( ' ' . join ( life [ 'name' ] ) , limb ) ) , #NEWLINE# 'size' : ( '%sx1' % size ) , #NEWLINE# 'material' : 'flesh' , #NEWLINE# 'thickness' : color , #NEWLINE# 'color' : color , #NEWLINE# #UNINDENT# } #NEWLINE# _i = items . get_item_from_uid ( items . create_item ( 'gib' , position = life [ 'pos' ] [ : ] , item = _gib ) ) #NEWLINE# _i [ 'velocity' ] = [ numbers . clip ( velocity [ 0 ] , ( - 3 ) , 3 ) , numbers . clip ( velocity [ 1 ] , ( - 3 ) , 3 ) , velocity [ 2 ] ] #NEWLINE# logging . debug ( 'Created gib.' )