Ejemplo n.º 1
0
        public override void OnLoad(Harmony harmony)
        {
            base.OnLoad(harmony);
            PUtil.InitLibrary();
#if DEBUG
            SpamObjectsHandler.PrepareSpamHandler(new PLib.PatchManager.PPatchManager(harmony));
#endif
            var inst = ExtendedTagBits.Instance;
            // Force these tags into the efficient lower bits
            foreach (var tag in FORCE_LOWER_BITS)
            {
                inst.ManifestFlagIndex(tag);
            }
            FetchManager.disallowedTagMask = TagBitOps.Not(FetchManager.disallowedTagBits);
            FetchAreaChore.StatesInstance.s_transientDeliveryMask = TagBitOps.Not(new TagBits(
                                                                                      new Tag[] { GameTags.Garbage, GameTags.Creatures.Deliverable }));
            new PVersionCheck().Register(this, new SteamVersionChecker());
        }
Ejemplo n.º 2
0
        public static void OnLoad()
        {
#if DEBUG
            PUtil.InitLibrary();
            SpamObjectsHandler.PrepareSpamHandler();
#else
            var assembly = Assembly.GetExecutingAssembly();
            PUtil.LogDebug("Mod {0} initialized, version {1}".F(assembly.GetName()?.Name,
                                                                assembly.GetFileVersion() ?? "Unknown"));
#endif
            var inst = ExtendedTagBits.Instance;
            // Force these tags into the efficient lower bits
            foreach (var tag in FORCE_LOWER_BITS)
            {
                inst.ManifestFlagIndex(tag);
            }
            FetchManager.disallowedTagMask = TagBitOps.Not(FetchManager.disallowedTagBits);
            PDetours.DetourField <FetchAreaChore.StatesInstance, TagBits>(
                "s_transientDeliveryMask").Set(null, TagBitOps.Not(new TagBits(new Tag[] {
                GameTags.Garbage, GameTags.Creatures.Deliverable
            })));
        }