This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename T> | |
concept _is_pointer_ = requires(T a) | |
{ | |
*a; | |
}; | |
#pragma once | |
#include "lua/sol.hpp" | |
namespace lua::native |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define WREN_ADD_FOREIGN_FUNC(fn) wren_add_foreign_func<&fn>(#fn) | |
static std::unordered_map<void*, void(*)()> native_func_to_wren_handler; | |
template <typename Signature, Signature signature> | |
struct wren_foreign_func; | |
template <typename ReturnType, typename... Args, ReturnType(*function_pointer)(Args...)> | |
struct wren_foreign_func<ReturnType(*)(Args...), function_pointer> | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Awake method of your mod | |
RoR2Application.onLoad += Thing; | |
// Code partially taken from https://github.com/PassivePicasso/ThunderKit/blob/master/Editor/Addressable/Tools/AddressableBrowser.cs | |
private void Thing() | |
{ | |
var assetlazy = Addressables.LoadAssetAsync<UnityEngine.Object>("RoR2/Base/Huntress/Skins.Huntress.Alt1.asset").WaitForCompletion(); | |
//Logger.LogError(assetlazy); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using BepInEx; | |
using RoR2; | |
using System; | |
using System.Text; | |
public static void Parse() | |
{ | |
var stringBuilder = new StringBuilder(); | |
stringBuilder.Append("{| class=\"wikitable\"" + Environment.NewLine + | |
"|+ Items" + Environment.NewLine + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal static void Dump(this ObjectDB objectDB) | |
{ | |
var consumablesTable = new StringBuilder(); | |
consumablesTable.Append("{| class=\"wikitable\"" + Environment.NewLine + | |
"|+ Consumables" + Environment.NewLine + | |
"! Index" + Environment.NewLine + | |
"! Prefab Name" + Environment.NewLine + | |
"! Token Name" + Environment.NewLine + | |
"! Localized Name" + Environment.NewLine + | |
"! Max Stack Size" + Environment.NewLine + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pathlib | |
import os | |
import sys | |
with open('paths.txt', 'w') as f: | |
sys.stdout = f | |
directory = os.path.dirname(os.path.realpath(__file__)) | |
for filepath in pathlib.Path(directory).glob('**/*'): | |
path = filepath.absolute().as_posix()[89:] | |
if not path.endswith("meta"): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var stringBuilder = new StringBuilder(); | |
stringBuilder.Append("{| class=\"wikitable\"" + Environment.NewLine + | |
"|+ Items" + Environment.NewLine + | |
"! Index" + Environment.NewLine + | |
"! Code Name" + Environment.NewLine + | |
"! Real Name" + Environment.NewLine + | |
"! Tier" + Environment.NewLine + | |
"! Tags" + Environment.NewLine + | |
"|-" + Environment.NewLine + Environment.NewLine); |