IsKnownWeapon

Removed weapon list. Looking for key words.
This commit is contained in:
Heavy Bob 2025-04-19 12:44:35 +10:00
parent 0b4f4c15d9
commit 4a5961a48b
3 changed files with 20 additions and 387 deletions
AutoTrackR2
Assets
Constants
LogEventHandlers

Binary file not shown.

Before

(image error) Size: 486 KiB

After

(image error) Size: 335 KiB

Before After
Before After

View file

@ -6,391 +6,24 @@ public static class Weapons
{
public static readonly List<string> List = new List<string>
{
"gmni_rifle_ballistic_01_firerats01",
"utfl_melee_01_gungame",
"volt_rifle_energy_01_black_gold01",
"behr_glauncher_ballistic_01_cen01",
"behr_optics_tsco_x16_s3",
"klwe_rifle_energy_01_black02",
"behr_optics_rdot_x1_s1",
"ksar_shotgun_energy_01_blue01",
"ksar_smg_energy_01_white02",
"gmni_optics_tsco_x4_s2",
"gmni_pistol_ballistic_01_white02",
"behr_lmg_ballistic_01",
"gmni_pistol_ballistic_01_gold01",
"grin_multitool_01_default_cutter",
"apar_special_ballistic_02_mag",
"apar_special_ballistic_01_mag",
"klwe_sniper_energy_01_tan01",
"ksar_shotgun_ballistic_01_green01",
"test_Gadget",
"ksar_rifle_energy_01_iae2023",
"Carryable_1H_CU_Glowstick_Orange",
"none_smg_energy_01",
"weapon_underbarrel_light_wide",
"volt_rifle_energy_01_tint01",
"nvtc_optics_holo_x1_s1_LAMP",
"gmni_pistol_ballistic_01_white01",
"grin_multitool_01_black01",
"ksar_shotgun_energy_01_tan01",
"ksar_shotgun_energy_01_cen01",
"ksar_rifle_energy_01_red_green01",
"ksar_smg_energy_01_mag",
"grin_multitool_01_default_grapple",
"behr_rifle_ballistic_02_civilian_blue01",
"nvtc_ubarrel_flsh_s1_02",
"nvtc_ubarrel_flsh_s1",
"lbco_sniper_energy_01",
"behr_rifle_ballistic_01_mag",
"apar_special_ballistic_01_tan01",
"none_smg_energy_01_mag",
"banu_melee_01_blue01",
"crlf_medgun_01_purple01",
"klwe_ubarrel_lasr_s1_02",
"ksar_melee_01",
"gmni_lmg_ballistic_01_mag",
"ksar_smg_energy_01_black01",
"gmni_smg_ballistic_01_firerats01",
"crlf_medgun_01_grey01",
"behr_pistol_ballistic_01_300",
"behr_sniper_ballistic_01_arctic01",
"sasu_pistol_toy_01_orange_purple01",
"klwe_sniper_energy_01_Luminalia_red01",
"Carryable_1H_CU_Glowstick_Yellow",
"klwe_lmg_energy_01",
"ksar_optics_tsco_x8_s3",
"ksar_rifle_energy_01_pink_red01",
"apar_special_ballistic_02_mat01",
"behr_glauncher_ballistic_01",
"ksar_shotgun_ballistic_01_firerats01",
"grin_salvage_repair_01",
"apar_special_ballistic_01_mat01",
"ksar_shotgun_ballistic_01_luminalia_blue01",
"gmni_smg_ballistic_01_Luminalia",
"apar_special_ballistic_02_missile",
"volt_rifle_energy_01_mag",
"ksar_pistol_ballistic_01_mag",
"ksar_shotgun_energy_01_green01",
"kegr_fire_extinguisher_01_mag",
"gmni_rifle_ballistic_01_iae2023",
"grin_multitool_01_healing",
"gmni_pistol_ballistic_01_red_black01",
"klwe_optics_disp_x8_s3",
"ksar_smg_energy_01_firerats01",
"behr_lmg_ballistic_01_yellow_grey01",
"behr_smg_ballistic_01_mag",
"klwe_smg_energy_01_blue_gold",
"gmni_sniper_ballistic_01_iae2201",
"sasu_pistol_toy_01_mag_ea_elim",
"nvtc_ubarrel_flsh_s1_04",
"gmni_pistol_ballistic_01_tan01",
"behr_lmg_ballistic_01_mag",
"klwe_rifle_energy_01_white01",
"Carryable_1H_CU_Glowstick_Green_Active",
"behr_shotgun_ballistic_01_blue_white01",
"Carryable_1H_CU_Glowstick_Pink",
"behr_optics_holo_x3_s1",
"klwe_smg_energy_01",
"klwe_sniper_energy_01_gold01",
"klwe_rifle_energy_01_gold01",
"lbco_pistol_energy_01",
"hdgw_pistol_ballistic_01_engraved02",
"gmni_sniper_ballistic_01_firerats01",
"klwe_rifle_energy_01_black01",
"none_shotgun_ballistic_01",
"gmni_sniper_ballistic_01_urban01",
"ksar_smg_energy_01_cc17a",
"behr_pistol_ballistic_01",
"gmni_smg_ballistic_01_mag",
"nvtc_optics_tsco_x4_s2_LAMP",
"behr_prx_kinetic_01",
"behr_smg_ballistic_01_iae2201",
"gmni_lmg_ballistic_01_firerats01",
"ksar_smg_energy_01_cc17b",
"ksar_pistol_ballistic_01_iae2023",
"ksar_smg_energy_01_black02",
"nvtc_optics_holo_x2_s1_LAMP",
"grin_multitool_01_cutter",
"utfl_melee_01_red01_gungame_rotated",
"gmni_rifle_ballistic_01_grey_red01",
"behr_shotgun_ballistic_01_mag",
"behr_rifle_ballistic_02_civilian",
"grin_multitool_01_default_salvage_repair",
"gmni_rifle_ballistic_01",
"gmni_sniper_ballistic_01_arctic01",
"grin_tool_salvage_repair_01",
"gmni_optics_tsco_x8_s3_firerats01",
"weapon_underbarrel_light_wide_blue_01",
"weapon_underbarrel_light_wide_gold_01",
"Carryable_1H_CY_universal_utensil_a",
"behr_smg_ballistic_01_white01",
"weapon_underbarrel_light_wide_red_01",
"klwe_ubarrel_lasr_s1",
"Carryable_1H_CU_Glowstick_Red_Active",
"gmni_shotgun_ballistic_01_red_black01",
"behr_smg_ballistic_01_black02",
"nvtc_optics_tsco_x4_s2",
"klwe_sniper_energy_01_black01",
"klwe_pistol_energy_01_black01",
"grin_multitool_01_brown01",
"volt_rifle_energy_01_camo01",
"klwe_sniper_energy_01_mag",
"klwe_sniper_energy_01_imp01",
"grin_multitool_01_default_charge_drain",
"apar_special_ballistic_01",
"ksar_shotgun_ballistic_01",
"kegr_fire_extinguisher_01_Igniter",
"ksar_smg_energy_01_green01",
"utfl_melee_01_red01_gungame",
"behr_glauncher_ballistic_01_black01",
"behr_rifle_ballistic_01_black02",
"grin_multitool_01_silver01",
"gmni_smg_ballistic_01_purple01",
"lbco_pistol_energy_01_acid01",
"gmni_sniper_ballistic_01_imp01",
"ksar_smg_energy_01",
"behr_smg_ballistic_01_tan01",
"gmni_pistol_ballistic_01_blue_white01",
"grin_tractor_01",
"lbco_optics_tsco_x16_s3",
"behr_sniper_ballistic_01",
"klwe_sniper_energy_01_white01",
"volt_rifle_energy_01_collector02",
"weaponMount_nvtc_optics_holo_x1_s1",
"Optics_Attachment",
"grin_multitool_01_default_tractorbeam_maelstromtest",
"ksar_melee_01_brown01",
"behr_rifle_ballistic_02_civilian_digi01",
"crlf_medgun_01_red01",
"grin_multitool_01_white01",
"klwe_pistol_energy_01_chromic01",
"behr_glauncher_ballistic_01_shin01",
"ksar_melee_01_red01",
"JanitorMob",
"ksar_shotgun_ballistic_01_mag",
"behr_rifle_ballistic_01_white02",
"klwe_sniper_energy_01_black02",
"klwe_sniper_energy_01",
"crlf_medgun_vial_01",
"grin_tool_01_mag",
"gmni_smg_ballistic_01",
"lbco_sniper_energy_01_chromic01",
"ksar_shotgun_energy_01_imp01",
"sasu_pistol_toy_01_mag",
"nvtc_ubarrel_lasr_s1",
"behr_sniper_ballistic_01_mag",
"grin_multitool_01",
"ksar_melee_01_blue01",
"lbco_sniper_energy_01_sunset01",
"ksar_rifle_energy_01_test_inf_ammo",
"ksar_rifle_energy_01_red01",
"ksar_sniper_ballistic_01",
"gmni_sniper_ballistic_01",
"ksar_rifle_energy_01_cian_black01",
"Carryable_1H_CU_Glowstick_Yellow_Active",
"behr_smg_ballistic_01_gold01",
"gmni_lmg_ballistic_01",
"gmni_rifle_ballistic_01_firerats02",
"grin_tractor_01_mag",
"klwe_sniper_energy_01_cen01",
"gmni_shotgun_ballistic_01",
"gmni_shotgun_ballistic_01_mag",
"volt_rifle_energy_01_collector03",
"hdgw_pistol_ballistic_01_mag",
"behr_rifle_ballistic_01",
"behr_smg_ballistic_01_white02",
"ksar_smg_energy_01_cc17",
"banu_melee_01_red01",
"behr_optics_tsco_x4_s2",
"vlk_spewgun_ballistic_01_mag_juvi",
"glsn_smg_energy_01",
"ksar_rifle_energy_01_blue_gold",
"gmni_lmg_ballistic_01_blue_gold",
"ksar_pistol_ballistic_01",
"sasu_pistol_toy_01",
"Multitool_Attachment",
"grin_multitool_01_energy_placeholder",
"gmni_pistol_ballistic_01_black02",
"ksar_melee_01_orange01",
"grin_multitool_01_mining",
"ksar_rifle_energy_01_firerats01",
"volt_rifle_energy_01_collector04",
"lbco_pistol_energy_01_mag",
"nvtc_optics_tsco_x8_s3_LAMP",
"ksar_smg_energy_01_spc_01",
"behr_pistol_ballistic_01_firerats01",
"banu_melee_01",
"ksar_shotgun_energy_01_white02",
"klwe_pistol_energy_01_white01",
"grin_multitool_01_salvage_repair",
"gmni_pistol_ballistic_01_mag",
"banu_melee_01_green01",
"rrs_melee_01_fallout01",
"volt_rifle_energy_01",
"ksar_sniper_ballistic_01_white_blue_01",
"behr_smg_ballistic_01_green01",
"kegr_fire_extinguisher_01",
"ksar_pistol_ballistic_01_headhunters01",
"apar_special_ballistic_01_black02",
"klwe_rifle_energy_01_mag",
"ksar_rifle_energy_01_firerats01_spc",
"klwe_lmg_energy_01_purple_blue01",
"ksar_pistol_ballistic_01_purple_pink01",
"nvtc_optics_holo_x3_s1",
"grin_multitool_resource_salvage_repair_01_filled",
"ksar_shotgun_energy_01_purple01",
"gmni_rifle_ballistic_01_mag",
"weapon_underbarrel_light_narrow_gold_01",
"lbco_sniper_energy_01_acid01",
"nvtc_optics_tsco_x4_s2_firerats01",
"gmni_pistol_ballistic_01_firerats01",
"klwe_rifle_energy_01_green01",
"lbco_pistol_energy_01_sunset01",
"sasu_pistol_toy_01_blue_pink01",
"volt_rifle_energy_01_tint02",
"gmni_smg_ballistic_01_spc_01",
"ksar_pistol_ballistic_01_yellow_black01",
"grin_multitool_02_AR_HUD",
"ksar_shotgun_energy_01_black01",
"klwe_rifle_energy_01_white02",
"ksar_smg_energy_01_gold01",
"grin_multitool_01_default_tractorbeam",
"utfl_melee_01_red01",
"gmni_pistol_ballistic_01_imp01",
"weapon_underbarrel_light_narrow_blue_01",
"behr_smg_ballistic_01_black01",
"weapon_underbarrel_light_wide_purple_01",
"nvtc_optics_rdot_x1_s1_firerats01",
"Carryable_1H_CY_universal_utensil_b",
"behr_lmg_ballistic_01_luminalia_green01",
"weapon_underbarrel_light_narrow_purple_01",
"gmni_lmg_ballistic_01_purple01",
"grin_multitool_01_default_mining",
"gmni_rifle_ballistic_01_yellow_blue01",
"crlf_medgun_01_yellow01",
"none_shotgun_ballistic_01_green01",
"ksar_shotgun_ballistic_01_iae2201",
"behr_rifle_ballistic_01_spc_01",
"grin_multitool_01_AI",
"weapon_underbarrel_light_narrow_red_01",
"nvtc_optics_holo_x1_s1",
"vlk_spewgun_ballistic_reference",
"ksar_shotgun_energy_01",
"none_shotgun_ballistic_01_mag",
"grin_multitool_01_tractorbeam",
"klwe_pistol_energy_01_tan01",
"glsn_shotgun_ballistic_01_mag",
"Tablet_Small",
"ksar_smg_energy_01_black_green01",
"klwe_rifle_energy_01",
"lbco_sniper_energy_imp01",
"ksar_rifle_energy_01_blue_gold_spc_01",
"Carryable_1H_CU_Glowstick_Blue",
"behr_optics_holo_x2_s1",
"grin_multitool_01_red01",
"weapon_underbarrel_light_narrow",
"hdgw_pistol_ballistic_01",
"behr_rifle_ballistic_02_mag_civilian",
"none_melee_01",
"gmni_lmg_ballistic_01_green_red01",
"ksar_rifle_energy_01",
"lbco_pistol_energy_01_chromic01",
"ksar_shotgun_energy_01_red01",
"nvtc_optics_holo_x3_s1_LAMP",
"klwe_smg_energy_01_mag",
"behr_glauncher_ballistic_01_mat01",
"Carryable_1H_CU_Glowstick_Red",
"ksar_shotgun_energy_01_black02",
"grin_multitool_01_orange01",
"vlk_spewgun_ballistic_01_juvi",
"Carryable_1H_CU_Glowstick_Green",
"klwe_rifle_energy_01_tan01",
"vlk_spewgun_ballistic_01_mag",
"banu_melee_02",
"apar_special_ballistic_02",
"behr_gren_frag_01",
"klwe_sniper_energy_01_green01",
"behr_optics_tsco_x8_s3",
"behr_rifle_ballistic_01_green01",
"grin_multitool_resource_salvage_repair_01",
"ksar_shotgun_energy_01_mag",
"behr_shotgun_ballistic_01",
"klwe_pistol_energy_01_black02",
"Carryable_1H_CU_Glowstick_Blue_Active",
"gmni_smg_ballistic_01_blue_white01",
"nvtc_ubarrel_flsh_s1_03",
"ksar_smg_energy_01_red01",
"ksar_pistol_ballistic_01_spc",
"gmni_shotgun_ballistic_01_pink_red01",
"klwe_pistol_energy_01_engraved01",
"crlf_medgun_01",
"gmni_pistol_ballistic_01",
"Carryable_1H_CY_universal_utensil_c",
"grin_cutter_01",
"rrs_melee_01_orange01",
"klwe_ubarrel_flsh_s1",
"gmni_smg_ballistic_01_grey_red01",
"Carryable_1H_CU_Flare_Medivac",
"utfl_melee_01_brown01",
"klwe_pistol_energy_01_gold01",
"gmni_sniper_ballistic_01_mag",
"grin_multitool_01_default_cutter_AI",
"ksar_shotgun_energy_01_gold01",
"ksar_shotgun_energy_01_black_purple01",
"lbco_pistol_energy_cen01",
"gmni_smg_ballistic_01_green_grey01",
"behr_rifle_ballistic_02_civilian_black01",
"klwe_pistol_energy_01_mag",
"grin_multitool_energy_01_mag",
"sasu_pistol_toy_01_blue_yellow01",
"nvtc_ubarrel_flsh_s1_firerats01",
"Underbarrel_Attachment",
"volt_rifle_energy_01_collector01",
"klwe_lmg_energy_01_iae2201",
"behr_sniper_ballistic_01_black01",
"ksar_smg_energy_01_tan01",
"apar_melee_01",
"behr_glauncher_ballistic_01_imp01",
"klwe_lmg_energy_01_mag",
"nvtc_optics_rdot_x1_s1",
"Carryable_1H_CU_Glowstick_Pink_Active",
"gmni_pistol_ballistic_01_green01",
"gmni_pistol_ballistic_01_green_grey01",
"lbco_sniper_energy_01_mag",
"Carryable_1H_CU_Glowstick_Pink_Active_Prison",
"behr_optics_holo_x1_s1",
"grin_multitool_01_default_healing",
"gmni_optics_tsco_x8_s3",
"behr_pistol_ballistic_01_mag",
"gmni_pistol_ballistic_01_cen01",
"gmni_optics_tsco_x4_s2_firerats01",
"klwe_pistol_energy_01",
"nvtc_optics_rdot_x1_s1_LAMP",
"nvtc_optics_holo_x2_s1",
"ksar_sniper_ballistic_01_mag",
"gmni_pistol_ballistic_01_pink_cian01",
"behr_lmg_ballistic_01_xenothreat01",
"behr_smg_ballistic_01",
"sasu_pistol_toy_01_ea_elim",
"klwe_pistol_energy_01_white02",
"Carryable_1H_CU_Glowstick_Luminalia",
"Carryable_1H_CY_cutlery_chopsticks_set_1_a",
"banu_melee_03",
"Carryable_1H_CU_Glowstick_Orange_Active",
"gmni_shotgun_ballistic_01_firerats01",
"vlk_spewgun_ballistic_01_mag_adult",
"klwe_rifle_energy_01_iae2201",
"nvtc_optics_tsco_x8_s3",
"hdgw_pistol_ballistic_01_engraved01",
"behr_rifle_ballistic_01_tan01",
"klwe_sniper_energy_01_white02",
"utfl_melee_01",
"gmni_sniper_ballistic_01_green_grey01",
"klwe_pistol_energy_01_green01",
"utfl_melee_01_grey01",
"ksar_rifle_energy_01_mag",
"grin_multitool_resource_healing_01",
"behr_glauncher_ballistic_01_mag"
"*energy*",
"*ballistic*",
"*toy*",
"*multitool*",
"*melee*",
"*repair*",
"*cutter*",
"*tractor*",
"*carryable*"
};
public static bool IsKnownWeapon(string weaponName)
{
if (List.Contains(weaponName))
return true;
return List.Any(pattern =>
pattern.Contains("*") &&
weaponName.Contains(pattern.Trim('*')));
}
}

View file

@ -59,7 +59,7 @@ public class ActorDeathEvent : ILogEventHandler
}
// Check if the weapon is in our list of weapons
if (Weapons.List.Contains(data.Weapon))
if (Weapons.IsKnownWeapon(data.Weapon))
{
LocalPlayerData.PlayerShip = "Player";
}