Merge pull request #93 from daffyyyy/some-changes

CSS 121, languages and more
This commit is contained in:
Nereziel
2023-12-12 20:55:21 +01:00
committed by GitHub
13 changed files with 169 additions and 96 deletions

View File

@@ -20,6 +20,11 @@ namespace WeaponPaints
int weaponDefIndex = weapon.AttributeManager.Item.ItemDefinitionIndex;
if (isKnife)
{
weapon.AttributeManager.Item.EntityQuality = 3;
}
if (_config.Additional.GiveRandomSkin &&
!gPlayerWeaponsInfo[playerIndex].ContainsKey(weaponDefIndex))
{
@@ -280,10 +285,10 @@ namespace WeaponPaints
}
private static int GetRandomPaint(int defindex)
{
Random rnd = new Random();
if (WeaponPaints.skinsList != null)
if (skinsList != null)
{
Random rnd = new Random();
// Filter weapons by the provided defindex
var filteredWeapons = skinsList.FindAll(w => w["weapon_defindex"]?.ToString() == defindex.ToString());