private void Awake() { Debug.Log("GRAPPLING HOOK AWAKE"); GrapplingHookHotkey = Config.Bind("General", "GrapplingHookHotkey", "G", "Grappling Hook Hotkey"); UpdateGrapplingHookKeyCode(); GrapplingHookHotkey.SettingChanged += HandleGrapplingHookHotkeyChange; HorizontalPosition = Config.Bind("General", "HorizontalPosition", 1.8f, "Horizontal Position"); KeepCameraAligned = Config.Bind("General", "KeepCameraAligned", true, "Keep Camera Aligned"); UseExperimentalFallDamageCancel = Config.Bind("General", "UseExperimentalFallDamageCancel", false, "Use Experimental Fall Damage Cancel"); Recipes = LoadJsonFile <RecipesConfig>("recipes.json"); var assetBundle = GetAssetBundleFromResources("grapplinghook"); var grapplingHook = assetBundle.LoadAsset <GameObject>("assets/customitems/grapplinghook/grapplinghook.prefab"); var grapplingHookItemDrop = grapplingHook.GetComponent <ItemDrop>(); var grappled = ScriptableObject.CreateInstance(typeof(SE_Grappled)) as SE_Grappled; grappled.name = "Grappled"; StatusEffects.Add(grappled); grapplingHookItemDrop.m_itemData.m_shared.m_attackStatusEffect = grappled; Prefabs.Add("GrapplingHook", grapplingHook); assetBundle?.Unload(false); _harmony = Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly()); }
public static void Initialize(RecipesConfig config) { Config = config; if (EpicLoot.IsObjectDBReady()) { SetupRecipes(); } }
private void Awake() { Recipes = LoadJsonFile <RecipesConfig>("recipes.json"); var assetBundle = LoadAssetBundle("jamassets"); if (Recipes != null && assetBundle != null) { foreach (var recipe in Recipes.recipes) { if (assetBundle.Contains(recipe.item)) { var prefab = assetBundle.LoadAsset <GameObject>(recipe.item); Prefabs.Add(recipe.item, prefab); } } } assetBundle?.Unload(false); _harmony = Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), PluginId); }
public static void Initialize(RecipesConfig config) { Config = config; }