Ejemplo n.º 1
0
 public LocalToolDescription(PaintGunMod main) : base(main)
 {
     if (Main.IsDedicatedServer)
     {
         throw new Exception($"Why's this called in DS?");
     }
 }
Ejemplo n.º 2
0
 public UIEdit(PaintGunMod main) : base(main)
 {
     if (ENABLED && MyAPIGateway.Session.OnlineMode == MyOnlineModeEnum.OFFLINE && Utils.IsLocalMod())
     {
         uiEdit = new UIEdit();
     }
 }
Ejemplo n.º 3
0
 public TextAPI(PaintGunMod main) : base(main)
 {
     if (Main.IsDedicatedServer)
     {
         throw new Exception($"Why is {GetType().Name} initialized for DS?!");
     }
 }
Ejemplo n.º 4
0
        public DrawUtils(PaintGunMod main) : base(main)
        {
            if (Main.IsDedicatedServer)
            {
                throw new Exception($"Why is {GetType().Name} initialized for DS?!");
            }

            UpdateMethods = UpdateFlags.UPDATE_DRAW;
        }
Ejemplo n.º 5
0
        public PlayerHandler(PaintGunMod main) : base(main)
        {
            int maxPlayers = MyAPIGateway.Session.SessionSettings.MaxPlayers;

            OnlinePlayers = new List <IMyPlayer>(maxPlayers);

            MyVisualScriptLogicProvider.PlayerConnected    += ViScPlayerConnected;
            MyVisualScriptLogicProvider.PlayerDisconnected += ViScPlayerDisconnected;
        }
Ejemplo n.º 6
0
        public ToolHandler(PaintGunMod main) : base(main)
        {
            if (Main.IsDedicatedServer)
            {
                throw new Exception($"Why's this called in DS?");
            }

            MyAPIGateway.Entities.OnEntityAdd += EntityAdded;
        }
Ejemplo n.º 7
0
        public Caches(PaintGunMod main) : base(main)
        {
            Players = new MyConcurrentPool <List <IMyPlayer> >(
                clear: (l) => l.Clear(),
                activator: () => new List <IMyPlayer>(MyAPIGateway.Session.SessionSettings.MaxPlayers),
                expectedAllocations: 5,
                defaultCapacity: 1);

            AlreadyMirrored = new List <Vector3I>(8);
            PackedColors    = new List <uint>(Constants.COLOR_PALETTE_SIZE);
        }
Ejemplo n.º 8
0
        public PaintGunItem()
        {
            Main = PaintGunMod.Instance;

            if (Main.IsDedicatedServer)
            {
                throw new ArgumentException($"{GetType().Name} got created on DS side, not designed for that.");
            }

            SoundEmitter = new SpraySoundEmitter(GetSpraySoundPosition, IsHoldingPaintGun);
        }
Ejemplo n.º 9
0
        public NetworkLibHandler(PaintGunMod main) : base(main)
        {
            Lib = new Network(Constants.NETWORK_CHANNEL, PaintGunMod.MOD_NAME, true, (e) => Log.Error(e, Log.PRINT_MESSAGE));

            // needed here because they call an API method on creation
            PacketPaint        = new PacketPaint();
            PacketReplacePaint = new PacketReplacePaint();
            PacketConsumeAmmo  = new PacketConsumeAmmo();

            PacketPaletteUpdate    = new PacketPaletteUpdate();
            PacketPaletteSetColor  = new PacketPaletteSetColor();
            PacketJoinSharePalette = new PacketJoinSharePalette();

            PacketToolSpraying   = new PacketToolSpraying();
            PacketWarningMessage = new PacketWarningMessage();
        }
Ejemplo n.º 10
0
 public TestComp(PaintGunMod main) : base(main)
 {
     //UpdateMethods |= UpdateFlags.UPDATE_DRAW;
 }
Ejemplo n.º 11
0
 public HUDSounds(PaintGunMod main) : base(main)
 {
 }
Ejemplo n.º 12
0
        const int COOLDOWN_UNTIL_RESYNC = Constants.TICKS_PER_SECOND / 2; // this cooldown starts after the sync is done and blocks future re-syncs.

        public PaletteScheduledSync(PaintGunMod main) : base(main)
        {
        }
Ejemplo n.º 13
0
 public LocalToolHandler(PaintGunMod main) : base(main)
 {
     UpdateMethods = UpdateFlags.UPDATE_INPUT;
 }
Ejemplo n.º 14
0
 public PaletteInputHandler(PaintGunMod main) : base(main)
 {
 }
Ejemplo n.º 15
0
 public CheckPlayerField(PaintGunMod main) : base(main)
 {
     UpdateMethods = UpdateFlags.UPDATE_AFTER_SIM;
 }
Ejemplo n.º 16
0
 public Painting(PaintGunMod main) : base(main)
 {
 }
Ejemplo n.º 17
0
 public ConfigMenuHandler(PaintGunMod main) : base(main)
 {
 }
Ejemplo n.º 18
0
 public ColorPickerGUIWarning(PaintGunMod main) : base(main)
 {
 }
Ejemplo n.º 19
0
 public Notifications(PaintGunMod main) : base(main)
 {
 }
Ejemplo n.º 20
0
 public PaletteHUD(PaintGunMod main) : base(main)
 {
 }
Ejemplo n.º 21
0
        bool LogDLCInstalledEvent = false; // need to skip early events as it triggers for every single DLC and gets spammy

        public Palette(PaintGunMod main) : base(main)
        {
            MyAPIGateway.DLC.DLCInstalled += DLCInstalled;

            InitBlockSkins();
        }
Ejemplo n.º 22
0
 public Settings(PaintGunMod main) : base(main)
 {
 }
Ejemplo n.º 23
0
 public ChatCommands(PaintGunMod main) : base(main)
 {
 }
Ejemplo n.º 24
0
 public GameConfig(PaintGunMod main) : base(main)
 {
     UpdateMethods = UpdateFlags.UPDATE_AFTER_SIM | UpdateFlags.UPDATE_INPUT;
 }
Ejemplo n.º 25
0
 public SelectionGUI(PaintGunMod main) : base(main)
 {
     UpdateMethods = UpdateFlags.UPDATE_DRAW;
 }