hedgewars/uCommands.pas
author Wuzzy <almikes@aol.com>
Sat, 30 Sep 2017 23:52:08 +0200
changeset 12627 07fdda8c13a2
parent 11046 47a8c19ecb60
permissions -rw-r--r--
TrophyRace: Fix game never eliminating any hogs after a hog skipped or ran out of time Warning: This commit _might_ invalidate past records, but I'm not sure if this is actually the case. Note that only the eliminiation part of the script is touched, not the actual race logic. Even if records are actually broken by this, I and sheepluva have decided that it's more imporant to fix this very, VERY stupid and old bug than to preserve records.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4976
088d40d8aba2 Happy 2011 :)
koda
parents: 4900
diff changeset
     1
(*
088d40d8aba2 Happy 2011 :)
koda
parents: 4900
diff changeset
     2
 * Hedgewars, a free turn based strategy game
11046
47a8c19ecb60 more copyright fixes
sheepluva
parents: 10108
diff changeset
     3
 * Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com>
4976
088d40d8aba2 Happy 2011 :)
koda
parents: 4900
diff changeset
     4
 *
088d40d8aba2 Happy 2011 :)
koda
parents: 4900
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
088d40d8aba2 Happy 2011 :)
koda
parents: 4900
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
088d40d8aba2 Happy 2011 :)
koda
parents: 4900
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
088d40d8aba2 Happy 2011 :)
koda
parents: 4900
diff changeset
     8
 *
088d40d8aba2 Happy 2011 :)
koda
parents: 4900
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
088d40d8aba2 Happy 2011 :)
koda
parents: 4900
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
088d40d8aba2 Happy 2011 :)
koda
parents: 4900
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
088d40d8aba2 Happy 2011 :)
koda
parents: 4900
diff changeset
    12
 * GNU General Public License for more details.
088d40d8aba2 Happy 2011 :)
koda
parents: 4900
diff changeset
    13
 *
088d40d8aba2 Happy 2011 :)
koda
parents: 4900
diff changeset
    14
 * You should have received a copy of the GNU General Public License
088d40d8aba2 Happy 2011 :)
koda
parents: 4900
diff changeset
    15
 * along with this program; if not, write to the Free Software
10108
c68cf030eded update FSF address. note: two sdl include files (by Sam Lantinga) still have the old FSF address in their copyright - but I ain't gonna touch their copyright headers
sheepluva
parents: 10017
diff changeset
    16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
4976
088d40d8aba2 Happy 2011 :)
koda
parents: 4900
diff changeset
    17
 *)
088d40d8aba2 Happy 2011 :)
koda
parents: 4900
diff changeset
    18
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    19
{$INCLUDE "options.inc"}
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    20
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    21
unit uCommands;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    22
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    23
interface
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    24
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    25
var isDeveloperMode: boolean;
7805
2a249a4faf5b Flag script parsecommands to avoid echoing to net
nemo
parents: 7426
diff changeset
    26
var isExternalSource: boolean;
6898
344b0dbd9690 - Remove support for variables in command handlers
unc0rr
parents: 6700
diff changeset
    27
type TCommandHandler = procedure (var params: shortstring);
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    28
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    29
procedure initModule;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    30
procedure freeModule;
7409
fd91aa100ce0 Avoid desync playing back demos
nemo
parents: 7407
diff changeset
    31
procedure RegisterVariable(Name: shortstring; p: TCommandHandler; Trusted: boolean; Rand: boolean);
6898
344b0dbd9690 - Remove support for variables in command handlers
unc0rr
parents: 6700
diff changeset
    32
procedure RegisterVariable(Name: shortstring; p: TCommandHandler; Trusted: boolean);
7805
2a249a4faf5b Flag script parsecommands to avoid echoing to net
nemo
parents: 7426
diff changeset
    33
procedure ParseCommand(CmdStr: shortstring; TrustedSource: boolean); inline;
2a249a4faf5b Flag script parsecommands to avoid echoing to net
nemo
parents: 7426
diff changeset
    34
procedure ParseCommand(CmdStr: shortstring; TrustedSource, ExternalSource: boolean);
6919
bf7433e62b9c in uTouch dont use bools to represent keystrokes, but issue ParseCommands
Xeli
parents: 6898
diff changeset
    35
procedure ParseTeamCommand(s: shortstring);
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    36
procedure StopMessages(Message: Longword);
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    37
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    38
implementation
9301
c5d1c8259ef4 break uDebug and uCommand depedency loop by putting stuff in uIO
koda
parents: 9080
diff changeset
    39
uses uConsts, uVariables, uConsole, uUtils, SDLh;
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    40
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    41
type  PVariable = ^TVariable;
6580
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
    42
    TVariable = record
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
    43
        Next: PVariable;
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
    44
        Name: string[15];
6898
344b0dbd9690 - Remove support for variables in command handlers
unc0rr
parents: 6700
diff changeset
    45
        Handler: TCommandHandler;
7409
fd91aa100ce0 Avoid desync playing back demos
nemo
parents: 7407
diff changeset
    46
        Trusted, Rand: boolean;
6580
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
    47
        end;
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    48
7850
fcbb024090a4 cleanup in initEverything and freeEverything
koda
parents: 7806
diff changeset
    49
var Variables: PVariable;
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    50
6898
344b0dbd9690 - Remove support for variables in command handlers
unc0rr
parents: 6700
diff changeset
    51
procedure RegisterVariable(Name: shortstring; p: TCommandHandler; Trusted: boolean);
7407
c1ade666c124 I thirst for randomness.
nemo
parents: 6992
diff changeset
    52
begin
c1ade666c124 I thirst for randomness.
nemo
parents: 6992
diff changeset
    53
RegisterVariable(Name, p, Trusted, false);
c1ade666c124 I thirst for randomness.
nemo
parents: 6992
diff changeset
    54
end;
9301
c5d1c8259ef4 break uDebug and uCommand depedency loop by putting stuff in uIO
koda
parents: 9080
diff changeset
    55
7409
fd91aa100ce0 Avoid desync playing back demos
nemo
parents: 7407
diff changeset
    56
procedure RegisterVariable(Name: shortstring; p: TCommandHandler; Trusted: boolean; Rand: boolean);
9301
c5d1c8259ef4 break uDebug and uCommand depedency loop by putting stuff in uIO
koda
parents: 9080
diff changeset
    57
var value: PVariable;
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    58
begin
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    59
New(value);
9301
c5d1c8259ef4 break uDebug and uCommand depedency loop by putting stuff in uIO
koda
parents: 9080
diff changeset
    60
if value = nil then
c5d1c8259ef4 break uDebug and uCommand depedency loop by putting stuff in uIO
koda
parents: 9080
diff changeset
    61
    ParseCommand('fatal RegisterVariable: value = nil', true);
c5d1c8259ef4 break uDebug and uCommand depedency loop by putting stuff in uIO
koda
parents: 9080
diff changeset
    62
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    63
FillChar(value^, sizeof(TVariable), 0);
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    64
value^.Name:= Name;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    65
value^.Handler:= p;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    66
value^.Trusted:= Trusted;
7409
fd91aa100ce0 Avoid desync playing back demos
nemo
parents: 7407
diff changeset
    67
value^.Rand:= Rand;
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    68
6580
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
    69
if Variables = nil then
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
    70
    Variables:= value
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
    71
else
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
    72
    begin
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
    73
    value^.Next:= Variables;
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
    74
    Variables:= value
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
    75
    end;
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    76
end;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    77
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    78
7805
2a249a4faf5b Flag script parsecommands to avoid echoing to net
nemo
parents: 7426
diff changeset
    79
procedure ParseCommand(CmdStr: shortstring; TrustedSource: boolean); inline;
2a249a4faf5b Flag script parsecommands to avoid echoing to net
nemo
parents: 7426
diff changeset
    80
begin
2a249a4faf5b Flag script parsecommands to avoid echoing to net
nemo
parents: 7426
diff changeset
    81
    ParseCommand(CmdStr, TrustedSource, false)
2a249a4faf5b Flag script parsecommands to avoid echoing to net
nemo
parents: 7426
diff changeset
    82
end;
2a249a4faf5b Flag script parsecommands to avoid echoing to net
nemo
parents: 7426
diff changeset
    83
2a249a4faf5b Flag script parsecommands to avoid echoing to net
nemo
parents: 7426
diff changeset
    84
procedure ParseCommand(CmdStr: shortstring; TrustedSource, ExternalSource: boolean);
6992
b8f3d8991e92 marked a couple of functions as inline
koda
parents: 6923
diff changeset
    85
var s: shortstring;
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    86
    t: PVariable;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    87
    c: char;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    88
begin
7806
c27713b5e052 missing nil test
nemo
parents: 7805
diff changeset
    89
isExternalSource:= ExternalSource or ((CurrentTeam <> nil) and CurrentTeam^.ExtDriven);
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    90
//WriteLnToConsole(CmdStr);
6580
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
    91
if CmdStr[0]=#0 then
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
    92
    exit;
8498
eecadca7db50 Bring back full log strings for commands, just a bit sanitized
unc0rr
parents: 7850
diff changeset
    93
eecadca7db50 Bring back full log strings for commands, just a bit sanitized
unc0rr
parents: 7850
diff changeset
    94
AddFileLog('[Cmd] ' + sanitizeForLog(CmdStr));
eecadca7db50 Bring back full log strings for commands, just a bit sanitized
unc0rr
parents: 7850
diff changeset
    95
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    96
c:= CmdStr[1];
6580
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
    97
if (c = '/') or (c = '$') then
6898
344b0dbd9690 - Remove support for variables in command handlers
unc0rr
parents: 6700
diff changeset
    98
    Delete(CmdStr, 1, 1);
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
    99
s:= '';
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   100
SplitBySpace(CmdStr, s);
7407
c1ade666c124 I thirst for randomness.
nemo
parents: 6992
diff changeset
   101
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   102
t:= Variables;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   103
while t <> nil do
6580
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
   104
    begin
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
   105
    if t^.Name = CmdStr then
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
   106
        begin
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
   107
        if TrustedSource or t^.Trusted then
7412
9e5aa3c8dc62 Ok. *these* should be safe with just this one extra check...
nemo
parents: 7409
diff changeset
   108
            begin
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9998
diff changeset
   109
            if t^.Rand and (not CheckNoTeamOrHH) then
7412
9e5aa3c8dc62 Ok. *these* should be safe with just this one extra check...
nemo
parents: 7409
diff changeset
   110
                CheckSum:= CheckSum xor LongWord(SDLNet_Read32(@CmdStr)) xor LongWord(s[0]) xor GameTicks;
6898
344b0dbd9690 - Remove support for variables in command handlers
unc0rr
parents: 6700
diff changeset
   111
            t^.Handler(s);
7412
9e5aa3c8dc62 Ok. *these* should be safe with just this one extra check...
nemo
parents: 7409
diff changeset
   112
            end;
6898
344b0dbd9690 - Remove support for variables in command handlers
unc0rr
parents: 6700
diff changeset
   113
        exit
344b0dbd9690 - Remove support for variables in command handlers
unc0rr
parents: 6700
diff changeset
   114
        end
344b0dbd9690 - Remove support for variables in command handlers
unc0rr
parents: 6700
diff changeset
   115
    else
344b0dbd9690 - Remove support for variables in command handlers
unc0rr
parents: 6700
diff changeset
   116
        t:= t^.Next
344b0dbd9690 - Remove support for variables in command handlers
unc0rr
parents: 6700
diff changeset
   117
    end;
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   118
case c of
6580
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
   119
    '$': WriteLnToConsole(errmsgUnknownVariable + ': "$' + CmdStr + '"')
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
   120
    else
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
   121
        WriteLnToConsole(errmsgUnknownCommand  + ': "/' + CmdStr + '"') end
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   122
end;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   123
6919
bf7433e62b9c in uTouch dont use bools to represent keystrokes, but issue ParseCommands
Xeli
parents: 6898
diff changeset
   124
procedure ParseTeamCommand(s: shortstring);
bf7433e62b9c in uTouch dont use bools to represent keystrokes, but issue ParseCommands
Xeli
parents: 6898
diff changeset
   125
var Trusted: boolean;
bf7433e62b9c in uTouch dont use bools to represent keystrokes, but issue ParseCommands
Xeli
parents: 6898
diff changeset
   126
begin
bf7433e62b9c in uTouch dont use bools to represent keystrokes, but issue ParseCommands
Xeli
parents: 6898
diff changeset
   127
Trusted:= (CurrentTeam <> nil)
bf7433e62b9c in uTouch dont use bools to represent keystrokes, but issue ParseCommands
Xeli
parents: 6898
diff changeset
   128
          and (not CurrentTeam^.ExtDriven)
bf7433e62b9c in uTouch dont use bools to represent keystrokes, but issue ParseCommands
Xeli
parents: 6898
diff changeset
   129
          and (CurrentHedgehog^.BotLevel = 0);
bf7433e62b9c in uTouch dont use bools to represent keystrokes, but issue ParseCommands
Xeli
parents: 6898
diff changeset
   130
ParseCommand(s, Trusted);
bf7433e62b9c in uTouch dont use bools to represent keystrokes, but issue ParseCommands
Xeli
parents: 6898
diff changeset
   131
if (CurrentTeam <> nil) and (not CurrentTeam^.ExtDriven) and (ReadyTimeLeft > 1) then
bf7433e62b9c in uTouch dont use bools to represent keystrokes, but issue ParseCommands
Xeli
parents: 6898
diff changeset
   132
    ParseCommand('gencmd R', true)
bf7433e62b9c in uTouch dont use bools to represent keystrokes, but issue ParseCommands
Xeli
parents: 6898
diff changeset
   133
end;
bf7433e62b9c in uTouch dont use bools to represent keystrokes, but issue ParseCommands
Xeli
parents: 6898
diff changeset
   134
bf7433e62b9c in uTouch dont use bools to represent keystrokes, but issue ParseCommands
Xeli
parents: 6898
diff changeset
   135
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   136
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   137
procedure StopMessages(Message: Longword);
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   138
begin
6580
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
   139
if (Message and gmLeft) <> 0 then
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
   140
    ParseCommand('/-left', true)
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
   141
else if (Message and gmRight) <> 0 then
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9998
diff changeset
   142
    ParseCommand('/-right', true)
6580
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
   143
else if (Message and gmUp) <> 0 then
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
   144
    ParseCommand('/-up', true)
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
   145
else if (Message and gmDown) <> 0 then
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
   146
    ParseCommand('/-down', true)
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
   147
else if (Message and gmAttack) <> 0 then
6155187bf599 A partial reformatting of the pascal code to have consistent syntax. Things that are still inconsistent.
lovelacer
parents: 6450
diff changeset
   148
    ParseCommand('/-attack', true)
4373
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   149
end;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   150
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   151
procedure initModule;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   152
begin
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   153
    Variables:= nil;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   154
    isDeveloperMode:= true;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   155
end;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   156
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   157
procedure freeModule;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   158
var t, tt: PVariable;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   159
begin
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   160
    tt:= Variables;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   161
    Variables:= nil;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   162
    while tt <> nil do
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   163
    begin
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   164
        t:= tt;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   165
        tt:= tt^.Next;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   166
        Dispose(t)
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   167
    end;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   168
end;
fe0e3903bb9e Introduce uCommands.pas
unC0Rr
parents:
diff changeset
   169
4406
beb4de0af990 Increase teams to 8 to match the 8 colours, fix issue #108, reenable rope length modifier
nemo
parents: 4403
diff changeset
   170
end.