-Rechargement des 3 premiers mondes pour éviter la perte de l'electron lors d'un stop.

-Correction d'un bogue lors d'un stop par la fonction "reallystop"
-Renommage des fonctions programmée avec le préfixe "prog_" et les fonctions événementielles de menu par "click_", "drag_" et "motion_".
This commit is contained in:
Le_dahut 2014-05-14 18:36:02 +02:00
parent bc7229a61f
commit b676b676f8
3 changed files with 116 additions and 109 deletions

View File

@ -209,15 +209,15 @@ def savelevel(w,l):
''' *********************************************************************************************** '''
''' Fonctions programmees '''
def menu(dt,leveler):
def prog_menu(dt,leveler):
global level,over
level=leveler
over=0
def calculate(dt):
def prog_calculate(dt):
nextgrid()
def refresh(dt):
def prog_refresh(dt):
global world,level
if player.source and player.source.video_format:
glColor3ub(255,255,255)
@ -915,26 +915,31 @@ def drawgrid(zoom):
''' Fonctions gestion du monde '''
def reallystop():
global play,world,level,stat,stat_var,current,cycle,temp,nrj,rayon
global play,world,level,stat,stat_var,current,cycle,temp,nrj,rayon,tech
play=0
clock.unschedule(calculate)
current=copy.deepcopy(worlds[world][level]['current'])
cycle=worlds[world][level]['cycle']
temp=worlds[world][level]['temp']
nrj=worlds[world][level]['nrj']
rayon=worlds[world][level]['rayon']
erase()
retriern()
stat=[0,0,0,0,0,0,0,0,0]
stat_var=[]
if len(stat_var)==0:
for i in range(len(statedvar)):
stat_var.append([0])
clock.unschedule(prog_calculate)
if level<3:
readlevel(world,level,False)
else:
current=copy.deepcopy(worlds[world][level]['current'])
cycle=worlds[world][level]['cycle']
temp=worlds[world][level]['temp']
nrj=worlds[world][level]['nrj']
rayon=worlds[world][level]['rayon']
erase()
retriern()
stat=[0,0,0,0,0,0,0,0,0]
stat_var=[]
if len(stat_var)==0:
for i in range(len(statedvar)):
stat_var.append([0])
menus[0][1]['choose']=0
def reallyrun():
global play
play=0.15625
clock.schedule_interval(calculate,play)
global play
play=0.15625
clock.schedule_interval(prog_calculate,play)
menus[0][1]['choose']=1
def retriern():
for x in range(1,sizex-1):
@ -977,7 +982,7 @@ def gameover_ok():
reallystop()
savelevel(world,level)
sync()
clock.schedule_once(menu,2,level)
clock.schedule_once(prog_menu,2,level)
def itsvictory_ok():
global world,level,finished
@ -986,21 +991,21 @@ def itsvictory_ok():
finished=list(set(finished))
savelevel(world,level)
sync()
clock.schedule_once(menu,2,-1)
clock.schedule_once(prog_menu,2,-1)
def gameover(x):
global over
over=x
sound.queue(pyglet.resource.media("sound/gameover.mp3"))
sound.play()
clock.unschedule(calculate)
clock.unschedule(prog_calculate)
def itsvictory():
global over
over=-1
sound.queue(pyglet.resource.media("sound/victoire.mp3"))
sound.play()
clock.unschedule(calculate)
clock.unschedule(prog_calculate)
def infos():
global stat,sizex,sizey,cycle,thecout,victory,current
@ -1315,7 +1320,7 @@ glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);'''
glEnable(GL_LINE_STIPPLE)
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
win.set_caption("Wirechem: The new chemistry game")
clock.schedule(refresh)
clock.schedule(prog_refresh)
player = pyglet.media.Player()
ambiance = pyglet.media.Player()
sound = pyglet.media.Player()
@ -1373,20 +1378,20 @@ txt_video=pyglet.text.Label("Options Video",font_name='Mechanihan',font_size=30,
''' *********************************************************************************************** '''
''' Fonctions liees aux menus '''
def sound(state):
def click_sound(state):
print "sound"
def nosound(state):
def click_nosound(state):
print "nosound"
def settings(state):
def click_settings(state):
global level,world
reallystop()
savelevel(world,level)
sync()
level=-2
def loadfromit(state):
def click_loadit(state):
global users,world_art,world_new,world,level
if state['j']==1:
readlevel(world,level,False)
@ -1394,24 +1399,24 @@ def loadfromit(state):
world_new=copy.deepcopy(users[len(users)-state['j']+1][1])
world_art=copy.deepcopy(users[len(users)-state['j']+1][2])
def loadfrom(state):
def click_load(state):
global menus,savenames,users
if menus[2][0]['visible']:
menus[2][0]['visible']=False
return
if len(menus[2])<=1:
menus[2].append({'click': 'loadfromit', 'motion':'popup', 'tech':1, 'value':'Version originale', 'size':0, 'icon': {'color': [255, 100, 100], 'text': '#', 'activable': False},'active':True,'variable':True,'visible':True,'separe':True,'squarred':False})
menus[2].append({'click': 'click_loadit', 'motion':'motion_popup', 'tech':1, 'value':'Version originale', 'size':0, 'icon': {'color': [255, 100, 100], 'text': '#', 'activable': False},'active':True,'variable':True,'visible':True,'separe':True,'squarred':False})
for i in range(len(savenames)):
menus[2].append({'click': 'loadfromit', 'motion':'popup', 'tech':1, 'value':'#users[len(users)-'+str(i)+'-1][0].strftime("%Y-%m-%d %H:%M")', 'size':0, 'icon': {'color': [255, 255, 255], 'colorise':True, 'text': savenames[i], 'activable': False},'active':'len(users)>'+str(i),'variable':True,'visible':True,'separe':False,'squarred':False})
menus[2].append({'click': 'click_loadit', 'motion':'motion_popup', 'tech':1, 'value':'#users[len(users)-'+str(i)+'-1][0].strftime("%Y-%m-%d %H:%M")', 'size':0, 'icon': {'color': [255, 255, 255], 'colorise':True, 'text': savenames[i], 'activable': False},'active':'len(users)>'+str(i),'variable':True,'visible':True,'separe':False,'squarred':False})
menus[2][0]['visible']=True
def save(state):
def click_save(state):
global world_art,world_dat,world,level,users
users.append([datetime.datetime.now(),copy.deepcopy(world_new),copy.deepcopy(world_art)])
savelevel(world,level)
sync()
def speed(state):
def click_speed(state):
global play,zoom
if state.has_key('-'):
play=float(play)*2
@ -1421,21 +1426,21 @@ def speed(state):
play=0.01953125
if play<0.01953125:
play=2.5
clock.unschedule(calculate)
clock.schedule_interval(calculate,play)
clock.unschedule(prog_calculate)
clock.schedule_interval(prog_calculate,play)
def othersit(state):
def click_choose(state):
menus[0][18]['icon']=copy.deepcopy(menus[3][state['j']]['value'])
def others(state):
def click_drag_transmuter(state):
global tech,menus
if state['onmenu']:
if menus[3][0]['visible']:
menus[3][0]['visible']=False
return
if len(menus[3])<=1:
for i in range(196608,196608+len(savenames)):
menus[3].append({'click': 'othersit', 'motion':'popup', 'tech':art[i]['tech'], 'value':art[i], 'size':0, 'icon':art[i],'active':True,'variable':True,'visible':True,'separe':False,'squarred':False})
for i in range(196608,196637):
menus[3].append({'click': 'click_choose', 'motion':'motion_popup', 'tech':art[i]['tech'], 'value':art[i], 'size':0, 'icon':art[i],'active':True,'variable':True,'visible':True,'separe':False,'squarred':False})
menus[3][0]['visible']=True
return
if state['realx']>=1 and state['realy']>=1 and state['realx']<sizex-1 and state['realy']<sizey-1 and play==0 and (world_art[state['realx']][state['realy']]==0 or art[world_art[state['realx']][state['realy']]]['tech']<tech):
@ -1447,10 +1452,10 @@ def others(state):
world_art[state['realx']][state['realy']] = value
infos()
def setnothinga(state):
def click_nothing(state):
state()
def setnothing(state):
def click_drag_nothing(state):
global tech
if state['realx']>=1 and state['realy']>=1 and state['realx']<sizex-1 and state['realy']<sizey-1 and play==0:
if world_art[state['realx']][state['realy']] == art['nothing']['value']:
@ -1459,44 +1464,44 @@ def setnothing(state):
world_art[state['realx']][state['realy']] = art['nothing']['value']
infos()
def setcopper(state):
def click_drag_copper(state):
if state['realx']>=1 and state['realy']>=1 and state['realx']<sizex-1 and state['realy']<sizey-1 and play==0:
if world_new[state['realx']][state['realy']]<art['tail']['value']:
if cout-thecout-art['copper']['cout'] >= 0:
world_new[state['realx']][state['realy']] = art['copper']['value']
infos()
def setfiber(state):
def click_drag_fiber(state):
if state['realx']>=1 and state['realy']>=1 and state['realx']<sizex-1 and state['realy']<sizey-1 and play==0:
if world_art[state['realx']][state['realy']]==0 and world_new[state['realx']][state['realy']]<art['tail']['value']:
if cout-thecout-art['fiber']['cout'] >= 0:
world_new[state['realx']][state['realy']]=art['fiber']['value']
infos()
def settutoriel(state):
def click_tutoriel(state):
print "tuto"
def setpopup(state):
def click_popup(state):
print "popup"
def setsimple(state):
def click_simple(state):
print "simple"
def levels(state):
def click_menu(state):
global level,world
reallystop()
savelevel(world,level)
sync()
level=-1
def exits(state):
def click_exit(state):
global level,world
if level>=0:
savelevel(world,level)
sync()
pyglet.app.exit()
def stater(state):
def click_stat(state):
global seestat
if seestat>3:
seestat=0
@ -1504,39 +1509,40 @@ def stater(state):
seestat=seestat+1
resize()
def stop(state):
def click_stop(state):
reallystop()
def run(state):
def click_run(state):
reallyrun()
def move(state):
def drag_move(state):
global decx,decy
decx=decx+state['dx']
decy=decy+state['dy']
def fullscreen(state):
def click_fullscreen(state):
win.set_fullscreen(fullscreen=True)
resize()
def windowed(state):
def click_windowed(state):
win.set_fullscreen(fullscreen=False)
resize()
def zoomm(state):
def click_zoomm(state):
global zoom,decx,decy
decx=decx+2*state['realx']
decy=decy+2*state['realy']
zoom=zoom-2
def zoomp(state):
def click_zoomp(state):
global zoom,decx,decy
decx=decx-2*state['realx']
decy=decy-2*state['realy']
zoom=zoom+2
def popup(state):
def motion_popup(state):
global allcout,menus
if menus[0][12]['choose']==0: return
allcout[0]=state['x']
allcout[1]=state['y']
if type(menus[state['i']][state['j']]['value']) is list:
@ -1567,11 +1573,12 @@ def launch(x,y,dx,dy,i,j,buttons,modifiers,onmenu):
if menus[i][j].has_key(state['event']):
if type(menus[i][j][state['event']]) is list:
if callable(eval(menus[i][j][state['event']][menus[i][j]['choose']])):
eval(menus[i][j][state['event']][menus[i][j]['choose']]+"("+str(state)+")")
choosed=menus[i][j]['choose']
if state['event']=='click':
menus[i][j]['choose']+=1
if menus[i][j]['choose']>=len(menus[i][j]['click']):
menus[i][j]['choose']=0
eval(menus[i][j][state['event']][choosed]+"("+str(state)+")")
return True
else:
if callable(eval(menus[i][j][state['event']])):
@ -1634,13 +1641,13 @@ def on_key_press(symbol, modifiers):
erase()
elif symbol==key.RETURN:
if play>0:
stop({})
reallystop()
else:
run({})
reallyrun()
elif symbol==key.NUM_SUBTRACT:
speed({'-':True})
click_speed({'-':True})
elif symbol==key.NUM_ADD:
speed({'+':True})
click_speed({'+':True})
@win.event
def on_mouse_motion(x, y, dx, dy):

BIN
dbdata

Binary file not shown.

92
dbsrc
View File

@ -961,38 +961,38 @@ art={
196608: {'nrj': 0, 'cout': 0, 'temp': 0, 'nom': 'null', 'color': [0, 0, 0], 'text': '', 'value': 196608, 'cat': 0, 'tech': 0, 'activable': False},
196609: {'nrj': 0, 'cout': 60, 'temp': 0.05, 'nom': 'positiver', 'color': [255, 0, 0], 'text': '+', 'value': 196609, 'cat': 1, 'tech': 2, 'activable': True},
196610: {'nrj': 0, 'cout': 60, 'temp': 0.05, 'nom': 'negativer', 'color': [0, 0, 255], 'text': '-', 'value': 196610, 'cat': 1, 'tech': 4, 'activable': True},
196611: {'nrj': 0, 'cout': 20, 'temp': 0.05, 'nom': 'inverter', 'color': [125, 13, 114], 'text': '\xc2\xb1', 'value': 196611, 'cat': 1, 'tech': 1, 'activable': False},
196611: {'nrj': 0, 'cout': 20, 'temp': 0.05, 'nom': 'inverter', 'color': [125, 13, 114], 'text': '±', 'value': 196611, 'cat': 1, 'tech': 1, 'activable': False},
196612: {'nrj': 0, 'cout': 20, 'temp': 0.05, 'nom': 'neutraliser', 'color': [90, 90, 90], 'text': '~', 'value': 196612, 'cat': 1, 'tech': 4, 'activable': False},
196613: {'nrj': 0, 'cout': 25, 'temp': 0.05, 'nom': 'dir1', 'color': [125, 13, 114], 'text': '\xe2\x97\x84', 'value': 196613, 'cat': 2, 'tech': 5, 'activable': False},
196614: {'nrj': 0, 'cout': 25, 'temp': 0.05, 'nom': 'dir2', 'color': [125, 13, 114], 'text': '\xe2\x96\xba', 'value': 196614, 'cat': 2, 'tech': 5, 'activable': False},
196615: {'nrj': 0, 'cout': 150, 'temp': 0.05, 'nom': 'trierb', 'color': [0, 0, 255], 'text': '\xe2\x96\xaa', 'value': 196615, 'cat': 3, 'tech': 6, 'activable': False},
196616: {'nrj': 0, 'cout': 150, 'temp': 0.05, 'nom': 'trierr', 'color': [255, 0, 0], 'text': '\xe2\x96\xaa', 'value': 196616, 'cat': 3, 'tech': 6, 'activable': False},
196617: {'nrj': 0, 'cout': 200, 'temp': 0.05, 'nom': 'trierp', 'color': [44, 120, 44], 'text': '\xe2\x96\xaa', 'value': 196617, 'cat': 3, 'tech': 8, 'activable': True},
196618: {'nrj': 0, 'cout': 150, 'temp': 0.05, 'nom': 'trierg', 'color': [125, 13, 114], 'text': '\xe2\x86\x95', 'value': 196618, 'cat': 3, 'tech': 5, 'activable': False},
196613: {'nrj': 0, 'cout': 25, 'temp': 0.05, 'nom': 'dir1', 'color': [125, 13, 114], 'text': '', 'value': 196613, 'cat': 2, 'tech': 5, 'activable': False},
196614: {'nrj': 0, 'cout': 25, 'temp': 0.05, 'nom': 'dir2', 'color': [125, 13, 114], 'text': '', 'value': 196614, 'cat': 2, 'tech': 5, 'activable': False},
196615: {'nrj': 0, 'cout': 150, 'temp': 0.05, 'nom': 'trierb', 'color': [0, 0, 255], 'text': '', 'value': 196615, 'cat': 3, 'tech': 6, 'activable': False},
196616: {'nrj': 0, 'cout': 150, 'temp': 0.05, 'nom': 'trierr', 'color': [255, 0, 0], 'text': '', 'value': 196616, 'cat': 3, 'tech': 6, 'activable': False},
196617: {'nrj': 0, 'cout': 200, 'temp': 0.05, 'nom': 'trierp', 'color': [44, 120, 44], 'text': '', 'value': 196617, 'cat': 3, 'tech': 8, 'activable': True},
196618: {'nrj': 0, 'cout': 150, 'temp': 0.05, 'nom': 'trierg', 'color': [125, 13, 114], 'text': '', 'value': 196618, 'cat': 3, 'tech': 5, 'activable': False},
196619: {'nrj': 0, 'cout': 250, 'temp': 0.05, 'nom': 'triern1-1', 'color': [125, 13, 114], 'text': '1', 'value': 196619, 'cat': 3, 'tech': 8, 'activable': False},
196620: {'nrj': 0, 'cout': 250, 'temp': 0.05, 'nom': 'triern2-2', 'color': [125, 13, 114], 'text': '2', 'value': 196620, 'cat': 3, 'tech': 8, 'activable': False},
196621: {'nrj': 0, 'cout': 250, 'temp': 0.05, 'nom': 'triern4-4', 'color': [125, 13, 114], 'text': '4', 'value': 196621, 'cat': 3, 'tech': 8, 'activable': False},
196622: {'nrj': 0, 'cout': 300, 'temp': 0.05, 'nom': 'triern4-4a', 'color': [125, 13, 114], 'text': '4', 'value': 196622, 'cat': 3, 'tech': 9, 'activable': True},
196623: {'nrj': 0, 'cout': 300, 'temp': 0.05, 'nom': 'triern8-8a', 'color': [125, 13, 114], 'text': '8', 'value': 196623, 'cat': 3, 'tech': 9, 'activable': True},
196624: {'nrj': 1, 'cout': 50, 'temp': 0, 'nom': 'canonh', 'color': [90, 90, 90], 'text': '\xe2\x96\xa0', 'value': 196624, 'cat': 4, 'tech': 1, 'activable': True},
196625: {'nrj': 0, 'cout': 20, 'temp': 0, 'nom': 'canont', 'color': [90, 90, 90], 'text': '\xe2\x96\xa1', 'value': 196625, 'cat': 4, 'tech': 5, 'activable': True},
196624: {'nrj': 1, 'cout': 50, 'temp': 0, 'nom': 'canonh', 'color': [90, 90, 90], 'text': '', 'value': 196624, 'cat': 4, 'tech': 1, 'activable': True},
196625: {'nrj': 0, 'cout': 20, 'temp': 0, 'nom': 'canont', 'color': [90, 90, 90], 'text': '', 'value': 196625, 'cat': 4, 'tech': 5, 'activable': True},
196626: {'nrj': 0, 'cout': 40, 'temp': 0, 'nom': 'destroyer', 'color': [125, 13, 114], 'text': 'X', 'value': 196626, 'cat': 4, 'tech': 7, 'activable': False},
196627: {'nrj': 0, 'cout': 30, 'temp': 0.5, 'nom': 'photonizer', 'color': [44, 120, 44], 'text': '\xe2\x89\xa0', 'value': 196627, 'cat': 4, 'tech': 2, 'activable': False},
196627: {'nrj': 0, 'cout': 30, 'temp': 0.5, 'nom': 'photonizer', 'color': [44, 120, 44], 'text': '', 'value': 196627, 'cat': 4, 'tech': 2, 'activable': False},
196628: {'nrj': 0, 'cout': 150, 'temp': 1.0, 'nom': 'photonizer2', 'color': [44, 120, 44], 'text': '=', 'value': 196628, 'cat': 4, 'tech': 8, 'activable': False},
196629: {'nrj': 0, 'cout': 100, 'temp': 2, 'nom': 'reactor', 'color': [125, 13, 114], 'text': '\xce\xa6', 'value': 196629, 'cat': 4, 'tech': 3, 'activable': True},
196629: {'nrj': 0, 'cout': 100, 'temp': 2, 'nom': 'reactor', 'color': [125, 13, 114], 'text': 'Φ', 'value': 196629, 'cat': 4, 'tech': 3, 'activable': True},
196630: {'nrj': 0, 'cout': 80, 'temp': 0, 'nom': 'senserK', 'color': [50, 50, 150], 'text': 'K', 'value': 196630, 'cat': 5, 'tech': 3, 'activable': True},
196631: {'nrj': 0, 'cout': 80, 'temp': 0, 'nom': 'senserL', 'color': [50, 50, 150], 'text': 'L', 'value': 196631, 'cat': 5, 'tech': 6, 'activable': True},
196632: {'nrj': 0, 'cout': 80, 'temp': 0, 'nom': 'senserM', 'color': [50, 50, 150], 'text': 'M', 'value': 196632, 'cat': 5, 'tech': 7, 'activable': True},
196633: {'nrj': 0, 'cout': 80, 'temp': 0, 'nom': 'senserN', 'color': [50, 50, 150], 'text': 'N', 'value': 196633, 'cat': 5, 'tech': 8, 'activable': True},
196634: {'nrj': 0, 'cout': 80, 'temp': 0, 'nom': 'sensern', 'color': [75, 119, 157], 'text': 'n', 'value': 196634, 'cat': 5, 'tech': 4, 'activable': True},
196635: {'nrj': 0, 'cout': 80, 'temp': 0, 'nom': 'senserp', 'color': [122, 49, 25], 'text': 'p', 'value': 196635, 'cat': 5, 'tech': 3, 'activable': True},
196636: {'nrj': 0, 'cout': 300, 'temp': 0, 'nom': 'calor', 'color': [240, 30, 30], 'text': '\xd0\x96', 'value': 196636, 'cat': 6, 'tech': 9, 'activable': False},
196636: {'nrj': 0, 'cout': 300, 'temp': 0, 'nom': 'calor', 'color': [240, 30, 30], 'text': 'Ж', 'value': 196636, 'cat': 6, 'tech': 9, 'activable': False},
196637: {'nrj': 0, 'cout': 0, 'temp': 0, 'nom': 'sensere', 'color': [60, 60, 60], 'text': 'e', 'value': 196637, 'cat': 7, 'tech': 0, 'activable': False},
196638: {'nrj': 0, 'cout': 0, 'temp': 0, 'nom': 'senserf', 'color': [200, 50, 50], 'text': 'e', 'value': 196638, 'cat': 7, 'tech': 0, 'activable': False},
196639: {'nrj': 0, 'cout': 0, 'temp': 0, 'nom': 'senserg', 'color': [0, 0, 255], 'text': 'e', 'value': 196639, 'cat': 7, 'tech': 0, 'activable': False},
196640: {'nrj': 0, 'cout': 0, 'temp': 0, 'nom': 'senserh', 'color': [60, 60, 60], 'text': 'e', 'value': 196640, 'cat': 7, 'tech': 0, 'activable': True},
196641: {'nrj': 0, 'cout': 0, 'temp': 0.05, 'nom': 'positiver2', 'color': [255, 0, 0], 'text': '+', 'value': 196641, 'cat': 7, 'tech': 0, 'activable': False},
196642: {'nrj': 1, 'cout': 0, 'temp': 0, 'nom': 'canonh2', 'color': [125, 13, 114], 'text': '\xe2\x96\xa0', 'value': 196642, 'cat': 7, 'tech': 0, 'activable': False},
196642: {'nrj': 1, 'cout': 0, 'temp': 0, 'nom': 'canonh2', 'color': [125, 13, 114], 'text': '', 'value': 196642, 'cat': 7, 'tech': 0, 'activable': False},
196643: {'nrj': 0, 'cout': 250, 'temp': 0.05, 'nom': 'triern0-1', 'color': [255, 255, 255], 'text': '0', 'value': 196643, 'cat': 7, 'tech': 0, 'activable': False},
196644: {'nrj': 0, 'cout': 250, 'temp': 0.05, 'nom': 'triern0-2', 'color': [255, 255, 255], 'text': '0', 'value': 196644, 'cat': 7, 'tech': 0, 'activable': False},
196645: {'nrj': 0, 'cout': 250, 'temp': 0.05, 'nom': 'triern0-4', 'color': [255, 255, 255], 'text': '0', 'value': 196645, 'cat': 7, 'tech': 0, 'activable': False},
@ -1012,8 +1012,8 @@ art={
196659: {'nrj': 0, 'cout': 300, 'temp': 0.05, 'nom': 'triern2-4a', 'color': [125, 13, 114], 'text': '2', 'value': 196659, 'cat': 7, 'tech': 0, 'activable': True},
196660: {'nrj': 0, 'cout': 300, 'temp': 0.05, 'nom': 'triern1-4a', 'color': [125, 13, 114], 'text': '1', 'value': 196660, 'cat': 7, 'tech': 0, 'activable': True},
196661: {'nrj': 0, 'cout': 300, 'temp': 0.05, 'nom': 'triern0-4a', 'color': [255, 255, 255], 'text': '0', 'value': 196661, 'cat': 7, 'tech': 0, 'activable': True},
196662: {'nrj': 0, 'cout': 25, 'temp': 0.05, 'nom': 'dir3', 'color': [125, 13, 114], 'text': '\xe2\x96\xb2', 'value': 196662, 'cat': 2, 'tech': 5, 'activable': False},
196663: {'nrj': 0, 'cout': 25, 'temp': 0.05, 'nom': 'dir4', 'color': [125, 13, 114], 'text': '\xe2\x96\xbc', 'value': 196663, 'cat': 2, 'tech': 5, 'activable': False},
196662: {'nrj': 0, 'cout': 25, 'temp': 0.05, 'nom': 'dir3', 'color': [125, 13, 114], 'text': '', 'value': 196662, 'cat': 2, 'tech': 5, 'activable': False},
196663: {'nrj': 0, 'cout': 25, 'temp': 0.05, 'nom': 'dir4', 'color': [125, 13, 114], 'text': '', 'value': 196663, 'cat': 2, 'tech': 5, 'activable': False},
0: {'color': [0, 0, 0], 'nom': 'nothing', 'cout': 0, 'value': 0},
1: {'color': [240, 100, 38], 'nom': 'copper', 'cout': 1, 'value': 1},
2: {'color': [208, 213, 79], 'nom': 'fiber', 'cout': 5, 'value': 2},
@ -1036,40 +1036,40 @@ art={
menus=[
[
{'motion':'popup','place':'bottom','visible':True,'size':50,'variable':False,'selectable':True,'mouse':[1,5,6]},
{'motion':'popup','click': ['run','stop'], 'tech':-1, 'value':['Simuler','Fin simulation'], 'size':45, 'icon': ['picture/run.png','picture/stop.png'], 'choose': 0,'variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'popup','click': 'speed', 'tech':0, 'value':'Vitesse', 'size':45,'icon': 'picture/speed.png','variable':False,'visible':True,'separe':True,'squarred':False,'active': True},
{'motion':'popup','click': 'loadfrom', 'tech':1, 'value':'Charger', 'size':45,'icon': 'picture/raz.png','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'popup','click': 'save', 'tech':1, 'value':'Enregistrer', 'size':45,'icon': 'picture/save.png','variable':False,'visible':True,'separe':True,'squarred':False,'active': True},
{'motion':'popup','drag': 'move', 'tech':-1, 'value':'Deplacer', 'size':45,'icon': 'picture/move.png','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'popup','click': 'zoomp','tech':-1, 'value':'Zommer', 'size':45,'icon': 'picture/zoomp.png','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'popup','click': 'zoomm', 'tech':-1, 'value':'Dezommer', 'size':45,'icon': 'picture/zoomm.png','variable':False,'visible':True,'separe':True,'squarred':False,'active': False},
{'motion':'popup','click': 'stater', 'tech':2, 'value':'Statistiques...', 'size':45,'icon': 'picture/stat.png','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'popup','click': 'levels', 'tech':-1, 'value':'Laboratoires', 'size':45,'icon': 'picture/levels.png','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'popup','click': ['fullscreen','windowed'], 'tech':-1, 'value':['Plein ecran','Fenetre'], 'size':45,'icon': ['picture/screen.png','picture/windows.png'], 'choose': 0,'variable':False,'visible':'win.width>1450','separe':False,'squarred':False,'active': True},
{'motion':'popup','click': ['sound','nosound'], 'tech':-1, 'value':['Activer son','Desactiver son'], 'size':45, 'icon': ['picture/sound.png','picture/nosound.png'], 'choose': 0,'variable':False,'visible':'win.width>1450','separe':False,'squarred':False,'active': True},
{'motion':'popup','click': ['settutoriel','setpopup','setsimple'], 'tech':-1, 'value':['Activer Tutoriel','Activer Popup','Sans aide/Tutoriel',], 'size':45,'icon': ['picture/tuto.png','picture/popup.png','picture/nothing.png'], 'choose': 0,'variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'popup','click': 'settings', 'tech':-1, 'value':'Options...', 'size':45,'icon': 'picture/settings.png','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'popup','click': 'exits', 'tech':-1, 'value':'Quitter', 'size':45,'icon': 'picture/exits.png','variable':False,'visible':True,'separe':True,'squarred':False,'active': True},
{'motion':'popup','click': 'setcopper', 'drag': 'setcopper' ,'tech':0, 'value':'Cuivre', 'size':45,'icon': [240, 100, 38],'variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'popup','click': 'setfiber', 'drag': 'setfiber', 'tech':2, 'value':'Fibre', 'size':45,'icon': [208, 213, 79],'variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'popup','click': 'setnothing', 'drag': 'setnothing','tech':0, 'value':'Effacer', 'size':45,'icon': [0, 0, 0],'variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'popup','click': 'others', 'drag': 'others', 'tech':2, 'value':'Transmuteurs', 'size':45,'icon': '','variable':False,'visible':True,'separe':True,'squarred':False,'active': True},
{'motion':'popup','click': 'stat', 'tech':2, 'value':'Statistiques totaux', 'size':0, 'icon': 'drawstat', 'params': '''[stat[0],stat[1],stat[3],stat[4],stat[5],stat[6],stat[2],stat[7],stat[8]],[art['headb2']['color'],art['headb']['color'],art['head']['color'],art['head2']['color'],art['headr']['color'],art['headr2']['color'],art['headp']['color'],art['neut']['color'],art['prot']['color']]''', 'variable':True,'visible':'win.width<1280','separe':False,'squarred':False,'active': True},
{'motion':'popup','click': 'stat1', 'tech':2, 'value':'Statistiques electrons', 'size':0, 'icon': 'drawstat', 'params': '''[stat[0],stat[1],stat[3],stat[4],stat[5],stat[6]],[art['headb2']['color'],art['headb']['color'],art['head']['color'],art['head2']['color'],art['headr']['color'],art['headr2']['color']]''', 'variable':True,'visible':'win.width>=1280','separe':False,'squarred':False,'active': True},
{'motion':'popup','click': 'stat2', 'tech':2, 'value':'Statistiques hors electrons', 'size':0, 'icon': 'drawstat', 'params': '''[stat[2],stat[7],stat[8]],[art['headp']['color'],art['neut']['color'],art['prot']['color']]''','variable':True,'visible':'win.width>=1280','separe':False,'squarred':False,'active': True},
{'motion':'popup','click': 'cout', 'tech':0,'text':'#str(cout-thecout)', 'value':'Argent', 'size':140, 'icon': 'picture/cout.png','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'popup','click': 'tech', 'tech':1,'text':'#str(tech)', 'value':'Degre technologique', 'size':65, 'icon': 'picture/tech.png','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'motion_motion_popup','place':'bottom','visible':True,'size':50,'variable':False,'selectable':True,'mouse':[1,5,6]},
{'motion':'motion_popup','click': ['click_run','click_stop'], 'tech':-1, 'value':['Simuler','Fin simulation'], 'size':45, 'icon': ['picture/run.png','picture/stop.png'], 'choose': 0,'variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_speed', 'tech':0, 'value':'Vitesse', 'size':45,'icon': 'picture/speed.png','variable':False,'visible':True,'separe':True,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_load', 'tech':1, 'value':'Charger', 'size':45,'icon': 'picture/raz.png','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_save', 'tech':1, 'value':'Enregistrer', 'size':45,'icon': 'picture/save.png','variable':False,'visible':True,'separe':True,'squarred':False,'active': True},
{'motion':'motion_popup','drag': 'drag_move', 'tech':-1, 'value':'Deplacer', 'size':45,'icon': 'picture/move.png','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_zoomp','tech':-1, 'value':'Zommer', 'size':45,'icon': 'picture/zoomp.png','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_zoomm', 'tech':-1, 'value':'Dezommer', 'size':45,'icon': 'picture/zoomm.png','variable':False,'visible':True,'separe':True,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_stat', 'tech':2, 'value':'Statistiques...', 'size':45,'icon': 'picture/stat.png','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_menu', 'tech':-1, 'value':'Laboratoires', 'size':45,'icon': 'picture/levels.png','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': ['click_fullscreen','click_windowed'], 'tech':-1, 'value':['Plein ecran','Fenetre'], 'size':45,'icon': ['picture/screen.png','picture/windows.png'], 'choose': 0,'variable':False,'visible':'win.width>1450','separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': ['click_sound','click_nosound'], 'tech':-1, 'value':['Activer son','Desactiver son'], 'size':45, 'icon': ['picture/sound.png','picture/nosound.png'], 'choose': 0,'variable':False,'visible':'win.width>1450','separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': ['click_tutoriel','click_popup','click_simple'], 'tech':-1, 'value':['Activer Tutoriel','Activer Aide','Sans Aide/Tutoriel',], 'size':45,'icon': ['picture/tuto.png','picture/popup.png','picture/nothing.png'], 'choose': 2,'variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_settings', 'tech':-1, 'value':'Options...', 'size':45,'icon': 'picture/settings.png','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_exit', 'tech':-1, 'value':'Quitter', 'size':45,'icon': 'picture/exits.png','variable':False,'visible':True,'separe':True,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_drag_copper', 'drag': 'click_drag_copper' ,'tech':0, 'value':'Cuivre', 'size':45,'icon': [240, 100, 38],'variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_drag_fiber', 'drag': 'click_drag_fiber', 'tech':2, 'value':'Fibre', 'size':45,'icon': [208, 213, 79],'variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_drag_nothing', 'drag': 'click_drag_nothing','tech':0, 'value':'Effacer', 'size':45,'icon': [0, 0, 0],'variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_drag_transmuter', 'drag': 'click_drag_transmuter', 'tech':2, 'value':'Transmuteurs', 'size':45,'icon': '','variable':False,'visible':True,'separe':True,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_stat', 'tech':2, 'value':'Statistiques totaux', 'size':0, 'icon': 'drawstat', 'params': '''[stat[0],stat[1],stat[3],stat[4],stat[5],stat[6],stat[2],stat[7],stat[8]],[art['headb2']['color'],art['headb']['color'],art['head']['color'],art['head2']['color'],art['headr']['color'],art['headr2']['color'],art['headp']['color'],art['neut']['color'],art['prot']['color']]''', 'variable':True,'visible':'win.width<1280','separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_stat', 'tech':2, 'value':'Statistiques electrons', 'size':0, 'icon': 'drawstat', 'params': '''[stat[0],stat[1],stat[3],stat[4],stat[5],stat[6]],[art['headb2']['color'],art['headb']['color'],art['head']['color'],art['head2']['color'],art['headr']['color'],art['headr2']['color']]''', 'variable':True,'visible':'win.width>=1280','separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_stat', 'tech':2, 'value':'Statistiques hors electrons', 'size':0, 'icon': 'drawstat', 'params': '''[stat[2],stat[7],stat[8]],[art['headp']['color'],art['neut']['color'],art['prot']['color']]''','variable':True,'visible':'win.width>=1280','separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_cout', 'tech':0,'text':'#str(cout-thecout)', 'value':'Argent', 'size':140, 'icon': 'picture/cout.png','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_tech', 'tech':1,'text':'#str(tech)', 'value':'Degre technologique', 'size':65, 'icon': 'picture/tech.png','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
]
,
[
{'motion':'popup','place':'top','visible':True,'variable':False,'size':50,'selectable':False},
{'motion':'popup','click': 'cycle','text':'#str(cycle)','text2':"#if maxcycle<99999: return str(maxcycle) else: return 'illimite'", 'tech':-2, 'value':'Nb de cycles', 'size':0, 'icon': 'picture/cycle.png', 'variable':True,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'popup','click': 'nrj','text':'#str(nrj)','text2':"#if maxnrj<99999: return str(maxnrj) else: return 'illimite'", 'tech':5, 'value':'Quantite energie', 'size':0, 'icon': 'picture/nrj.png','variable':True,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'popup','click': 'rayon','text':'#str(rayon)','text2':"#if maxrayon<99999: return str(maxrayon) else: return 'illimite'", 'tech':6, 'value':'Niveau de rayonnements', 'size':0,'icon': 'picture/rayon.png','variable':True,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'popup','click': 'temp','text':'#str(temp)','text2':"#if maxtemp<99999: return str(maxtemp) else: return 'illimite'", 'tech':7, 'value':'Temperature ambiante', 'size':0,'icon': 'picture/temp.png','variable':True,'visible':True,'separe':True,'squarred':False,'active': True},
{'motion':'popup','click': 'objectif', 'tech':-1, 'value':'Objectif a atteindre', 'size':44, 'icon': 'drawelement','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'popup','click': 'condition', 'tech':0, 'value':'Conditions de victoire', 'size':300, 'icon': 'drawcondvictory','params': '[90,90,90]','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','place':'top','visible':True,'variable':False,'size':50,'selectable':False},
{'motion':'motion_popup','click': 'click_cycle','text':'#str(cycle)','text2':"#if maxcycle<99999: return str(maxcycle) else: return 'illimite'", 'tech':0, 'value':'Nb de cycles', 'size':0, 'icon': 'picture/cycle.png', 'variable':True,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_nrj','text':'#str(nrj)','text2':"#if maxnrj<99999: return str(maxnrj) else: return 'illimite'", 'tech':5, 'value':'Quantite energie', 'size':0, 'icon': 'picture/nrj.png','variable':True,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_rayon','text':'#str(rayon)','text2':"#if maxrayon<99999: return str(maxrayon) else: return 'illimite'", 'tech':6, 'value':'Niveau de rayonnements', 'size':0,'icon': 'picture/rayon.png','variable':True,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_temp','text':'#str(temp)','text2':"#if maxtemp<99999: return str(maxtemp) else: return 'illimite'", 'tech':7, 'value':'Temperature ambiante', 'size':0,'icon': 'picture/temp.png','variable':True,'visible':True,'separe':True,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_objectif', 'tech':-1, 'value':'Objectif a atteindre', 'size':44, 'icon': 'drawelement','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
{'motion':'motion_popup','click': 'click_condition', 'tech':0, 'value':'Conditions de victoire', 'size':300, 'icon': 'drawcondvictory','params': '[90,90,90]','variable':False,'visible':True,'separe':False,'squarred':False,'active': True},
],
[
{'place':'bottom+','visible':False,'size':0,'variable':True,'selectable':False},