REGISTER_WEAPON(Null, NEW(Weapon));
REGISTRY_DEFINE_GET(Weapons, WEP_Null)
-Weapon Weapons_fromstr(string s)
+Weapon Weapon_from_name(string s)
{
FOREACH(Weapons, it != WEP_Null && it.netname == s, return it);
return WEP_Null;
s = "";
for(int j = 0; j < n; ++j)
{
- Weapon wep = Weapons_fromstr(argv(j));
+ Weapon wep = Weapon_from_name(argv(j));
if(wep != WEP_Null)
{
s = cons_mid(s, " & ", wep.m_name);
for (int j = 0; j < t; ++j)
{
s = argv(j);
- Weapon wep = Weapons_fromstr(s);
+ Weapon wep = Weapon_from_name(s);
if(wep != WEP_Null)
{
g_weaponarena_weapons |= (wep.m_wepset);
string out = "";
FOREACH_WORD(in, true, {
string replacement = "";
- Weapon w = Weapons_fromstr(it);
+ Weapon w = Weapon_from_name(it);
if (w)
{
replacement = w.weaponreplace;
for (int i = 1; i < t; ++i)
{
s = argv(i);
- Weapon wep = Weapons_fromstr(s);
+ Weapon wep = Weapon_from_name(s);
if(wep != WEP_Null)
{
entity replacement = spawn();
if (t >= 1) // always the case!
{
s = argv(0);
- wpn = Weapons_fromstr(s);
+ wpn = Weapon_from_name(s);
}
if (wpn == WEP_Null)
{