private static void SetupIcon(CM_ExpeditionSectorIcon icon, bool completed, LG_LayerType layer)
        {
            var bgIcon    = icon.m_iconMainBG;
            var skullIcon = icon.m_iconMainSkull;

            switch (layer)
            {
            case LG_LayerType.SecondaryLayer:
                bgIcon    = icon.m_iconSecondaryBG;
                skullIcon = icon.m_iconSecondarySkull;
                break;

            case LG_LayerType.ThirdLayer:
                bgIcon    = icon.m_iconThirdBG;
                skullIcon = icon.m_iconThirdSkull;
                break;
            }

            var color = bgIcon.color;

            color.a      = completed ? 0.5f : 0.3f;
            bgIcon.color = color;

            color        = skullIcon.color;
            color.a      = completed ? 0.8f : 0.4f;
            bgIcon.color = color;

            icon.m_isCleared = completed;
        }
コード例 #2
0
        public void Activate(uint enemyID, int count, LG_LayerType layer, eLocalZoneIndex zoneIndex, string areaName)
        {
            var enemies  = UnityEngine.Object.FindObjectsOfType <EnemyAgent>();
            int curCount = 0;

            for (int index = 0; index < enemies.Count && (count == -1 || curCount < count); index++)
            {
                var enemy = enemies[index];

                var node = enemy.CourseNode;
                if (node != null && node.LayerType == layer && node.m_zone.LocalIndex == zoneIndex && node.m_area.m_navInfo.Suffix.ToLower() == areaName)
                {
                    if (enemy.EnemyData.persistentID == enemyID && enemy.AI != null && enemy.Alive)
                    {
                        NM_NoiseData data = new NM_NoiseData()
                        {
                            noiseMaker = null,
                            position   = enemy.Position,
                            radiusMin  = 0f,
                            radiusMax  = 100f,
                            yScale     = 1f,
                            node       = enemy.CourseNode,
                            type       = NM_NoiseType.InstaDetect,
                            includeToNeightbourAreas = true,
                            raycastFirstNode         = false
                        };

                        NoiseManager.MakeNoise(data);
                        curCount++;
                    }
                }
            }
        }
コード例 #3
0
        public ObjectiveItem(LG_LayerType layerType)
        {
            Layer    = layerType;
            Item     = new CarryItemPickup_Core();
            ItemCast = Item.Cast <iWardenObjectiveItem>();

            GUID           = Guid.NewGuid().ToString();
            Item.m_itemKey = GUID;
        }
コード例 #4
0
        public static LG_Zone GetZone(LG_LayerType layer, eLocalZoneIndex index)
        {
            if (Builder.Current.m_currentFloor.TryGetZoneByLocalIndex(layer, index, out var zone))
            {
                return(zone);
            }

            return(null);
        }
コード例 #5
0
 private static void Postfix(LG_LayerType layer,
                             string mainObjective,
                             WardenObjectiveDataBlock data,
                             eWardenSubObjectiveStatus sub,
                             bool visible          = true,
                             bool isAdditionalHelp = false)
 {
     Watch.Current?.UpdateMainObjective(mainObjective);
     Log.Debug($"Got new objective! - {mainObjective}");
 }
コード例 #6
0
        private bool ShouldFire_LayerCheck(LG_LayerType layerType)
        {
            switch (layerType)
            {
            case LG_LayerType.SecondaryLayer: return(AllowedLayers.HasFlag(AllowedLayerType.Secondary));

            case LG_LayerType.ThirdLayer: return(AllowedLayers.HasFlag(AllowedLayerType.Third));

            default: return(AllowedLayers.HasFlag(AllowedLayerType.Main));
            }
        }
        internal static void Postfix(LG_GateKeyMarkerBuilder __instance, LG_LayerType layer, GameObject GO)
        {
            var casted = __instance.Cast <LG_FunctionMarkerBuilder>();
            var result = Inject_LG_FunctionMarkerBuilder.TryGetGUID(casted, out var guid);

            if (result)
            {
                ItemMessage.OnItemSpawned?.Invoke(guid, GO);
                ItemMessage.OnGateKeyItemSpawned?.Invoke(guid, GO);
            }
        }
        internal static void Postfix(LG_FunctionMarkerBuilder __instance, LG_LayerType layer, GameObject GO)
        {
            var result = TryGetGUID(__instance, out var guid);

            if (result)
            {
                var terminal = GO.GetComponentInChildren <LG_ComputerTerminal>();
                if (terminal != null)
                {
                    terminal.m_localLogs.Remove("!PLUGIN_RESERVED_SPECIAL_GUID");
                }

                ItemMessage.OnItemSpawned?.Invoke(guid, GO);
                ItemMessage.OnStandardItemSpawned?.Invoke(guid, GO);
            }
        }
コード例 #9
0
        internal bool ShouldFire_Internal(LG_LayerType layerType, WardenObjectiveDataBlock objectiveData)
        {
            bool shouldFire = false;

            if (IsRequiresAllFilter)
            {
                shouldFire  = true;
                shouldFire &= ShouldFire_LayerCheck(layerType);
                shouldFire &= ShouldFire_User(shouldFire, objectiveData);
            }
            else
            {
                shouldFire |= ShouldFire_LayerCheck(layerType);
                shouldFire |= ShouldFire_User(shouldFire, objectiveData);
            }

            return(shouldFire);
        }
コード例 #10
0
 public void Activate(LG_LayerType layer, eLocalZoneIndex zoneIndex, eLocalZoneIndex buildFromIndex)
 {
     GameInfo.UnlockSecurityDoor(layer, zoneIndex, buildFromIndex);
 }
コード例 #11
0
 public static bool TryGetZone(LG_LayerType layer, eLocalZoneIndex index, out LG_Zone zone)
 {
     return(Builder.Current.m_currentFloor.TryGetZoneByLocalIndex(layer, index, out zone));
 }