Update for 3.1.0 and enable config manager.

This commit is contained in:
VforValens 2022-07-25 15:57:33 -04:00
parent 130de8a998
commit be70aa9115
11 changed files with 29 additions and 28 deletions

View File

@ -1,5 +1,4 @@
using Aki.Reflection.Patching; using Aki.Reflection.Patching;
using Aki.Reflection.Utils;
using EFT; using EFT;
using System.Reflection; using System.Reflection;

View File

@ -10,7 +10,7 @@ using UnityEngine;
namespace ValensHasThePower namespace ValensHasThePower
{ {
[BepInPlugin("com.Valens.HasThePower", "ValensHasThePower", "1.1.0")] [BepInPlugin("com.Valens.HasThePower", "ValensHasThePower", "1.2.1")]
public class Plugin : BaseUnityPlugin public class Plugin : BaseUnityPlugin
{ {
public static ConfigEntry<int> configCustoms; public static ConfigEntry<int> configCustoms;
@ -29,19 +29,19 @@ namespace ValensHasThePower
"Customs", "Customs",
100, 100,
"Percentage Chance that Power will be On at Raid Start for the Customs Map." + "Percentage Chance that Power will be On at Raid Start for the Customs Map." +
" Default is 100."); "Default is 100.");
configInterchange = Config.Bind("General.Maps", configInterchange = Config.Bind("General.Maps",
"Interchange", "Interchange",
100, 100,
"Percentage Chance that Power will be On at Raid Start for the Interchange Map." + "Percentage Chance that Power will be On at Raid Start for the Interchange Map." +
" Default is 100."); "Default is 100.");
configReserve = Config.Bind("General.Maps", configReserve = Config.Bind("General.Maps",
"Reserve", "Reserve",
100, 100,
"Percentage Chance that Power will be On at Raid Start for the Reserve Map." + "Percentage Chance that Power will be On at Raid Start for the Reserve Map." +
" Default is 100."); "Default is 100.");
Logger.LogInfo($"Valens...has the POWER!!!"); Logger.LogInfo($"Valens...has the POWER!!!");
new PatchThePower().Enable(); new PatchThePower().Enable();

View File

@ -1,12 +0,0 @@
"use strict";
class ModMain {
constructor() {
const mod = require("./package.json");
this.modName = `${mod.author}-${mod.name}`;
Logger.info(`Loading: ${this.modName} : ${mod.version}`);
}
}
module.exports = new ModMain();

View File

@ -1,10 +0,0 @@
{
"name": "Valens Has The Power",
"author": "Valens",
"version": "1.1.0",
"license": "CC BY-NC-SA 4.0",
"main": "package.js",
"akiVersion": "2.3.1"
"thanks to": "CWX, Clodan/Alex"
}

View File

@ -1,4 +1,4 @@
## Settings file was created by plugin ValensHasThePower v1.1.0 ## Settings file was created by plugin ValensHasThePower v1.2.1
## Plugin GUID: com.Valens.HasThePower ## Plugin GUID: com.Valens.HasThePower
[General.Maps] [General.Maps]

View File

@ -0,0 +1,9 @@
{
"name": "Valens Has The Power",
"author": "Valens",
"version": "1.2.1",
"license": "CC BY-NC-SA 4.0",
"main": "src/mod.js",
"akiVersion": "3.1.*",
"thanks to": "CWX, Clodan/Alex"
}

View File

@ -0,0 +1,15 @@
import { DependencyContainer } from "tsyringe";
import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
class Mod implements IPreAkiLoadMod {
// Code added here will load BEFORE the server has started loading
preAkiLoad(container: DependencyContainer): void {
// get the logger from the server container
const logger = container.resolve<ILogger>("WinstonLogger");
logger.logWithColor("Loading Valens Has The Power 1.2.1", 'blue', 'yellowBG');
}
}
module.exports = { mod: new Mod() }