R2Northstar/NorthstarMods

length of `ns_disallowed_weapons` is truncated

Opened this issue · 3 comments

uniboi commented

when adding almost every weapon to ns_disallowed_weapons the convar is truncated

ns_disallowed_weapons "mp_weapon_r97,mp_weapon_alternator_smg,mp_weapon_car,mp_weapon_hemlok_smg,mp_weapon_lmg,mp_weapon_lstar,mp_weapon_esaw,mp_weapon_rspn101,mp_weapon_vinson,mp_weapon_hemlok,mp_weapon_g2,mp_weapon_shotgun,mp_weapon_mastiff,mp_weapon_dmr,mp_weapon_doubletake,mp_weapon_epg,mp_weapon_smr,mp_weapon_pulse_lmg,mp_weapon_softball,mp_weapon_autopistol,mp_weapon_semipistol,mp_weapon_wingman,mp_weapon_shotgun_pistol,mp_weapon_rocket_launcher,mp_weapon_arc_launcher,mp_weapon_defender,mp_weapon_mgl,mp_weapon_wingman_n,mp_weapon_rspn101_og"

maybe a ns_allowed_weapons makes sense?

I guess convars have a max size? ^^

uniboi commented

yes, 232 chars is the limit. The entire list of all weapons is 530 bytes long

maybe a ns_allowed_weapons makes sense?

IMO a better solution would be to have an ns_weapon_filter or something, combined with something like ns_weapon_filter_is_blacklist (bool). That way we don't have to deal with conflicts when someone inevitably tries to both ban and allow a weapon.