public TalkCommand(Client tclient) { TheClient = tclient; Name = "talk"; Description = "Opens a chat view."; Arguments = "[text]"; }
public QuitCommand(Client tclient) { TheClient = tclient; Name = "quit"; Description = "Quits the game."; Arguments = ""; }
public SecondaryCommand(Client tclient) { TheClient = tclient; Name = "secondary"; Description = "Makes the player attack secondarily."; Arguments = ""; }
public ItemselCommand(Client tclient) { TheClient = tclient; Name = "itemsel"; Description = "Selects an item to hold by the given number."; Arguments = "<slot number>"; }
public UpwardCommand(Client tclient) { TheClient = tclient; Name = "upward"; Description = "Moves the player upward (jumps)."; Arguments = ""; }
public QuickItemCommand(Client tclient) { TheClient = tclient; Name = "quickitem"; Description = "Switches to and uses an item by the given number."; Arguments = "'hold'/'throw'/'click'/'alt'/'drop' <slot number>"; }
public ItemdownCommand(Client tclient) { TheClient = tclient; Name = "itemdown"; Description = "Adjust the item (down version)."; Arguments = ""; }
public ItemStack(Client tclient, byte[] data) { TheClient = tclient; DataStream ds = new DataStream(data); DataReader dr = new DataReader(ds); Load(dr, (b) => new ItemStack(tclient, b)); }
public UIScreen(Client tclient) : base(UIAnchor.TOP_LEFT, () => 0, () => 0, () => 0, () => 0) { TheClient = tclient; Width = () => Parent == null ? TheClient.Window.Width : Parent.GetWidth(); Height = () => Parent == null ? TheClient.Window.Height : Parent.GetHeight(); }
public DisconnectCommand(Client tclient) { TheClient = tclient; Name = "disconnect"; Description = "Disconnects from the server."; Arguments = ""; }
public MovedownCommand(Client tclient) { TheClient = tclient; Name = "movedown"; Description = "Makes the player crouch."; Arguments = ""; }
public ItemnextCommand(Client tclient) { TheClient = tclient; Name = "itemnext"; Description = "Selects the next item."; Arguments = ""; }
public BindblockCommand(Client tclient) { TheClient = tclient; Name = "bindblock"; Description = "Binds a script block to a key."; Arguments = "<key>"; }
public void Init(Client tclient, ClientCVar cvar) { if (Context != null) { Context.Dispose(); } TheClient = tclient; CVars = cvar; Context = new AudioContext(AudioContext.DefaultDevice, 0, 0, false, true); Context.MakeCurrent(); try { if (Microphone != null) { Microphone.StopEcho(); } Microphone = new MicrophoneHandler(this); } catch (Exception ex) { SysConsole.Output("Loading microphone handling", ex); } if (Effects != null) { foreach (SoundEffect sfx in Effects.Values) { sfx.Internal = -2; } } Effects = new Dictionary<string, SoundEffect>(); PlayingNow = new List<ActiveSound>(); Noise = LoadSound(new DataStream(Convert.FromBase64String(NoiseDefault.NoiseB64)), "noise"); }
public ReloadGameCommand(Client tclient) { TheClient = tclient; Name = "reloadgame"; Description = "Reloads all or part of the game."; Arguments = "<chunks/screen/shaders/audio/textures/all>"; // TODO: List input? }
public AttackCommand(Client tclient) { TheClient = tclient; Name = "attack"; Description = "Makes the player attack."; Arguments = ""; }
public NetusageCommand(Client tclient) { TheClient = tclient; Name = "netusage"; Description = "Shows information on network usage."; Arguments = ""; }
public RightwardCommand(Client tclient) { TheClient = tclient; Name = "rightward"; Description = "Moves the player rightward."; Arguments = ""; }
public CdevelCommand(Client tclient) { TheClient = tclient; Name = "cdevel"; Description = "Clientside developmental commands."; Arguments = ""; }
public ConnectCommand(Client tclient) { TheClient = tclient; Name = "connect"; Description = "Connects to a server."; Arguments = "<ip> <port>"; }
public ItemprevCommand(Client tclient) { TheClient = tclient; Name = "itemprev"; Description = "Selects the previous item."; Arguments = ""; }
public SprintCommand(Client tclient) { TheClient = tclient; Name = "sprint"; Description = "Makes the player sprint."; Arguments = ""; }
public TesteffectCommand(Client tclient) { TheClient = tclient; Name = "testeffect"; Description = "Quick-tests a particle effect, clientside."; Arguments = "effect"; }
public PlayCommand(Client tclient) { TheClient = tclient; Name = "play"; Description = "Plays a sound effect."; Arguments = "<soundname> [pitch] [volume] [location] [seek time in seconds]"; }
public ItemleftCommand(Client tclient) { TheClient = tclient; Name = "itemleft"; Description = "Adjust the item (left version)."; Arguments = ""; }
public WalkCommand(Client tclient) { TheClient = tclient; Name = "walk"; Description = "Makes the player walk."; Arguments = ""; }
public PingCommand(Client tclient) { TheClient = tclient; Name = "ping"; Description = "Pings a a server."; Arguments = "<ip> <port>"; }
public InventoryCommand(Client tclient) { TheClient = tclient; Name = "inventory"; Description = "Opens the inventory screen."; Arguments = ""; }
public BackwardCommand(Client tclient) { TheClient = tclient; Name = "backward"; Description = "Moves the player backward."; Arguments = ""; }
/// <summary> /// Prepares the command system, registering all base commands. /// </summary> public void Init(Outputter _output, Client tclient) { // General Init TheClient = tclient; CommandSystem = new Commands(); Output = _output; CommandSystem.Output = Output; CommandSystem.Init(); // UI Commands CommandSystem.RegisterCommand(new AttackCommand(TheClient)); CommandSystem.RegisterCommand(new BackwardCommand(TheClient)); CommandSystem.RegisterCommand(new BindblockCommand(TheClient)); CommandSystem.RegisterCommand(new BindCommand(TheClient)); CommandSystem.RegisterCommand(new ForwardCommand(TheClient)); CommandSystem.RegisterCommand(new ItemdownCommand(TheClient)); CommandSystem.RegisterCommand(new ItemleftCommand(TheClient)); CommandSystem.RegisterCommand(new ItemrightCommand(TheClient)); CommandSystem.RegisterCommand(new ItemupCommand(TheClient)); CommandSystem.RegisterCommand(new LeftwardCommand(TheClient)); CommandSystem.RegisterCommand(new MovedownCommand(TheClient)); CommandSystem.RegisterCommand(new RightwardCommand(TheClient)); CommandSystem.RegisterCommand(new SecondaryCommand(TheClient)); CommandSystem.RegisterCommand(new SprintCommand(TheClient)); CommandSystem.RegisterCommand(new TalkCommand(TheClient)); CommandSystem.RegisterCommand(new UnbindCommand(TheClient)); CommandSystem.RegisterCommand(new UpwardCommand(TheClient)); CommandSystem.RegisterCommand(new UseCommand(TheClient)); CommandSystem.RegisterCommand(new WalkCommand(TheClient)); // Common Commands CommandSystem.RegisterCommand(new CdevelCommand(TheClient)); CommandSystem.RegisterCommand(new ItemnextCommand(TheClient)); CommandSystem.RegisterCommand(new ItemprevCommand(TheClient)); CommandSystem.RegisterCommand(new ItemselCommand(TheClient)); CommandSystem.RegisterCommand(new PlayCommand(TheClient)); CommandSystem.RegisterCommand(new QuickItemCommand(TheClient)); CommandSystem.RegisterCommand(new QuitCommand(TheClient)); CommandSystem.RegisterCommand(new ReloadGameCommand(TheClient)); // Network Commands CommandSystem.RegisterCommand(new ConnectCommand(TheClient)); CommandSystem.RegisterCommand(new DisconnectCommand(TheClient)); CommandSystem.RegisterCommand(new NetusageCommand(TheClient)); CommandSystem.RegisterCommand(new PingCommand(TheClient)); CommandSystem.RegisterCommand(new StartlocalserverCommand(TheClient)); // Game Commands CommandSystem.RegisterCommand(new InventoryCommand(TheClient)); CommandSystem.RegisterCommand(new TesteffectCommand(TheClient)); // General Tags CommandSystem.TagSystem.Register(new AudioTagBase(TheClient)); // Entity Tags CommandSystem.TagSystem.Register(new PlayerTagBase(TheClient)); CommandSystem.PostInit(); }