Moar Gamecraft commands!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
874B

  1. using System;
  2. using RobocraftX.GUI.CommandLine;
  3. using RobocraftX.Multiplayer;
  4. using RobocraftX.StateSync;
  5. using RobocraftX.Character;
  6. using Svelto.ECS;
  7. using Unity.Entities;
  8. using UnityEngine;
  9. using uREPL;
  10. using Svelto.Context;
  11. using RobocraftX;
  12. using GamecraftModdingAPI.Commands;
  13. namespace ExtraCommands.Basics
  14. {
  15. [CustomCommand("Exit")]
  16. class ExitCommandEngine : ICustomCommandEngine
  17. {
  18. public string Description => "Close Gamecraft without any prompts";
  19. public string Name => "Exit";
  20. public IEntitiesDB entitiesDB { set; private get; }
  21. public void Ready()
  22. {
  23. CommandRegistrationHelper.Register(Name, ExitCommand, Description);
  24. }
  25. private void ExitCommand()
  26. {
  27. Application.Quit();
  28. }
  29. public void Dispose()
  30. {
  31. CommandRegistrationHelper.Unregister(Name);
  32. }
  33. }
  34. }