lua/wrappers/game/lua_stat_modifier.cpp
/**
	 * Sets the stat modifier value.
	 *
	 * @param number value The new value for this modifier.
	 * @returns am.stat_modifier This
	 */
Sets the stat modifier value.
@param number value The new value for this modifier.
Sets the stat modifier value . @param number value The new value for this modifier .
int StatModifier_value(lua_State *lua)
	{
		StatModifier *mod = castUData<StatModifier>(lua, 1);
		if (mod)
		{
			if (lua_gettop(lua) == 1)
			{
				lua_pushnumber(lua, mod->getValue());
				return 1;
			}
			else if (lua_isnum(lua, 2))
			{
				mod->setValue(lua_tofloat(lua, 2));
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "value", "number value");
		}
		return LuaState::expectedContext(lua, "value", "am.stat_modifier");
	}
int StatModifier_value ( lua_State * lua ) { StatModifier * mod = castUData < StatModifier > ( lua , 1 ) ; if ( mod ) { if ( lua_gettop ( lua ) == 1 ) { lua_pushnumber ( lua , mod -> getValue ( ) ) ; return 1 ; } else if ( lua_isnum ( lua , 2 ) ) { mod -> setValue ( lua_tofloat ( lua , 2 ) ) ; lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets the stat modifier value.
Sets the stat modifier value .