hedgewars/uCommandHandlers.pas
branchwebgl
changeset 8096 453917e94e55
parent 8026 4a4f21070479
parent 8025 07862ab415c8
child 8330 aaefa587e277
equal deleted inserted replaced
8053:2e836bebb518 8096:453917e94e55
   547 procedure chSetMap(var s: shortstring);
   547 procedure chSetMap(var s: shortstring);
   548 begin
   548 begin
   549 if isDeveloperMode then
   549 if isDeveloperMode then
   550     begin
   550     begin
   551     if s = '' then
   551     if s = '' then
   552         begin
   552         cPathz[ptMapCurrent]:= s
   553         UserPathz[ptMapCurrent]:= s;
       
   554         Pathz[ptMapCurrent]:= s;
       
   555         end
       
   556     else
   553     else
   557         begin
   554         cPathz[ptMapCurrent]:= cPathz[ptMaps] + '/' + s;
   558         UserPathz[ptMapCurrent]:= UserPathz[ptMaps] + '/' + s;
       
   559         Pathz[ptMapCurrent]:= Pathz[ptMaps] + '/' + s;
       
   560         end;
       
   561     InitStepsFlags:= InitStepsFlags or cifMap
   555     InitStepsFlags:= InitStepsFlags or cifMap
   562     end;
   556     end;
   563 cMapName:= s;
   557 cMapName:= s;
   564 ScriptLoad('Maps/' + s + '/map.lua')
   558 ScriptLoad('Maps/' + s + '/map.lua')
   565 end;
   559 end;
   566 
   560 
   567 procedure chSetTheme(var s: shortstring);
   561 procedure chSetTheme(var s: shortstring);
   568 begin
   562 begin
   569 if isDeveloperMode then
   563 if isDeveloperMode then
   570     begin
   564     begin
   571     UserPathz[ptCurrTheme]:= UserPathz[ptThemes] + '/' + s;
   565     cPathz[ptCurrTheme]:= cPathz[ptThemes] + '/' + s;
   572     Pathz[ptCurrTheme]:= Pathz[ptThemes] + '/' + s;
       
   573     Theme:= s;
   566     Theme:= s;
   574     InitStepsFlags:= InitStepsFlags or cifTheme
   567     InitStepsFlags:= InitStepsFlags or cifTheme
   575     end
   568     end
   576 end;
   569 end;
   577 
   570