198 '$': WriteLnToConsole(errmsgUnknownVariable + ': "$' + CmdStr + '"') |
198 '$': WriteLnToConsole(errmsgUnknownVariable + ': "$' + CmdStr + '"') |
199 else WriteLnToConsole(errmsgUnknownCommand + ': "/' + CmdStr + '"') end |
199 else WriteLnToConsole(errmsgUnknownCommand + ': "/' + CmdStr + '"') end |
200 end; |
200 end; |
201 |
201 |
202 function GetLastConsoleLine: shortstring; |
202 function GetLastConsoleLine: shortstring; |
203 begin |
203 var Result: shortstring; |
204 if CurrLine = 0 then GetLastConsoleLine:= ConsoleLines[Pred(cLinesCount)].s |
204 i: LongWord; |
205 else GetLastConsoleLine:= ConsoleLines[Pred(CurrLine)].s |
205 begin |
|
206 i:= (CurrLine + cLinesCount - 2) mod cLinesCount; |
|
207 Result:= ConsoleLines[i].s; |
|
208 |
|
209 //Result:= Result + #10; |
|
210 |
|
211 i:= (CurrLine + cLinesCount - 1) mod cLinesCount; |
|
212 Result:= Result + ConsoleLines[i].s; |
|
213 |
|
214 GetLastConsoleLine:= Result |
206 end; |
215 end; |
207 |
216 |
208 procedure StopMessages(Message: Longword); |
217 procedure StopMessages(Message: Longword); |
209 begin |
218 begin |
210 if (Message and gm_Left) <> 0 then ParseCommand('/-left', true) else |
219 if (Message and gm_Left) <> 0 then ParseCommand('/-left', true) else |
234 RegisterVariable('turntime', vtLongInt, @cHedgehogTurnTime, false); |
243 RegisterVariable('turntime', vtLongInt, @cHedgehogTurnTime, false); |
235 RegisterVariable('fort' , vtCommand, @chFort , false); |
244 RegisterVariable('fort' , vtCommand, @chFort , false); |
236 RegisterVariable('grave' , vtCommand, @chGrave , false); |
245 RegisterVariable('grave' , vtCommand, @chGrave , false); |
237 RegisterVariable('bind' , vtCommand, @chBind , true ); |
246 RegisterVariable('bind' , vtCommand, @chBind , true ); |
238 RegisterVariable('addhh' , vtCommand, @chAddHH , false); |
247 RegisterVariable('addhh' , vtCommand, @chAddHH , false); |
|
248 RegisterVariable('hat' , vtCommand, @chSetHat , false); |
239 RegisterVariable('hhcoords', vtCommand, @chSetHHCoords , false); |
249 RegisterVariable('hhcoords', vtCommand, @chSetHHCoords , false); |
240 RegisterVariable('ammstore', vtCommand, @chAddAmmoStore , false); |
250 RegisterVariable('ammstore', vtCommand, @chAddAmmoStore , false); |
241 RegisterVariable('quit' , vtCommand, @chQuit , true ); |
251 RegisterVariable('quit' , vtCommand, @chQuit , true ); |
242 RegisterVariable('confirm' , vtCommand, @chConfirm , true ); |
252 RegisterVariable('confirm' , vtCommand, @chConfirm , true ); |
243 RegisterVariable('+speedup', vtCommand, @chSpeedup_p , true ); |
253 RegisterVariable('+speedup', vtCommand, @chSpeedup_p , true ); |