Jump to content

New mod : trying to modify balm lily for compostable


Recommended Posts

here my code :

 [HarmonyPatch(typeof(SwampLilyFlowerConfig))]
        [HarmonyPatch("CreatePrefab")]
        public static class SwampLilyFlowerConfig_CreatePrefab_Patch
        {
            public static void Postfix(IEntityConfig __instance, ref GameObject __result)
            {
                EntityTemplates.CreateAndRegisterCompostableFromPrefab(__result);       

            }

        }

 

this wok fine but how a can add the Balmlily in the filter named" Marqued as Compostable" in storage ?

i tryed this :

                KPrefabID kprefabID = __result.GetComponent<KPrefabID>();
                kprefabID.AddTag(GameTags.MarkedForCompost);
                

but not working !

where is the filter tag for storage ? (manual or auto) ?

 

Thanks.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...