Exemplo n.º 1
0
        private void OnSalvageBarricadeRequested(CSteamID steamID, byte x, byte y, ushort plant, ushort index, ref bool shouldAllow)
        {
            BarricadeData data = BarricadeManager.regions[x, y].barricades[index];
            BarricadeDrop drop = BarricadeManager.regions[x, y].drops[index];

            UnturnedBarricadeSalvagingEvent @event =
                new UnturnedBarricadeSalvagingEvent(new UnturnedBarricadeBuildable(data, drop));

            Emit(@event);

            shouldAllow = [email protected];
        }
Exemplo n.º 2
0
        private void OnSalvageBarricadeRequested(CSteamID steamId, byte x, byte y, ushort plant, ushort index, ref bool shouldAllow)
        {
            if (!BarricadeManager.tryGetRegion(x, y, plant, out var region))
            {
                return;
            }

            var data = region.barricades[index];
            var drop = region.drops[index];

            var @event =
                new UnturnedBarricadeSalvagingEvent(new UnturnedBarricadeBuildable(data, drop));

            Emit(@event);

            shouldAllow = [email protected];
        }