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