548 begin |
548 begin |
549 liveLua:= (not liveLua); |
549 liveLua:= (not liveLua); |
550 if liveLua then |
550 if liveLua then |
551 begin |
551 begin |
552 AddFileLog('[Lua] chat input string parsing enabled'); |
552 AddFileLog('[Lua] chat input string parsing enabled'); |
553 AddChatString(#3 + trmsg[sidLuaParsingOn]); |
553 AddChatString(#3 + shortstring(trmsg[sidLuaParsingOn])); |
554 end |
554 end |
555 else |
555 else |
556 begin |
556 begin |
557 AddFileLog('[Lua] chat input string parsing disabled'); |
557 AddFileLog('[Lua] chat input string parsing disabled'); |
558 AddChatString(#3 + trmsg[sidLuaParsingOff]); |
558 AddChatString(#3 + shortstring(trmsg[sidLuaParsingOff])); |
559 end; |
559 end; |
560 UpdateInputLinePrefix(); |
560 UpdateInputLinePrefix(); |
561 end |
561 end |
562 else |
562 else |
563 AddChatString(#5 + trmsg[sidLuaParsingDenied]); |
563 AddChatString(#5 + shortstring(trmsg[sidLuaParsingDenied])); |
564 exit |
564 exit |
565 end; |
565 end; |
566 |
566 |
567 // Help commands |
567 // Help commands |
568 if (copy(s, 2, 11) = 'help taunts') then |
568 if (copy(s, 2, 11) = 'help taunts') then |
569 begin |
569 begin |
570 AddChatString(#3 + trcmd[sidCmdHeaderTaunts]); |
570 AddChatString(#3 + shortstring(trcmd[sidCmdHeaderTaunts])); |
571 AddChatString(#3 + trcmd[sidCmdSpeech]); |
571 AddChatString(#3 + shortstring(trcmd[sidCmdSpeech])); |
572 AddChatString(#3 + trcmd[sidCmdThink]); |
572 AddChatString(#3 + shortstring(trcmd[sidCmdThink])); |
573 AddChatString(#3 + trcmd[sidCmdYell]); |
573 AddChatString(#3 + shortstring(trcmd[sidCmdYell])); |
574 AddChatString(#3 + trcmd[sidCmdSpeechNumberHint]); |
574 AddChatString(#3 + shortstring(trcmd[sidCmdSpeechNumberHint])); |
575 AddChatString(#3 + trcmd[sidCmdHsa]); |
575 AddChatString(#3 + shortstring(trcmd[sidCmdHsa])); |
576 AddChatString(#3 + trcmd[sidCmdHta]); |
576 AddChatString(#3 + shortstring(trcmd[sidCmdHta])); |
577 AddChatString(#3 + trcmd[sidCmdHya]); |
577 AddChatString(#3 + shortstring(trcmd[sidCmdHya])); |
578 AddChatString(#3 + trcmd[sidCmdHurrah]); |
578 AddChatString(#3 + shortstring(trcmd[sidCmdHurrah])); |
579 AddChatString(#3 + trcmd[sidCmdIlovelotsoflemonade]); |
579 AddChatString(#3 + shortstring(trcmd[sidCmdIlovelotsoflemonade])); |
580 AddChatString(#3 + trcmd[sidCmdJuggle]); |
580 AddChatString(#3 + shortstring(trcmd[sidCmdJuggle])); |
581 AddChatString(#3 + trcmd[sidCmdRollup]); |
581 AddChatString(#3 + shortstring(trcmd[sidCmdRollup])); |
582 AddChatString(#3 + trcmd[sidCmdShrug]); |
582 AddChatString(#3 + shortstring(trcmd[sidCmdShrug])); |
583 AddChatString(#3 + trcmd[sidCmdWave]); |
583 AddChatString(#3 + shortstring(trcmd[sidCmdWave])); |
584 exit |
584 exit |
585 end; |
585 end; |
586 |
586 |
587 if (copy(s, 2, 4) = 'help') then |
587 if (copy(s, 2, 4) = 'help') then |
588 begin |
588 begin |
589 AddChatString(#3 + trcmd[sidCmdHeaderBasic]); |
589 AddChatString(#3 + shortstring(trcmd[sidCmdHeaderBasic])); |
590 if gameType = gmtNet then |
590 if gameType = gmtNet then |
591 AddChatString(#3 + trcmd[sidCmdPauseNet]) |
591 AddChatString(#3 + shortstring(trcmd[sidCmdPauseNet])) |
592 else |
592 else |
593 AddChatString(#3 + trcmd[sidCmdPause]); |
593 AddChatString(#3 + shortstring(trcmd[sidCmdPause])); |
594 AddChatString(#3 + trcmd[sidCmdFullscreen]); |
594 AddChatString(#3 + shortstring(trcmd[sidCmdFullscreen])); |
595 AddChatString(#3 + trcmd[sidCmdQuit]); |
595 AddChatString(#3 + shortstring(trcmd[sidCmdQuit])); |
596 if gameType <> gmtNet then |
596 if gameType <> gmtNet then |
597 AddChatString(#3 + trcmd[sidLua]); |
597 AddChatString(#3 + shortstring(trcmd[sidLua])); |
598 // history and help commands needs to be close to the end because they are always visible |
598 // history and help commands needs to be close to the end because they are always visible |
599 // with a short chat history length. |
599 // with a short chat history length. |
600 AddChatString(#3 + trcmd[sidCmdTeam]); |
600 AddChatString(#3 + shortstring(trcmd[sidCmdTeam])); |
601 AddChatString(#3 + trcmd[sidCmdMe]); |
601 AddChatString(#3 + shortstring(trcmd[sidCmdMe])); |
602 AddChatString(#3 + trcmd[sidCmdTogglechat]); |
602 AddChatString(#3 + shortstring(trcmd[sidCmdTogglechat])); |
603 AddChatString(#3 + trcmd[sidCmdHistory]); |
603 AddChatString(#3 + shortstring(trcmd[sidCmdHistory])); |
604 AddChatString(#3 + trcmd[sidCmdHelp]); |
604 AddChatString(#3 + shortstring(trcmd[sidCmdHelp])); |
605 AddChatString(#3 + trcmd[sidCmdHelpTaunts]); |
605 AddChatString(#3 + shortstring(trcmd[sidCmdHelpTaunts])); |
606 exit |
606 exit |
607 end; |
607 end; |
608 |
608 |
609 // hedghog animations/taunts and engine commands |
609 // hedghog animations/taunts and engine commands |
610 if (not CurrentTeam^.ExtDriven) and (CurrentTeam^.Hedgehogs[0].BotLevel = 0) then |
610 if (not CurrentTeam^.ExtDriven) and (CurrentTeam^.Hedgehogs[0].BotLevel = 0) then |