File tree 2 files changed +10
-17
lines changed
2 files changed +10
-17
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ public static class OxygenLinkPrefab
14
14
{
15
15
public static PrefabInfo Info { get ; } = PrefabInfo
16
16
. WithTechType ( "OxygenLink" , "Oxygen Link" , "Links all connected tanks in the inventory." )
17
- . WithIcon ( ImageUtils . LoadSpriteFromFile ( System . IO . Path . Combine ( Plugin . ASSETS_FOLDER_LOCATION , "OxygenLink.png" ) ) )
17
+ . WithIcon ( ImageUtils . LoadSpriteFromFile ( System . IO . Path . Combine ( Plugin . AssetFolder , "OxygenLink.png" ) ) )
18
18
. WithSizeInInventory ( new Vector2int ( ) { x = 1 , y = 1 } ) ;
19
19
20
20
public static void Register ( )
Original file line number Diff line number Diff line change @@ -9,31 +9,24 @@ namespace OxygenLink
9
9
[ BepInDependency ( "com.snmodding.nautilus" ) ]
10
10
public class Plugin : BaseUnityPlugin
11
11
{
12
- private const string
13
- GUID = "0x4B. ",
12
+ public const string
13
+ GUID = $ " { AUTHOR } . { NAME } ",
14
14
NAME = "OxygenLink" ,
15
- VERSION = "0. 1.0.0 " ,
16
- AUTHOR = "0x4B " ,
15
+ VERSION = "1.0.2 " ,
16
+ AUTHOR = "0xKate " ,
17
17
NEXUS = "Placeholder" ;
18
18
19
- public const string MOD_FOLDER_LOCATION = $ "./BepInEx/plugins/{ NAME } /";
20
- public const string ASSETS_FOLDER_LOCATION = $ "./BepInEx/plugins/{ NAME } /Assets/";
21
-
22
19
public new static ManualLogSource Logger { get ; private set ; }
23
-
24
- private static Assembly Assembly { get ; } = Assembly . GetExecutingAssembly ( ) ;
20
+ public static Assembly Assembly { get ; } = Assembly . GetExecutingAssembly ( ) ;
21
+ public static string PluginFolder = Assembly . Location . Replace ( $ "{ Assembly . GetName ( ) . Name } .dll", "" ) ;
22
+ public static string AssetFolder = $ "{ PluginFolder } \\ Assets\\ ";
25
23
26
24
private void Awake ( )
27
25
{
28
- // set project-scoped logger instance
29
26
Logger = base . Logger ;
30
-
31
- // Initialize custom prefabs
32
27
InitializePrefabs ( ) ;
33
-
34
- // register harmony patches, if there are any
35
- Harmony . CreateAndPatchAll ( Assembly , $ "{ PluginInfo . PLUGIN_GUID } ") ;
36
- Logger . LogInfo ( $ "Plugin { PluginInfo . PLUGIN_GUID } is loaded!") ;
28
+ Harmony . CreateAndPatchAll ( Assembly , $ "{ GUID } ") ;
29
+ Logger . LogInfo ( $ "Plugin { GUID } is loaded!") ;
37
30
}
38
31
39
32
private void InitializePrefabs ( )
You can’t perform that action at this time.
0 commit comments