Initial renaming

This commit is contained in:
bepis69 2022-06-22 21:16:01 -04:00
parent 323f06891a
commit 79384d4f92
4 changed files with 64 additions and 165 deletions

View File

@ -7,8 +7,8 @@
<ProjectGuid>{C5889536-4EE7-40BC-A8FD-7F1A80C3F3E5}</ProjectGuid> <ProjectGuid>{C5889536-4EE7-40BC-A8FD-7F1A80C3F3E5}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MunitionsExpert</RootNamespace> <RootNamespace>ExpandedArmorDetails</RootNamespace>
<AssemblyName>Faupi-MunitionsExpert</AssemblyName> <AssemblyName>bepis69-ExpandedArmorDetails</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
@ -30,19 +30,19 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <!-- <PropertyGroup>-->
<SignAssembly>true</SignAssembly> <!-- <SignAssembly>true</SignAssembly>-->
</PropertyGroup> <!-- </PropertyGroup>-->
<PropertyGroup> <!-- <PropertyGroup>-->
<AssemblyOriginatorKeyFile> <!-- <AssemblyOriginatorKeyFile>-->
</AssemblyOriginatorKeyFile> <!-- </AssemblyOriginatorKeyFile>-->
</PropertyGroup> <!-- </PropertyGroup>-->
<ItemGroup> <ItemGroup>
<Compile Include="src\client\StaticIconsPatch.cs" /> <Compile Include="src\client\StaticIconsPatch.cs" />
<Compile Include="src\client\CachedAttributesPatch.cs" /> <Compile Include="src\client\CachedAttributesPatch.cs" />
<Compile Include="src\client\ModInformation.cs" /> <Compile Include="src\client\ModInformation.cs" />
<Compile Include="src\client\Attributes.cs" /> <Compile Include="src\client\Attributes.cs" />
<Compile Include="src\client\MunitionsExpert.cs" /> <Compile Include="src\client\ExpandedArmorDetails.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -56,47 +56,47 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Reference Include="0Harmony"> <Reference Include="0Harmony">
<HintPath>..\..\Shared\BepInEx\0Harmony.dll</HintPath> <HintPath>lib\BepInEx\0Harmony.dll</HintPath>
</Reference> </Reference>
<Reference Include="Aki.Common"> <Reference Include="Aki.Common">
<HintPath>..\..\Shared\AKI\Aki.Common.dll</HintPath> <HintPath>lib\AKI\Aki.Common.dll</HintPath>
</Reference> </Reference>
<Reference Include="Aki.Reflection"> <Reference Include="Aki.Reflection">
<HintPath>..\..\Shared\AKI\Aki.Reflection.dll</HintPath> <HintPath>lib\AKI\Aki.Reflection.dll</HintPath>
</Reference> </Reference>
<Reference Include="Assembly-CSharp"> <Reference Include="Assembly-CSharp">
<HintPath>..\..\Shared\EFT\Assembly-CSharp.dll</HintPath> <HintPath>lib\EFT\Assembly-CSharp.dll</HintPath>
</Reference> </Reference>
<Reference Include="BepInEx"> <Reference Include="BepInEx">
<HintPath>..\..\Shared\BepInEx\BepInEx.dll</HintPath> <HintPath>lib\BepInEx\BepInEx.dll</HintPath>
</Reference> </Reference>
<Reference Include="Comfort"> <Reference Include="Comfort">
<HintPath>..\..\Shared\EFT\Comfort.dll</HintPath> <HintPath>lib\EFT\Comfort.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\References\EFT-Managed\Newtonsoft.Json.dll</HintPath> <HintPath>lib\EFT\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="UnityEngine"> <Reference Include="UnityEngine">
<HintPath>..\..\Shared\EFT\UnityEngine.dll</HintPath> <HintPath>lib\EFT\UnityEngine.dll</HintPath>
</Reference> </Reference>
<Reference Include="UnityEngine.CoreModule"> <Reference Include="UnityEngine.CoreModule">
<HintPath>..\..\Shared\EFT\UnityEngine.CoreModule.dll</HintPath> <HintPath>lib\EFT\UnityEngine.CoreModule.dll</HintPath>
</Reference> </Reference>
<Reference Include="UnityEngine.UnityWebRequestModule"> <Reference Include="UnityEngine.UnityWebRequestModule">
<HintPath>..\..\Shared\EFT\UnityEngine.UnityWebRequestModule.dll</HintPath> <HintPath>lib\EFT\UnityEngine.UnityWebRequestModule.dll</HintPath>
</Reference> </Reference>
<Reference Include="UnityEngine.UnityWebRequestTextureModule"> <Reference Include="UnityEngine.UnityWebRequestTextureModule">
<HintPath>..\..\Shared\EFT\UnityEngine.UnityWebRequestTextureModule.dll</HintPath> <HintPath>lib\EFT\UnityEngine.UnityWebRequestTextureModule.dll</HintPath>
</Reference> </Reference>
<Reference Include="UnityEngine.UnityWebRequestWWWModule"> <Reference Include="UnityEngine.UnityWebRequestWWWModule">
<HintPath>..\..\Shared\EFT\UnityEngine.UnityWebRequestWWWModule.dll</HintPath> <HintPath>lib\EFT\UnityEngine.UnityWebRequestWWWModule.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="_Build\Faupi-MunitionsExpert\" /> <Folder Include="_Build\bepis69-ExpandedArmorDetails\" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>

View File

@ -1,10 +1,10 @@
{ {
"name": "MunitionsExpert", "name": "bepis69-ExpandedArmorDetails",
"author": "Faupi", "author": "bepis69",
"version": "1.4.1", "version": "0.0.1",
"license": "NCSA Open Source", "license": "NCSA Open Source",
"main": "./src/MunitionsExpert.js", "main": "./src/MunitionsExpert.js",
"akiVersion": "3.0.0", "akiVersion": "2.3.1",
"updatedBy": "CWX", "updatedBy": "CWX",
"scripts": { "scripts": {
"setup:environment": "npm i", "setup:environment": "npm i",

View File

@ -1,137 +1,64 @@
{ {
"en": { "en": {
"DAMAGE": "Damage", "DURABILITY FACTOR": "Durability Factor",
"PENETRATION": "Armor penetration", "EFFECTIVE DURABILITY": "Effective Durability"
"ARMOR DAMAGE": "Damage to armor",
"FRAGMENTATION CHANCE": "Fragmentation chance",
"RICOCHET CHANCE": "Ricochet chance",
"ME_class": "Class",
"ME_noarmor": "Unarmored"
}, },
"cz": { "cz": {
"DAMAGE": "Poškození", "DURABILITY FACTOR": "Faktor trvanlivosti",
"PENETRATION": "Průbojnost", "EFFECTIVE DURABILITY": "Efektivní životnost"
"ARMOR DAMAGE": "Poškození brnění",
"FRAGMENTATION CHANCE": "Šance na fragmentaci",
"RICOCHET CHANCE": "Šance na odraz",
"ME_class": "Třída",
"ME_noarmor": "Neobrněný"
}, },
"pl": { "pl": {
"DAMAGE": "Szkoda", "DURABILITY FACTOR": "Współczynnik trwałości",
"PENETRATION": "Penetracja pancerza", "EFFECTIVE DURABILITY": "Efektywna trwałość"
"ARMOR DAMAGE": "Uszkodzenie zbroi",
"FRAGMENTATION CHANCE": "Szansa na fragmentację",
"RICOCHET CHANCE": "Szansa na rykoszet",
"ME_class": "Klasa",
"ME_noarmor": "Nieumiejętny"
}, },
"po": { "po": {
"DAMAGE": "Dano", "DURABILITY FACTOR": "Fator de durabilidade",
"PENETRATION": "Penetração de armadura", "EFFECTIVE DURABILITY": "Durabilidade efetiva"
"ARMOR DAMAGE": "Danos à armadura",
"FRAGMENTATION CHANCE": "Chance de fragmentação",
"RICOCHET CHANCE": "Chance de ricochete",
"ME_class": "Classe",
"ME_noarmor": "Sem armadura"
}, },
"ch": { "ch": {
"DAMAGE": "损坏", "DURABILITY FACTOR": "耐久性因素",
"PENETRATION": "护甲穿透", "EFFECTIVE DURABILITY": "有效耐久性"
"ARMOR DAMAGE": "对盔甲的伤害",
"FRAGMENTATION CHANCE": "碎片机会",
"RICOCHET CHANCE": "跳弹机会",
"ME_class": "类",
"ME_noarmor": "无所作为"
}, },
"ru": { "ru": {
"DAMAGE": "Повреждать", "DURABILITY FACTOR": "Фактор долговечности",
"PENETRATION": "Бронепробиваемость", "EFFECTIVE DURABILITY": "Эффективная долговечность"
"ARMOR DAMAGE": "Повреждение брони",
"FRAGMENTATION CHANCE": "Вероятность фрагментации",
"RICOCHET CHANCE": "Шанс рикошета",
"ME_class": "Класс",
"ME_noarmor": "Без оружия"
}, },
"es": { "es": {
"DAMAGE": "Daño", "DURABILITY FACTOR": "Factor de durabilidad",
"PENETRATION": "Penetración de armadura", "EFFECTIVE DURABILITY": "Durabilidad efectiva"
"ARMOR DAMAGE": "Daño a la armadura",
"FRAGMENTATION CHANCE": "Posibilidad de fragmentación",
"RICOCHET CHANCE": "Oportunidad de rebote",
"ME_class": "Clase",
"ME_noarmor": "Sin armadura"
}, },
"es-mx": { "es-mx": {
"DAMAGE": "Daño", "DURABILITY FACTOR": "Factor de durabilidad",
"PENETRATION": "Penetración de armadura", "EFFECTIVE DURABILITY": "Durabilidad efectiva"
"ARMOR DAMAGE": "Daño a la armadura",
"FRAGMENTATION CHANCE": "Posibilidad de fragmentación",
"RICOCHET CHANCE": "Oportunidad de rebote",
"ME_class": "Clase",
"ME_noarmor": "Sin armadura"
}, },
"ge": { "ge": {
"DAMAGE": "Schaden", "DURABILITY FACTOR": "Haltbarkeitsfaktor",
"PENETRATION": "Rüstungsdurchdringung", "EFFECTIVE DURABILITY": "Effektive Haltbarkeit"
"ARMOR DAMAGE": "Beschädigung der Rüstung",
"FRAGMENTATION CHANCE": "Fragmentierung Chance",
"RICOCHET CHANCE": "Querschläger-Chance",
"ME_class": "Klasse",
"ME_noarmor": "Ungepanzert"
}, },
"sk": { "sk": {
"DAMAGE": "Poškodenie", "DURABILITY FACTOR": "Faktor trvanlivosti",
"PENETRATION": "Prienik do brnenia", "EFFECTIVE DURABILITY": "Efektívna životnosť"
"ARMOR DAMAGE": "Poškodenie brnenia",
"FRAGMENTATION CHANCE": "Šanca na fragmentáciu",
"RICOCHET CHANCE": "Šanca na odraz",
"ME_class": "Trieda",
"ME_noarmor": "Neozbrojený"
}, },
"tu": { "tu": {
"DAMAGE": "Hasar",
"PENETRATION": "Zırh penetrasyon", "DURABILITY FACTOR": "Dayanıklılık Faktörü",
"ARMOR DAMAGE": "Zırhta hasar", "EFFECTIVE DURABILITY": "Etkili Dayanıklılık"
"FRAGMENTATION CHANCE": "Parçalanma şansı",
"RICOCHET CHANCE": "Sekme şansı",
"ME_class": "Sınıf",
"ME_noarmor": "zırhsız"
}, },
"it": { "it": {
"DAMAGE": "Danno",
"PENETRATION": "Penetrazione dell'armatura", "DURABILITY FACTOR": "Fattore di durabilità",
"ARMOR DAMAGE": "Danni all'armatura", "EFFECTIVE DURABILITY": "Durabilità effettiva"
"FRAGMENTATION CHANCE": "Possibilità di frammentazione",
"RICOCHET CHANCE": "Possibilità di rimbalzo",
"ME_class": "Classe",
"ME_noarmor": "Disarmato"
}, },
"jp": { "jp": {
"DAMAGE": "ダメージ", "DURABILITY FACTOR": "耐久性係数",
"PENETRATION": "装甲貫通", "EFFECTIVE DURABILITY": "効果的な耐久性"
"ARMOR DAMAGE": "鎧の損傷",
"FRAGMENTATION CHANCE": "断片化の可能性",
"RICOCHET CHANCE": "跳ね返るチャンス",
"ME_class": "クラス",
"ME_noarmor": "無装甲"
}, },
"fr": { "fr": {
"DAMAGE": "Dommage", "DURABILITY FACTOR": "Facteur de durabilité",
"PENETRATION": "Pénétration d'armure", "EFFECTIVE DURABILITY": "Durabilité efficace"
"ARMOR DAMAGE": "Dommages à l'armure",
"FRAGMENTATION CHANCE": "Chance de fragmentation",
"RICOCHET CHANCE": "Chance de ricochet",
"ME_class": "Classe",
"ME_noarmor": "Sans armure"
}, },
"hu": { "hu": {
"DAMAGE": "Kár", "DURABILITY FACTOR": "Tartóssági tényező",
"PENETRATION": "Páncélátütő", "EFFECTIVE DURABILITY": "Hatékony tartósság"
"ARMOR DAMAGE": "A páncél sérülése",
"FRAGMENTATION CHANCE": "Töredezettség esélye",
"RICOCHET CHANCE": "Ricochet esély",
"ME_class": "Osztály",
"ME_noarmor": "Fegyvertelen"
} }
} }

View File

@ -7,7 +7,7 @@ import { JsonUtil } from "@spt-aki/utils/JsonUtil"
import { InitialModLoader } from "@spt-aki/loaders/InitialModLoader" import { InitialModLoader } from "@spt-aki/loaders/InitialModLoader"
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
class MunitionsExpert implements IMod class ExpandedArmorDetails implements IMod
{ {
private logger: ILogger; private logger: ILogger;
private database: DatabaseServer; private database: DatabaseServer;
@ -20,7 +20,6 @@ class MunitionsExpert implements IMod
private translations: { [x: string]: any; }; private translations: { [x: string]: any; };
private items: { [x: string]: any; }; private items: { [x: string]: any; };
private path: { resolve: (arg0: string) => any; }; private path: { resolve: (arg0: string) => any; };
private cfg: { BulletBackgroundColours: boolean; };
public load(container: DependencyContainer) public load(container: DependencyContainer)
{ {
@ -31,7 +30,6 @@ class MunitionsExpert implements IMod
this.translations = require("../res/translations.json"); this.translations = require("../res/translations.json");
this.logger.info(`Loading: ${this.mod.name} ${this.mod.version}`); this.logger.info(`Loading: ${this.mod.name} ${this.mod.version}`);
this.path = require("path"); this.path = require("path");
this.cfg = require("./config.json");
this.hookRoutes(); this.hookRoutes();
} }
@ -68,17 +66,17 @@ class MunitionsExpert implements IMod
private hookRoutes() private hookRoutes()
{ {
this.router.registerDynamicRouter( this.router.registerDynamicRouter(
"MunitionsExpert", "ExpandedArmorDetails",
[ [
{ {
url: "/MunitionsExpert/GetInfo", url: "/ExpandedArmorDetails/GetInfo",
action: (url, info, sessionId, output) => action: (url, info, sessionId, output) =>
{ {
return this.getModInfo(url, info, sessionId, output) return this.getModInfo(url, info, sessionId, output)
} }
} }
], ],
"MunitionsExpert" "ExpandedArmorDetails"
) )
} }
@ -94,32 +92,6 @@ class MunitionsExpert implements IMod
return this.json.serialize(modOutput); return this.json.serialize(modOutput);
} }
changeBulletColour()
{
if (this.cfg.BulletBackgroundColours === true)
{
for (const i in this.items)
{
const item = this.items[i]
//set baground colour of ammo depending on pen
if (item._parent === "5485a8684bdc2da71d8b4567")
{
const pen = item._props.PenetrationPower
let colour = ""
pen > 60 ? colour = "red" : //SuperHighPen
pen > 50 ? colour = "yellow" : //HighPen
pen > 40 ? colour = "violet" : //MedHighPen
pen > 30 ? colour = "blue" : //MedPen
pen > 20 ? colour = "green" : //LowMedPen
colour = "grey" //LowPen
item._props.BackgroundColor = colour
}
}
}
}
} }
module.exports = { mod: new MunitionsExpert() }; module.exports = { mod: new ExpandedArmorDetails() };